#include
Inheritance diagram for OMF::Enumeration:
Public Member Functions |
|
Enumeration (const std::string &mc) | |
Enumeration (const std::string &mc, const Enumeration &value) | |
Enumeration (const std::string &mc, const std::string &value) | |
virtual | ~Enumeration () |
const Enumeration & | operator= (const Enumeration &value) |
const Enumeration & | operator= (const std::string &value) |
virtual const std::vector< std::string > & |
labels () const =0 |
const std::string & | labelAt (size_t index) const |
operator const std::string & () const | |
operator const char * () const | |
bool | empty () const |
void | clear () |
const std::string & | str () const |
virtual unsigned | hashCode () const |
virtual const std::string & | typeCode () const =0 |
ModelObject * | metaObject () |
Protected Attributes |
|
bool | _empty |
True indicates a non-value. |
|
std::string | _value |
The string value of the primitive. |
|
|
|
|
|
|
|
The default identity method for primitive types computes an integral hash on the string representation of the object. Derived primitives may overload this method to provide more accurate or efficient hashing capabilities. Note that this method will return the same hash for primitives of different types containing the same value. However, since we don't usually deal with arrays of mixed primitives, this shouldn't really be an issue. Implements OMF::Object. Reimplemented in OMF::Integer, and OMF::UnlimitedNatural. |
|
Return the enumeration value at the requested index. If there is no such index, an empty string is returned. |
|
This method is added to the set of virtual methods to provide some introspective capabilities for derived enumeration types. This returns a const reference to an array of strings. Implemented in Model::AggregationKind, Model::DirectionKind, Model::EvaluationKind, Model::ScopeKind, Model::VisibilityKind, UML::AggregationKind, UML::CallConcurrencyKind, UML::ChangeableKind, UML::OrderingKind, UML::ParameterDirectionKind, UML::PseudostateKind, UML::ScopeKind, and UML::VisibilityKind. |
|
Return the meta-object of this instance. The meta-object is an instance of the metaclass of this object. For example, the metaclass of UML::Attribute is Model::Class. The metaobject for an instance of UML::Attribute is an instance of Model::Class. This method may force a load of an entire metamodel in order to return the correct object. |
|
|
|
|
|
Explicitly cast this object to a string. |
|
The typeCode method returns a textual description of an object's type. This can vary between classifications of objects. For primitives and collections, the names are essentially static. For model objects, enumerations and collections the name of the object is the scoped name of the instantiating class. Note that the names of primitives are not typed. Implemented in OMF::Boolean, OMF::Integer, OMF::List, OMF::ModelObject, OMF::Set, OMF::String, OMF::UnlimitedNatural, Model::AggregationKind, Model::DirectionKind, Model::EvaluationKind, Model::ScopeKind, Model::VisibilityKind, UML::AggregationKind, UML::CallConcurrencyKind, UML::ChangeableKind, UML::Geometry, UML::LocationReference, UML::Name, UML::OrderingKind, UML::ParameterDirectionKind, UML::PseudostateKind, UML::ScopeKind, UML::UnlimitedInteger, and UML::VisibilityKind. |
|
True indicates a non-value. |
|
The string value of the primitive. |