-
Notifications
You must be signed in to change notification settings - Fork 3
2017 API dlibrary.object_base.ObjectRepository
Singleton to get our objects (wrappers) based on the handle or name, which are identifiers for VW. To work more easily with all objects in VW, we have specialized classes as kind of wrappers for the vs calls that can be done about the object. For easy retrieval, we have this factory, as we don't always know the type.
- object The most base type
__init__(self)
get(self, handle_or_name: 'vs.Handle | str') ->
'T <= AbstractKeyedObject'
Get a wrapper object, based on the handle or name, which identifies the object in VW. If no constructor for the type is present, or the type can't be retrieved, None is returned.
register(self, object_type: int, constructor: '(vs.Handle | str) ->
T <= AbstractKeyedObject')
Register an object constructor method, so it can be created and returned in the get method. This is done in the init file of dlibrary, so all types are registered when loaded by VW.