Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::Enum Class Reference

The Enum class is used to wrap C++ enum types, allowing the user to iterate forward and backward through the enum type. More...

#include <vcf/FoundationKit/Enum.h>

Inheritance diagram for VCF::Enum:

VCF::Object List of all members.

Public Member Functions

 Enum ()
virtual ~Enum ()
virtual int next ()=0
 moves to the next value.
virtual int end ()=0
 Moves to the last value of the enum.
virtual int get ()=0
 gets the current value of the enum
virtual int begin ()=0
 Moves to the first value of the enum.
virtual void set (const int &intVal)=0
 Sets the current value of the enum.
 operator int ()
virtual void setFromString (const String &textVal)
 sets the enum val from a string.

Detailed Description

The Enum class is used to wrap C++ enum types, allowing the user to iterate forward and backward through the enum type.

This works best with enums that have members whose value changes in intervals of 1.


Constructor & Destructor Documentation

VCF::Enum::Enum  )  [inline]
 

virtual VCF::Enum::~Enum  )  [inline, virtual]
 


Member Function Documentation

virtual int VCF::Enum::begin  )  [pure virtual]
 

Moves to the first value of the enum.

Returns:
int the int value of the enum

virtual int VCF::Enum::end  )  [pure virtual]
 

Moves to the last value of the enum.

Returns:
int the int value of the enum

virtual int VCF::Enum::get  )  [pure virtual]
 

gets the current value of the enum

Returns:
int the int value of the enum

virtual int VCF::Enum::next  )  [pure virtual]
 

moves to the next value.

When the end of the enum is reached it cycles back to the begining

Returns:
int the int value of the enum

VCF::Enum::operator int  )  [inline]
 

virtual void VCF::Enum::set const int &  intVal  )  [pure virtual]
 

Sets the current value of the enum.

Returns:
int the int value of the enum

virtual void VCF::Enum::setFromString const String textVal  )  [inline, virtual]
 

sets the enum val from a string.

The default behaviour is to assume the string represents an integer (i.e. "1" or "3") if this is not the case then the enum wil be set to 0 value

Reimplemented from VCF::Object.


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information