Skip to content

2017 API dlibrary.object_base.ObjectRepository

Dieter Geerts edited this page Sep 24, 2016 · 1 revision

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.

Base classes

  • object The most base type

Constructor

__init__(self)

Methods

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.

Home

DLibrary for VW2017

PREVIOUS VERSIONS

Clone this wiki locally