-
Notifications
You must be signed in to change notification settings - Fork 3
2016 API dlibrary.object_base
Used for all base stuff concerning objects, which are also resources, class definitions, etc....
builtins.object
........AbstractKeyedObject(builtins.object)
........ObjectRepository(builtins.object)
........ObjectTypeEnum(builtins.object)
Base class for all objects, which will hold the identifiers for a VW object: handle and/or name.
:type handle_or_name: vs.Handle | str
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.
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.:type handle_or_name: vs.Handle | str
:rtype: 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.:type constructor: (vs.Handle | str) -> T <= AbstractKeyedObject
Holds all object type constants in human readable/understandable names.
- CLASS_DEFINITION = 94
- GRADIENT_FILL_DEFINITION = 120
- GROUP = 11
- HATCH_FILL_DEFINITION = 66
- IMAGE_FILL_DEFINITION = 119
- LINE_STYLE_DEFINITION = 96
- LOCUS = 17
- NONE = 0
- RECTANGLE = 3
- SYMBOL = 15
- SYMBOL_DEFINITION = 16
- TILE_FILL_DEFINITION = 108
Gets the object type based on the handle or name.
In VW, both are keys, but name isn't always provided. Also, some vs calls work with handles, others with names.:type handle_or_name: vs.Handle | str
:returns: None if the handle or name doesn't references an actual object.
d:\development\vw libraries\dlibrary\dlibrary\object_base.py