#include
Inheritance diagram for OMF::Object:
Note that like other dynamic type systems all classes derived from this class are intended to be dynamically allocated (i.e., using new or some other appropriate factory method).
The object class provides an interface for obtaining and testing object identity. There are two access methods for identity: the object's hash code and its type code. The hash code is dynamically generated based on the object's current value whereas the type code is a textual description of the object's type. When taken together they uniquely identify an object by value and type.
Public Member Functions |
|
virtual | ~Object () |
virtual unsigned | hashCode () const =0 |
virtual const std::string & | typeCode () const =0 |
ModelObject * | metaObject () |
Protected Member Functions |
|
Object () | |
Object (const std::string &mc) |
|
Reimplemented in UML::Object. |
|
|
Reimplemented in UML::Object. |
|
Return the hashed integer value of an object representing this object's unique identity. This method must be implemented by derived classes. Implemented in OMF::Container, OMF::Integer, OMF::ModelObject, OMF::Primitive, and OMF::UnlimitedNatural. |
|
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. |
|
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. |