openDAQ
Open data acquisition platform
IPropertyObjectClass Struct Referenceabstract

Container of properties that can be used as a base class when instantiating a Property object. More...

+ Inheritance diagram for IPropertyObjectClass:
+ Collaboration diagram for IPropertyObjectClass:

Detailed Description

Container of properties that can be used as a base class when instantiating a Property object.

A Property object class is defined via a name and a list of properties. For a Property object to be created, using a class as its base, a class must be added to the Type manager.

The name of the class must be unique within a given Type manager instance. The name of the Class is used when choosing a template class for a Property object, as well as to define a class hierarchy. A class with the Parent name configured will inherit the properties of the class with said name.

The properties of a Property object class are, by default, sorted in insertion order. The order can, however, be overridden by specifying a Property object order - a list containing the names of properties. If specified, when retrieving the list of properties, they will be in the provided order.

All Property object class objects are created as Property object class builder objects that allow for customization and building of the class.

Public Member Functions

virtual ErrCode INTERFACE_FUNC getParentName (IString **parentName)=0
 Gets the name of the parent of the property class. More...
 
virtual ErrCode INTERFACE_FUNC getProperty (IString *propertyName, IProperty **property)=0
 Gets the class's property with the given name. More...
 
virtual ErrCode INTERFACE_FUNC hasProperty (IString *propertyName, Bool *hasProperty)=0
 Checks if the property is registered. More...
 
virtual ErrCode INTERFACE_FUNC getProperties (Bool includeInherited, IList **properties)=0
 Gets the list of properties added to the class. More...
 
- Public Member Functions inherited from IType
virtual ErrCode INTERFACE_FUNC getName (IString **typeName)=0
 Gets the name of the Type. More...
 
- Public Member Functions inherited from IBaseObject
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...
 
- Public Member Functions inherited from IUnknown
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...
 

Member Function Documentation

◆ getParentName()

virtual ErrCode INTERFACE_FUNC getParentName ( IString **  parentName)
pure virtual

Gets the name of the parent of the property class.

Parameters
[out]parentNameThe parent class's name.

◆ getProperties()

virtual ErrCode INTERFACE_FUNC getProperties ( Bool  includeInherited,
IList **  properties 
)
pure virtual

Gets the list of properties added to the class.

Parameters
includeInheritedIf true, the returned list of properties also includes the properties of the class's ancestors.
[out]propertiesThe list of properties.
Return values
OPENDAQ_ERR_MANAGER_NOT_ASSIGNEDif the parent name is set, but the Type manager is not available.

The properties are sorted in insertion order, unless a custom sorting order is specified for the class. Any properties not listed in the custom sorting order are listed at the end of the properties list, sorted in insertion order.

◆ getProperty()

virtual ErrCode INTERFACE_FUNC getProperty ( IString propertyName,
IProperty **  property 
)
pure virtual

Gets the class's property with the given name.

Parameters
propertyNameThe property's name.
[out]propertyThe property.
Return values
OPENDAQ_ERR_NOTFOUNDif the Property with name propertyName is not added to the class.
OPENDAQ_ERR_MANAGER_NOT_ASSIGNEDif the parent name is set, but the Type manager is not available.

◆ hasProperty()

virtual ErrCode INTERFACE_FUNC hasProperty ( IString propertyName,
Bool *  hasProperty 
)
pure virtual

Checks if the property is registered.

Parameters
propertyNameThe property's name.
[out]hasPropertyTrue if the property is registered, false otherwise.
Return values
OPENDAQ_ERR_MANAGER_NOT_ASSIGNEDif the parent name is set, but the Type manager is not available.