Container for Type objects. The Type manager is used when creating certain types of objects (eg. Structs and Property object classes). The Types stored within the manager contain pre-defined fields, as well as constraints specifying how objects should look. More...
Container for Type objects. The Type manager is used when creating certain types of objects (eg. Structs and Property object classes). The Types stored within the manager contain pre-defined fields, as well as constraints specifying how objects should look.
The currently available types in openDAQ that should be added to the Type manager are the Struct type and the Property object class. The former is used to validate Structs when they are created, while the latter contains pre-defined properties that are added to Property objects on construction.
When adding a Property object class to the manager, they can form inheritance chains with one-another. Thus, a parent of a given class must be added to the manager before any of its children. Likewise, a class cannot be removed before its children are removed.
Public Member Functions | |
virtual ErrCode INTERFACE_FUNC | addType (IType *type)=0 |
Adds a type to the manager. More... | |
virtual ErrCode INTERFACE_FUNC | removeType (IString *typeName)=0 |
Removes the type from the manager. More... | |
virtual ErrCode INTERFACE_FUNC | getType (IString *typeName, IType **type)=0 |
Gets an added Type by name. More... | |
virtual ErrCode INTERFACE_FUNC | getTypes (IList **types)=0 |
Gets a list of all added Types. More... | |
virtual ErrCode INTERFACE_FUNC | hasType (IString *typeName, Bool *hasType)=0 |
Checks if a type with the specified name is already added. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | borrowInterface (const IntfID &intfID, void **obj) const =0 |
Returns another interface which is supported by the object without incrementing the reference count. More... | |
virtual ErrCode INTERFACE_FUNC | dispose ()=0 |
Disposes all references held by the object. More... | |
virtual ErrCode INTERFACE_FUNC | getHashCode (SizeT *hashCode)=0 |
Returns hash code of the object. More... | |
virtual ErrCode INTERFACE_FUNC | equals (IBaseObject *other, Bool *equal) const =0 |
Compares object to another object for equality. More... | |
virtual ErrCode INTERFACE_FUNC | toString (CharPtr *str)=0 |
Returns a string representation of the object. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | queryInterface (const IntfID &intfID, void **obj)=0 |
Returns another interface which is supported by the object and increments the reference count. More... | |
virtual int INTERFACE_FUNC | addRef ()=0 |
Increments the reference count for an interface on an object. More... | |
virtual int INTERFACE_FUNC | releaseRef ()=0 |
Decrements the reference count for an interface on an object. More... | |
Adds a type to the manager.
type | The Type to be added. |
OPENDAQ_ERR_ALREADYEXISTS | if a type with the same name is already added. |
OPENDAQ_ERR_INVALIDPARAMETER | if either the type name is an empty string. |
The type name must be unique and. If a Property object class specifies a parent class, then the parent class must be added before it.
Gets an added Type by name.
typeName | The Type's name. | |
[out] | type | The Type with name equal to name . |
OPENDAQ_ERR_NOTFOUND | if a Type with the specified name is not added. |
Gets a list of all added Types.
[out] | types | The list of all added Types. |
Checks if a type with the specified name is already added.
typeName | The name of the checked type. | |
[out] | hasType | True if the type is aready added to the manager; False otherwise. |
Removes the type from the manager.
typeName | The type's name. |
OPENDAQ_ERR_NOTFOUND | if the class is not registered. |
The removed class must not be a parent of another added class. If it is, those classes must be removed before it.