All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::layout::AbstractEnum Class Referenceabstract

Abstract class to represent an enumeration. More...

#include <AbstractEnum.h>

Inheritance diagram for te::layout::AbstractEnum:
te::layout::EnumDataType te::layout::EnumGridStyleType te::layout::EnumLineStyleType te::layout::EnumModeType te::layout::EnumObjectType te::layout::EnumPointType te::layout::EnumScaleType te::layout::EnumTemplateType

Public Member Functions

 AbstractEnum ()
 Constructor. More...
 
virtual EnumTypegetEnum (int enumId) const
 Searching for a value of the enumeration by id. More...
 
virtual EnumTypegetEnum (std::string name) const
 Searching for an enumeration value by name. More...
 
virtual int maxId ()
 Searching for a max value of the id. More...
 
virtual int minId ()
 Searching for a min value of the id. More...
 
virtual EnumTypesearchLabel (std::string label) const
 Searching for an enumeration value by name. More...
 
virtual int size ()
 
virtual ~AbstractEnum ()
 Destructor. More...
 

Protected Member Functions

virtual void init ()=0
 Creates the enumeration values and adds the list Reimplement this function in a AbstractEnum subclass to provide the enum's init implementation. More...
 

Protected Attributes

std::vector< EnumType * > m_enums
 list of enumeration values More...
 

Detailed Description

Abstract class to represent an enumeration.

Definition at line 48 of file AbstractEnum.h.

Constructor & Destructor Documentation

te::layout::AbstractEnum::AbstractEnum ( )

Constructor.

Definition at line 32 of file AbstractEnum.cpp.

te::layout::AbstractEnum::~AbstractEnum ( )
virtual

Destructor.

Definition at line 37 of file AbstractEnum.cpp.

Member Function Documentation

te::layout::EnumType * te::layout::AbstractEnum::getEnum ( int  enumId) const
virtual

Searching for a value of the enumeration by id.

Parameters
enumIdid
Returns
value found in the enumeration or null

Definition at line 42 of file AbstractEnum.cpp.

Referenced by te::layout::JSON::retrieve(), te::layout::JSON::retrieveSubPTree(), and te::layout::GridMapModel::updateProperties().

te::layout::EnumType * te::layout::AbstractEnum::getEnum ( std::string  name) const
virtual

Searching for an enumeration value by name.

Parameters
name
Returns
value found in the enumeration or null

Definition at line 58 of file AbstractEnum.cpp.

virtual void te::layout::AbstractEnum::init ( )
protectedpure virtual

Creates the enumeration values and adds the list Reimplement this function in a AbstractEnum subclass to provide the enum's init implementation.

Implemented in te::layout::EnumModeType, te::layout::EnumObjectType, te::layout::EnumDataType, te::layout::EnumLineStyleType, te::layout::EnumPointType, te::layout::EnumScaleType, te::layout::EnumGridStyleType, and te::layout::EnumTemplateType.

int te::layout::AbstractEnum::maxId ( )
virtual

Searching for a max value of the id.

Returns
-1 if no found, otherwise the id

Definition at line 90 of file AbstractEnum.cpp.

int te::layout::AbstractEnum::minId ( )
virtual

Searching for a min value of the id.

Returns
-1 if no found, otherwise the id

Definition at line 108 of file AbstractEnum.cpp.

te::layout::EnumType * te::layout::AbstractEnum::searchLabel ( std::string  label) const
virtual

Searching for an enumeration value by name.

Parameters
name
Returns
value found in the enumeration or null

Definition at line 74 of file AbstractEnum.cpp.

int te::layout::AbstractEnum::size ( )
virtual

Definition at line 128 of file AbstractEnum.cpp.

Member Data Documentation

std::vector<EnumType*> te::layout::AbstractEnum::m_enums
protected

list of enumeration values

Definition at line 112 of file AbstractEnum.h.


The documentation for this class was generated from the following files: