Home You are here: Home > Support > Reference v1.0

Change language: German

XmEnumList Class Reference

Inheritance diagram for XmEnumList:

XmObject XmArray List of all members.

Detailed Description

Container class used for representing enumerations in user interface.

This container class provide the possibility to create a bidirectional mapping between a number and a string (so called named constant).

Class attributes of integer type (especially enum), can be referenced to enumeration lists. So their range of values is limited to the values contained by the referenced enumeration list. The assignment of an enumeration list to a class attribute will be done by a parameter in XmMan::manEnum().

The names of enumeration list items are used for GUI presentation and XML serialization.

More information in section Enumerations.


Public Member Functions

bool AddEnum (int value, const char *name)
 Add a value-string pair to the enumeration list.
const char * NameFromValue (int val) const
 Return the string assigned to the given value.
XmEnumListItem * FindEnumItem (int val) const
 Return the corresponding string to the specified value, if exist.
bool FindEnumName (int &val, const char *name) const
 Return the corresponding number to the specified string, if exist.
void ClearEnumList ()
 Delete all items in the enumeration list.

Private Member Functions

Overridables - XmObject
XMOBJ ObjectID () const
 Return the ID of an object.
void manage (XmMan &m)
 Provide the possibility to connect member data and sub objects.
XmArrayGetArray ()
 Return an interface pointer to XmArray, if class have container property.
Overridables - XmArray
void manageItems (XmMan &m)
 Implement the handling and iteration for the different XmMan derivations.
void DeleteArrItem (int pos)
 Delete item with the given index.
int MoveArrItem (int pos, int offset)
 Move the item with given index at offset positions.
bool MoveArrItemEnable (int pos, int offset)
 Check, if it is possible to move the given item.
XmObjectObjectAtIndex (int pos) const
 Supply the item with index, if available.
bool IndexOfReference (int &index, XMID col, const XmAtom &row) const
 Provide the index of the item, which is referenced by the specified key in the given col ID.
void ClearArray ()
 Delete all items of the container.


Member Function Documentation

XMOBJ ObjectID  )  const [inline, private, virtual]
 

Return the ID of an object.

The ID give the exom framework the possibility to identify a class derived from XmObject. So all classes derived from XmObject should have their own ID.

Implements XmObject.

void manage XmMan m  )  [private, virtual]
 

Provide the possibility to connect member data and sub objects.

Member data and sub objects can be connected, by calling the corresponding manXxx functions of XmMan.

Implements XmObject.

XmArray* GetArray  )  [inline, private, virtual]
 

Return an interface pointer to XmArray, if class have container property.

To show the exom framework that a class derived from XmObject is able to act like a container, GetArray() has to return the interface pointer to the conatiner.

Reimplemented from XmObject.

void manageItems XmMan m  )  [inline, private, virtual]
 

Implement the handling and iteration for the different XmMan derivations.

see TXmObjectVectorObject, how to implement this member function.

Implements XmArray.

bool IndexOfReference int &  index,
XMID  col,
const XmAtom row
const [private, virtual]
 

Provide the index of the item, which is referenced by the specified key in the given col ID.

Return false if no reference found.

Reimplemented from XmArray.


Copyright © 2006 Praetz Software Development - www.exomware.com