IAddInfoLayoutFactory Class Referenceabstract

Interface to a factory object for creating AddInfo layouts. More...

#include "IAddInfoLayoutFactory.hpp"

+ Inheritance diagram for IAddInfoLayoutFactory:

Public Member Functions

virtual void clear ()=0
 clear added entries from the factory
 
virtual IAddInfoLayoutFactoryaddColumn (ColumnType type, const char *name)=0
 add a user-defined attribute User-defined attribute always have to start with a '_'. For adding predefined attributes please use the corresponding ColumnSemantic value More...
 
virtual IAddInfoLayoutFactoryaddColumn (ColumnType type, const char *name, unsigned arraySize)=0
 
virtual IAddInfoLayoutFactoryaddColumn (ColumnSemantic semantic)=0
 add a pre-defined attribute More...
 
virtual IAddInfoLayoutFactoryaddColumn (const DM::IAddInfoLayout &layout, unsigned idx)=0
 add a column from an existing layout More...
 
virtual IAddInfoLayoutFactoryaddColumn (const DM::IAddInfoLayout &layout)=0
 add all columns of an existing layout More...
 
virtual std::pair< ColumnType, bool > addColumn (const IDatamanager &dm, const char *name, bool forceAdding=true, ColumnType defaultType=ColumnType::float_, bool caseSensitive=false)=0
 add pre- or user-defined attribute based on attributes stored within a datamanager In contrast to the other addColumn functions, this function supports adding user- and per-defined attributes. Whereas the type of pre-defined attributes is fixed, for user-defined attributes the type has to be specified. For accessing user-defined attributes in a datamanager, the corresponding type has to be known since it is not allow combining identical named columns with different types within one layout. Therefore the function takes a damanager reference as first parameter and checks the type all used-defined attributes within the datamanager. If there is a match of the attribute name, the type as in the datamanager is used. Otherwise the column is not or with the given default type added. More...
 
virtual AddInfoLayoutHandle getLayout (bool clear=true)=0
 
virtual AddInfoLayoutHandle getEmptyLayout () const =0
 
- Public Member Functions inherited from ObjectBase
virtual void Delete ()
 

Static Public Member Functions

static IAddInfoLayoutFactoryNew ()
 
static AddInfoLayoutHandle getPredefinedLayout (const char *label)
 
static AddInfoLayoutHandle merge (AddInfoLayoutHandle layout1, AddInfoLayoutHandle layout2)
 

Detailed Description

Interface to a factory object for creating AddInfo layouts.

Member Function Documentation

◆ addColumn() [1/5]

virtual IAddInfoLayoutFactory& addColumn ( ColumnSemantic  semantic)
pure virtual

add a pre-defined attribute

Parameters
[in]semanticsemantic value of the corresponding attribute
Returns
reference to the factory object (allows calling multiple addColumn in a row)

◆ addColumn() [2/5]

virtual IAddInfoLayoutFactory& addColumn ( ColumnType  type,
const char *  name 
)
pure virtual

add a user-defined attribute User-defined attribute always have to start with a '_'. For adding predefined attributes please use the corresponding ColumnSemantic value

Parameters
[in]typetype of the user-defined attribute
[in]namename of the user-defined attribute
Returns
reference to the factory object (allows calling multiple addColumn in a row)

◆ addColumn() [3/5]

virtual IAddInfoLayoutFactory& addColumn ( const DM::IAddInfoLayout layout)
pure virtual

add all columns of an existing layout

Parameters
[in]layoutexisting layout

◆ addColumn() [4/5]

virtual IAddInfoLayoutFactory& addColumn ( const DM::IAddInfoLayout layout,
unsigned  idx 
)
pure virtual

add a column from an existing layout

Parameters
[in]layoutexisting layout
[in]idxindex of column that should be added

◆ addColumn() [5/5]

virtual std::pair<ColumnType,bool> addColumn ( const IDatamanager dm,
const char *  name,
bool  forceAdding = true,
ColumnType  defaultType = ColumnType::float_,
bool  caseSensitive = false 
)
pure virtual

add pre- or user-defined attribute based on attributes stored within a datamanager In contrast to the other addColumn functions, this function supports adding user- and per-defined attributes. Whereas the type of pre-defined attributes is fixed, for user-defined attributes the type has to be specified. For accessing user-defined attributes in a datamanager, the corresponding type has to be known since it is not allow combining identical named columns with different types within one layout. Therefore the function takes a damanager reference as first parameter and checks the type all used-defined attributes within the datamanager. If there is a match of the attribute name, the type as in the datamanager is used. Otherwise the column is not or with the given default type added.

Parameters
[in]dmconst reference to a datamanager object
[in]nameattribute name
[in]forceAddingadds the attribute even if it's not within the datamanager
[in]defaultTypein case of user-defined attribute that are not in the manager the specified type will be used
[in]caseSensitivecheck if the name should be compared case sensitive (or not) to the datamanager attributes
Returns
type of the attribute (or ColumnType::none if no attribute was added) and the flag if the attribute exists within the manager