-
Notifications
You must be signed in to change notification settings - Fork 3
2015 API dlibrary.utility
dlibrary.utility - Used for all other, utility, stuff that can't be placed in one of the other modules.
builtins.BaseException(builtins.object) VSException builtins.object AbstractObservableWithDependencies ObservableCommand ObservableMethod AbstractPropertyClassDecorator AbstractViewModel AbstractXmlFile Convert Event Math ObservableField LinkedObservableField ViewModelList XmlDict XmlFileDefaults XmlFileLists XmlFileVersioning builtins.type(builtins.object) SingletonMeta collections.UserList(collections.abc.MutableSequence) ObservableList LinkedObservableList
Abstract base class for class decorators which adds a property to the class.
Class used for setting up files with properties through decorators. This way, plugins can decide how their xml files will behave by just setting the appropriate decorators, as these settings can be plugin version dependant. Loading will correct xmltodict output, so we can expect always the same things: - If an element has nothing (empty), xmltodict gives back None, we prefer an empty dict. - If an element has only inner text, xmltodict gives back a str, we prefer a dict with #text. So the contents will start with a dict and contains only dicts and lists down the road with no lists in lists!
x.delattr('name') <==> del x.name
dir() -> list specialized dir implementation for types
x.getattribute('name') <==> x.name
x.init(...) initializes x; see help(type(x)) for signature
instancecheck() -> bool check if an object is an instance
prepare() -> dict used to create the namespace for the class statement
x.repr() <==> repr(x)
x.setattr('name', value) <==> x.name = value
sizeof() -> int return memory consumption of the type object
subclasscheck() -> bool check if a class is a subclass
subclasses() -> list of immediate subclasses
mro() -> list return a type's method resolution order
x.delattr('name') <==> del x.name
x.getattribute('name') <==> x.name
x.repr() <==> repr(x)
x.setattr('name', value) <==> x.name = value
x.str() <==> str(x)
Exception.with_traceback(tb) -- set self.traceback to tb and return self.
def __init__(self, model_list: list, abstract_view_model: , create_new_model: , can_add_new_model: =None, can_add_dependent_property_observables: set={}):
Decorator to specify default values for items, so they can be applied if no value is present.
Decorator to correct the contents of an xml file, so that we got actual lists where we expect them. Else, xmltodict will set different types for it depending on how many times it appears in the file.
Decorator to facilitate xml file versioning and to convert to the latest version if needed.
:type converters: dict {int: callable}, which represents version number and converter from previous version.
d:\development\vw libraries\dlibrary\dlibrary\utility.py