DartBridgeModelRegistry class
Model registry bridge for C++ model registry operations.
Matches Swift's CppBridge+ModelRegistry.swift.
Provides:
- Model metadata storage (save, get, remove)
- Model queries (by framework, downloaded only)
- Model discovery (scan filesystem for models)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
discoverDownloadedModels(
) → Future< DiscoveryResult> - Discover downloaded models by scanning filesystem
-
getAllModels(
) → Future< List< ModelInfo> > - Get all models
-
getAllPublicModels(
) → Future< List< ModelInfo> > - Get all models from C++ registry as public ModelInfo objects.
-
getDownloadedModels(
) → Future< List< ModelInfo> > - Get downloaded models only
-
getModel(
String modelId) → Future< ModelInfo?> - Get model by ID
-
getModelsByFrameworks(
List< int> frameworks) → Future<List< ModelInfo> > - Get models by frameworks
-
getPublicModel(
String modelId) → Future< ModelInfo?> - Get a single model from C++ registry as public ModelInfo.
-
initialize(
) → Future< void> - Initialize the model registry
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeModel(
String modelId) → Future< bool> - Remove a model from registry
-
saveModel(
ModelInfo model) → Future< bool> - Save model info to registry using C allocation for safety.
-
savePublicModel(
ModelInfo model) → Future< bool> - Save a public ModelInfo to the C++ registry.
-
shutdown(
) → void - Shutdown the model registry bridge
-
toString(
) → String -
A string representation of this object.
inherited
-
updateDownloadStatus(
String modelId, String? localPath) → Future< bool> - Update download status for a model
-
updateLastUsed(
String modelId) → Future< bool> - Update last used timestamp
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → DartBridgeModelRegistry
-
final
Static Methods
-
getFrameworkFfiValue(
InferenceFramework framework) → int - Get the FFI framework value (for external use)