openDAQ
Open data acquisition platform
+ Collaboration diagram for Type manager:

Detailed Description

Modules

 Factories
 

Functions

void addType (const TypePtr &type) const
 Adds a type to the manager. More...
 
void removeType (const StringPtr &name) const
 Removes the type from the manager. More...
 
TypePtr getType (const StringPtr &name) const
 Gets an added Type by name. More...
 
ListPtr< IStringgetTypes () const
 Gets a list of all added Types. More...
 
Bool hasType (const StringPtr &typeName) const
 Checks if a type with the specified name is already added. More...
 

Function Documentation

◆ addType()

void addType ( const TypePtr type) const
inline

Adds a type to the manager.

Parameters
typeThe Type to be added.
Return values
OPENDAQ_ERR_ALREADYEXISTSif a type with the same name is already added.
OPENDAQ_ERR_INVALIDPARAMETERif 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.

◆ getType()

TypePtr getType ( const StringPtr name) const
inline

Gets an added Type by name.

Parameters
typeNameThe Type's name.
Returns
The Type with name equal to name.
Return values
OPENDAQ_ERR_NOTFOUNDif a Type with the specified name is not added.

◆ getTypes()

ListPtr<IString> getTypes ( ) const
inline

Gets a list of all added Types.

Returns
The list of all added Types.

◆ hasType()

Bool hasType ( const StringPtr typeName) const
inline

Checks if a type with the specified name is already added.

Parameters
typeNameThe name of the checked type.
Returns
True if the type is aready added to the manager; False otherwise.

◆ removeType()

void removeType ( const StringPtr name) const
inline

Removes the type from the manager.

Parameters
typeNameThe type's name.
Return values
OPENDAQ_ERR_NOTFOUNDif 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.