Abstract class from which any Flag<N> instantiation is derived. More...
#include <Flags.hxx>
Classes | |
| struct | tFlagValue |
| The type of the name table rows. More... | |
Public Types | |
| typedef unsigned int | tValue |
| The type of the positional indexes. | |
Public Member Functions | |
| virtual unsigned int | GetNFlags () const =0 |
| virtual void | SetFlag (unsigned int whichOne, bool value)=0 |
| virtual bool | IsSetFlag (unsigned int whichOne) const =0 |
| std::string | GetFlagString (unsigned int whichOne) const throw (IllegalValue) |
| Retrieves the name of the flag at a position. | |
| unsigned int | GetFlagPosition (const std::string &whichOne) const throw (IllegalValue) |
| Retrieves the position of the named flag. | |
| virtual void | StoreOn (Storage &storage) const |
| Stores component's subitems on the given Storage. | |
| virtual void | LoadFrom (Storage &storage) |
| Loads component's subitems from the given Storage. | |
| bool | CheckInvariant () |
| Checks that the object is internally consistent. | |
Protected Attributes | |
| const tFlagValue * | mFlagValues |
| A pointer to the user specific flag class table of value-symbol pairs for the flag. | |
Abstract class from which any Flag<N> instantiation is derived.
It provides some clever pure virtual functions and shared implementations for the symbol managing.
Definition at line 40 of file Flags.hxx.
| typedef unsigned int CLAM::FlagsBase::tValue |
| bool FlagsBase::CheckInvariant | ( | ) | [inline] |
Checks that the object is internally consistent.
It tests that:
It tests that:
Definition at line 167 of file Flags.cxx.
References GetNFlags(), mFlagValues, CLAM::FlagsBase::tFlagValue::name, and CLAM::FlagsBase::tFlagValue::value.
| unsigned int FlagsBase::GetFlagPosition | ( | const std::string & | whichOne | ) | const throw (IllegalValue) |
Retrieves the position of the named flag.
| whichOne | The string containing the simbolic name |
Definition at line 55 of file Flags.cxx.
Referenced by LoadFrom(), and CLAM::operator>>().
| std::string FlagsBase::GetFlagString | ( | unsigned int | whichOne | ) | const throw (IllegalValue) |
Retrieves the name of the flag at a position.
| whichOne | The position of the selected flag |
Definition at line 42 of file Flags.cxx.
Referenced by CLAM::operator<<(), and StoreOn().
Implemented in CLAM::Flags< N >, and CLAM::Flags< 4 >.
Referenced by CheckInvariant(), LoadFrom(), CLAM::operator<<(), CLAM::operator>>(), and StoreOn().
Implemented in CLAM::Flags< N >, and CLAM::Flags< 4 >.
Referenced by CLAM::operator<<(), and StoreOn().
| void FlagsBase::LoadFrom | ( | Storage & | storage | ) | [virtual] |
Loads component's subitems from the given Storage.
| storage | The given storage where the subitem will be loaded from |
Implements CLAM::Component.
Definition at line 85 of file Flags.cxx.
References GetFlagPosition(), GetNFlags(), CLAM::Storage::Load(), and SetFlag().
Implemented in CLAM::Flags< N >, and CLAM::Flags< 4 >.
Referenced by LoadFrom(), and CLAM::operator>>().
| void FlagsBase::StoreOn | ( | Storage & | storage | ) | const [virtual] |
Stores component's subitems on the given Storage.
| storage | The given storage where the subitem will be stored |
Implements CLAM::Component.
Definition at line 70 of file Flags.cxx.
References GetFlagString(), GetNFlags(), IsSetFlag(), and CLAM::Storage::Store().
const tFlagValue* CLAM::FlagsBase::mFlagValues [protected] |
A pointer to the user specific flag class table of value-symbol pairs for the flag.
Definition at line 54 of file Flags.hxx.
Referenced by CheckInvariant(), and CLAM::Flags< 4 >::Flags().
1.6.3