#include <typelib/typemodel.hh>


Public Types | |
| typedef int | integral_type |
| typedef std::map< std::string, int > | ValueMap |
Public Member Functions | |
| Enum (const std::string &name, Enum::integral_type initial_value=0) | |
| void | add (std::string const &name, int value) |
| integral_type | get (std::string const &name) const |
| std::string | get (integral_type value) const |
| std::list< std::string > | names () const |
| ValueMap const & | values () const |
| virtual std::set< Type const * > | dependsOn () const |
| Enum::integral_type | getNextValue () const |
Classes | |
| class | AlreadyExists |
| class | SymbolNotFound |
| class | ValueNotFound |
| typedef int Typelib::Enum::integral_type |
| typedef std::map<std::string, int> Typelib::Enum::ValueMap |
| Typelib::Enum::Enum | ( | const std::string & | name, | |
| Enum::integral_type | initial_value = 0 | |||
| ) |
| void Typelib::Enum::add | ( | std::string const & | name, | |
| int | value | |||
| ) |
Add a new definition
| Enum::integral_type Typelib::Enum::get | ( | std::string const & | name | ) | const |
Gets the value for name
| SymbolNotFound | if name is not defined |
| std::string Typelib::Enum::get | ( | Enum::integral_type | value | ) | const |
Gets the name for value
| ValueNotFound | if value is not defined in this enum |
| std::list< std::string > Typelib::Enum::names | ( | ) | const |
The list of all names
| Enum::ValueMap const & Typelib::Enum::values | ( | ) | const |
The name => value map
| virtual std::set<Type const*> Typelib::Enum::dependsOn | ( | ) | const [inline, virtual] |
The set of types this type depends upon
Implements Typelib::Type.
| Enum::integral_type Typelib::Enum::getNextValue | ( | ) | const |
Returns the value the next inserted element should have (it is last_inserted_value + 1)
1.5.6