Inherited by YGP::ANumeric, YGP::ATime, and YGP::AYear.
Public Member Functions | |
| bool | isDefined () const |
| virtual void | undefine () |
| virtual void | readFromStream (std::istream &)=0 throw (std::invalid_argument) |
| virtual std::string | toUnformattedString () const |
| virtual std::string | toString () const |
| void | toString (std::string &result) const |
| void | toUnformattedString (std::string &result) const |
Protected Member Functions | |
| AttributValue () | |
| AttributValue (bool define) | |
| AttributValue (const AttributValue &other) | |
| virtual | ~AttributValue () |
| AttributValue & | operator= (const AttributValue &other) |
| virtual void | define ()=0 |
| void | setDefined () |
Friends | |
| std::istream & | operator>> (std::istream &in, AttributValue &inValue) |
| std::ostream & | operator<< (std::ostream &out, const AttributValue &outValue) |
Attributes can have a value (according to their type) or be undefined (having no value at all).
An attribute is considered defined, if a value is explicitely set or if the defined ()-member is called (where the attribute gets a default-value; depending on its type) -> every derived object must call AttributValue::define () when setting a value!
| YGP::AttributValue::AttributValue | ( | ) | [inline, protected] |
Defaultconstructor; the attribute is not defined.
| YGP::AttributValue::AttributValue | ( | bool | define | ) | [inline, protected] |
Constructor; the attribute is defined according the parameter.
| YGP::AttributValue::AttributValue | ( | const AttributValue & | other | ) | [inline, protected] |
Copy constructor; assigns the value of other.
| virtual YGP::AttributValue::~AttributValue | ( | ) | [inline, protected, virtual] |
Destructor.
| void YGP::AttributValue::define | ( | ) | [inline, protected, pure virtual] |
Defines the objects (sets to the default value).
Defines the attribute; to be implemented by derived objects.
Derived objects must call define of their superclass!
Implemented in YGP::ADate, YGP::ANumeric, YGP::ATime, YGP::ATimestamp, and YGP::AYear.
| bool YGP::AttributValue::isDefined | ( | ) | const [inline] |
| AttributValue& YGP::AttributValue::operator= | ( | const AttributValue & | other | ) | [inline, protected] |
Assignment operator; assigns the value of other.
| virtual void YGP::AttributValue::readFromStream | ( | std::istream & | ) | throw (std::invalid_argument) [pure virtual] |
Reads a value from the passed stream.
To be implemented by derived objects (this class does nothing).
Implemented in YGP::ADate, YGP::ANumeric, YGP::ATime, YGP::ATimestamp, and YGP::AYear.
| void YGP::AttributValue::setDefined | ( | ) | [inline, protected] |
Defines the attribute; non-virtual method to be called inside define-methods of derived classes.
| void YGP::AttributValue::toString | ( | std::string & | result | ) | const [inline] |
Converts the attribute into a formatted string.
| virtual std::string YGP::AttributValue::toString | ( | ) | const [inline, virtual] |
Converts the attribute into a formatted string.
Reimplemented in YGP::ADate, YGP::ANumeric, YGP::ATime, and YGP::ATimestamp.
| void YGP::AttributValue::toUnformattedString | ( | std::string & | result | ) | const [inline] |
Converts the attribute into an unformatted string.
| virtual std::string YGP::AttributValue::toUnformattedString | ( | ) | const [inline, virtual] |
Converts the attribute into an unformatted string.
Reimplemented in YGP::ADate, YGP::ANumeric, YGP::ATime, YGP::ATimestamp, and YGP::AYear.
| virtual void YGP::AttributValue::undefine | ( | ) | [inline, virtual] |
| std::ostream& operator<< | ( | std::ostream & | out, | |
| const AttributValue & | outValue | |||
| ) | [friend] |
Writes the object to the stream using the virtual method toUnformattedString().
| std::istream& operator>> | ( | std::istream & | in, | |
| AttributValue & | inValue | |||
| ) | [friend] |
Reads the object from the passed stream using the virtual method readFromStream().