#include <cgenerator.h>
Inheritance diagram for faudes::AttributeCFlags:
This attribute is meant to be an event attribute and can distinguish between controllable, observable and forcible events. It is based on faudes::AttributeFlags and uses the lower three bits in the flag word to store the respective boolean values. The AttributeCFlags class adds convenience functions to access these bits and a default-value that corresponds to observable and neiter controllable nor forcible.
Presuming that only controllability flags are uses (different from default), the token representation is by an Option String consisting of the initials c,o and f, where initials are capitatised for set flags and default values are not writtem; eg +C+ for a controllable event tzhat is observable (default) and not forcible (default). If other than the three controllability bits are used, std. hex format is used.
Definition at line 50 of file cgenerator.h.
Public Member Functions | |
AttributeCFlags (void) | |
Default constructor. | |
virtual | ~AttributeCFlags (void) |
Destructor. | |
virtual void | Read (TokenReader &rTr) |
Read attribute value from tokenreader. | |
virtual void | Write (TokenWriter &rTw) const |
Write attribute value tokenwriter. | |
virtual void | Write (void) const |
Write attribute value to console. | |
virtual std::string | ToString (void) const |
Write attribute value to string. | |
void | SetControllable (void) |
Set controllable flag. | |
void | ClrControllable (void) |
Clear controllable flag. | |
bool | Controllable (void) const |
Query controllablility. | |
void | SetObservable (void) |
Set observable flag. | |
void | ClrObservable (void) |
Clear observable flag. | |
bool | Observable (void) const |
Query observablility. | |
void | SetForcible (void) |
Set forcible flag. | |
void | ClrForcible (void) |
Clear forcible flag. | |
bool | Forcible (void) const |
Query forcibility. | |
bool | IsDefault (void) const |
Test for default value. | |
Static Public Attributes | |
static const fType | mControllableFlag = 0x01 |
static const fType | mObservableFlag = 0x02 |
static const fType | mForcibleFlag = 0x04 |
Static Private Attributes | |
static const fType | mDefCFlags = 0x02 |
Overall default value. | |
static const fType | mAllCFlags = 0x07 |
All flags used by CFlags. |
|
Default constructor.
Definition at line 55 of file cgenerator.h. |
|
Destructor.
Definition at line 58 of file cgenerator.h. |
|
Clear controllable flag.
Definition at line 112 of file cgenerator.h. |
|
Clear forcible flag.
Definition at line 150 of file cgenerator.h. |
|
Clear observable flag.
Definition at line 131 of file cgenerator.h. |
|
Query controllablility.
Definition at line 118 of file cgenerator.h. |
|
Query forcibility.
Definition at line 156 of file cgenerator.h. |
|
Test for default value.
Reimplemented from faudes::AttributeFlags. Definition at line 162 of file cgenerator.h. |
|
Query observablility.
Definition at line 137 of file cgenerator.h. |
|
Read attribute value from tokenreader. Reads a token if it can be interpreted as AttributeCFlag. No token mismatch exceptions are thrown on error.
Reimplemented from faudes::AttributeFlags. Definition at line 86 of file cgenerator.cpp. |
|
Set controllable flag.
Definition at line 106 of file cgenerator.h. |
|
Set forcible flag.
Definition at line 144 of file cgenerator.h. |
|
Set observable flag.
Definition at line 125 of file cgenerator.h. |
|
Write attribute value to string.
Reimplemented from faudes::AttributeFlags. Definition at line 78 of file cgenerator.cpp. |
|
Write attribute value to console.
Reimplemented from faudes::AttributeFlags. Definition at line 70 of file cgenerator.cpp. |
|
Write attribute value tokenwriter.
Reimplemented from faudes::AttributeFlags. Definition at line 41 of file cgenerator.cpp. |
|
All flags used by CFlags.
Definition at line 174 of file cgenerator.h. |
|
Definition at line 165 of file cgenerator.h. |
|
Overall default value.
Definition at line 171 of file cgenerator.h. |
|
Definition at line 167 of file cgenerator.h. |
|
Definition at line 166 of file cgenerator.h. |