#include <enum.h>
Inheritance diagram for Enum:

Public Member Functions | |
| Enum (int enumval=0) | |
| Enum (const Enum &other) | |
| virtual | ~Enum () |
| virtual QString | toString () const |
| Converts from the int value to a String. | |
| virtual bool | fromString (QString str) |
| Converts from a string to the internal enum value. | |
| virtual int | intValue () const |
| bool | operator= (int other) |
| bool | operator= (QString other) |
| bool | operator== (const Enum &other) const |
| bool | operator!= (const Enum &other) const |
| bool | operator< (const Enum &other) const |
| bool | operator> (const Enum &other) const |
| QStringList | names () const |
| |
| virtual const NameMap & | nameMap () const=0 |
| |
Static Protected Member Functions | |
| static NameMap & | initMap (NameMap &nameMap, QStringList nameList, bool &initialized, int startIndex=0) |
| Adds symbols to the map with enum values starting at 0. | |
Protected Attributes | |
| int | m_Val |
No compiler symbols are introduced.
Definition at line 19 of file enum.h.
| bool Enum::fromString | ( | QString | str | ) | [virtual] |
Converts from a string to the internal enum value.
returns false if an invalid string is passed in.
Definition at line 32 of file enum.cpp.
References m_Val, and nameMap().
Referenced by CustomerType::CustomerType(), operator=(), and Customer::setTypeString().
Here is the call graph for this function:

| NameMap & Enum::initMap | ( | NameMap & | nameMap, | |
| QStringList | nameList, | |||
| bool & | initialized, | |||
| int | startIndex = 0 | |||
| ) | [static, protected] |
Adds symbols to the map with enum values starting at 0.
| nameMap | - the destination map to contain strings to numbers | |
| nameList | - a string list of names to add to the map, with optional =value suffixes | |
| initialized | - if true, do nothing (to avoid repeat-redundant calls
|
Definition at line 86 of file enum.cpp.
Referenced by CustomerType::nameMap().
1.5.1