Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

OMF::Object Class Reference

#include

Inheritance diagram for OMF::Object:

OMF::Container OMF::ModelObject OMF::Primitive OMF::List OMF::Set Model::ModelElement Model::MultiplicityType UML::Element UML::ElementImport UML::ElementResidence UML::Expression UML::Multiplicity UML::MultiplicityRange UML::TemplateArgument UML::TemplateParameter OMF::Boolean OMF::Enumeration OMF::Integer OMF::String OMF::UnlimitedNatural UML::Geometry UML::LocationReference UML::Name UML::UnlimitedInteger List of all members.

Detailed Description

This is the root abstraction for all entities in the OMF 2 library. It essentially provides a common supertype of every possible used in modeling. This is analagous to the Object classes defined in Java, C#, Python and other dynamically typed systems. This class is abstract and not instantiable.

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)

Constructor & Destructor Documentation

OMF::Object::Object  )  [protected]
 

Reimplemented in UML::Object.

OMF::Object::Object const std::string &  mc  )  [protected]
 

virtual OMF::Object::~Object  )  [virtual]
 

Reimplemented in UML::Object.


Member Function Documentation

virtual unsigned OMF::Object::hashCode  )  const [pure virtual]
 

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.

ModelObject* OMF::Object::metaObject  ) 
 

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.

virtual const std::string& OMF::Object::typeCode  )  const [pure virtual]
 

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.


The documentation for this class was generated from the following file:
Generated on Fri Sep 10 13:07:38 2004 for OpenModelingFramework by 1.3.8