Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
Enumerable Class Referenceabstract

#include <elm/rtti/Type.h>

+ Inheritance diagram for Enumerable:

Public Member Functions

virtual ~Enumerable (void)
virtual const Typetype (void) const =0
virtual int valueFor (string text) const =0
virtual cstring nameFor (int value) const =0

Detailed Description

This interface is provided by type supporting enumerated data.

Constructor & Destructor Documentation

◆ ~Enumerable()

~Enumerable ( void  )

Member Function Documentation

◆ nameFor()

cstring nameFor ( int  value) const
pure virtual

Find the name corresponding to the gi en enumerated value.

valueValue to look text for.
If found, corresponding name or empty string.

Implemented in Enum.

Referenced by TextSerializer::onEnum(), and XOMElementSerializer::onEnum().

◆ type()

const Type & type ( void  ) const
pure virtual

Get the type corresponding to this enumerable interface.

Corresponding type.

Implemented in Enum.

◆ valueFor()

int valueFor ( string  text) const
pure virtual
textText of the value for.
Found value or -1 if not found.

Implemented in Enum.

Referenced by XOMUnserializer::onEnum().

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