openDAQ
Open data acquisition platform
PropertyObjectClassBuilderPtr Class Reference

The builder interface of Property object classes. Allows for their modification and building of Property object classes. More...

Inherits ObjectPtr< IPropertyObjectClassBuilder >.

Detailed Description

The builder interface of Property object classes. Allows for their modification and building of Property object classes.

The configuration interface allows for modifying the list of properties, the class's name, parent, and the sorting order of properties. To build the Class, the build method is used.

Public Member Functions

daq::PropertyObjectClassPtr build () const
 Builds and returns a Property object class using the currently set values of the Builder. More...
 
PropertyObjectClassBuilderPtr setName (const daq::StringPtr &className) const
 Sets the name of the property class. More...
 
daq::StringPtr getName () const
 Gets the name of the property class. More...
 
PropertyObjectClassBuilderPtr setParentName (const daq::StringPtr &parentName) const
 Gets the name of the parent of the property class. More...
 
daq::StringPtr getParentName () const
 Gets the name of the parent of the property class. More...
 
PropertyObjectClassBuilderPtr addProperty (const daq::PropertyPtr &property) const
 Adds a property to the class. More...
 
daq::DictPtr< daq::IString, daq::IProperty > getProperties () const
 Gets the dictionary of properties. More...
 
PropertyObjectClassBuilderPtr removeProperty (const daq::StringPtr &propertyName) const
 Removes a property with the given name from the class. More...
 
PropertyObjectClassBuilderPtr setPropertyOrder (const daq::ListPtr< daq::IString > &orderedPropertyNames) const
 Sets a custom order of properties as defined in the list of property names. More...
 
daq::ListPtr< daq::IString > getPropertyOrder () const
 Gets a custom order of properties as defined in the list of property names. More...
 
daq::TypeManagerPtr getManager () const
 Gets a type manager. More...
 

Member Function Documentation

◆ addProperty()

PropertyObjectClassBuilderPtr addProperty ( const daq::PropertyPtr &  property) const
inline

Adds a property to the class.

Parameters
propertyThe property to be added.
Exceptions
AlreadyExistsExceptionif a property with the same name already added to the class.
InvalidTypeExceptionif the property is an object type and is not atomic.

The default value of object-type properties that are added to a class are frozen once added.

◆ build()

daq::PropertyObjectClassPtr build ( ) const
inline

Builds and returns a Property object class using the currently set values of the Builder.

Returns
The built Property object class.

◆ getManager()

daq::TypeManagerPtr getManager ( ) const
inline

Gets a type manager.

Returns
a type manager

◆ getName()

daq::StringPtr getName ( ) const
inline

Gets the name of the property class.

Returns
The name of the class.

◆ getParentName()

daq::StringPtr getParentName ( ) const
inline

Gets the name of the parent of the property class.

Returns
The parent class's name.

◆ getProperties()

daq::DictPtr<daq::IString, daq::IProperty> getProperties ( ) const
inline

Gets the dictionary of properties.

Returns
dictionary of properties

◆ getPropertyOrder()

daq::ListPtr<daq::IString> getPropertyOrder ( ) const
inline

Gets a custom order of properties as defined in the list of property names.

Returns
A list of names of properties. The order of the list is applied to the class's properties.

◆ removeProperty()

PropertyObjectClassBuilderPtr removeProperty ( const daq::StringPtr &  propertyName) const
inline

Removes a property with the given name from the class.

Parameters
propertyNameThe name of the property to be removed.
Exceptions
NotFoundExceptionif the property with propertyName is not a member of the class.

◆ setName()

PropertyObjectClassBuilderPtr setName ( const daq::StringPtr &  className) const
inline

Sets the name of the property class.

Parameters
classNameThe name of the class.

◆ setParentName()

PropertyObjectClassBuilderPtr setParentName ( const daq::StringPtr &  parentName) const
inline

Gets the name of the parent of the property class.

Parameters
parentNameThe parent class's name.

◆ setPropertyOrder()

PropertyObjectClassBuilderPtr setPropertyOrder ( const daq::ListPtr< daq::IString > &  orderedPropertyNames) const
inline

Sets a custom order of properties as defined in the list of property names.

Parameters
orderedPropertyNamesA list of names of properties. The order of the list is applied to the class's properties.

The list should contain names of properties available in the class. When retrieving the class's properties, they will be sorted in the order in which the names appear in the provided list. Any class properties not in the custom order are kept in insertion order at the end of the class's list of properties.