#include
Inheritance diagram for Model::Class:
Defined in [3.4.6].
Public Types |
|
typedef OMF::BasicClass< ClassImpl, OMF::Concrete > |
Proxy |
Public Member Functions |
|
Class () | |
virtual | ~Class () |
const OMF::Boolean & | isSingleton () const |
void | setIsSingleton (const OMF::Boolean &isSingleton) |
void | clearIsSingleton () |
const OMF::Boolean & | isRoot () const |
void | setIsRoot (const OMF::Boolean &isRoot) |
void | clearIsRoot () |
const OMF::Boolean & | isLeaf () const |
void | setIsLeaf (const OMF::Boolean &isLeaf) |
void | clearIsLeaf () |
const OMF::Boolean & | isAbstract () const |
void | setIsAbstract (const OMF::Boolean &isAbstract) |
void | clearIsAbstract () |
const VisibilityKind & | visibility () const |
void | setVisibility (const VisibilityKind &vis) |
void | clearVisibility () |
const OMF::List & | supertypes () const |
void | addSupertypes (GeneralizableElement *super) |
void | removeSupertypes (GeneralizableElement *super) |
void | clearSupertypes () |
OMF::List | allSupertypes () |
virtual ModelElement * | lookupElementExtended (const OMF::String &name) |
virtual OMF::List | findElementsByType (Class *ofType, const OMF::Boolean &includeSubtypes) |
const OMF::List & | contents () const |
void | addContents (ModelElement *element) |
void | removeContents (ModelElement *element) |
void | clearContents () |
ModelElement * | lookupElement (const OMF::String &name) |
ModelElement * | resolveQualifiedName (const OMF::List &qualifiedName) |
OMF::Boolean | nameIsValid (const OMF::String &name) |
const OMF::String & | name () const |
void | setName (const OMF::String &name) |
void | clearName () |
const OMF::String & | annotation () const |
void | setAnnotation (const OMF::String &annotation) |
void | clearAnnotation () |
const OMF::Set & | requiredElements () const |
void | addRequiredElements (ModelElement *element) |
void | removeRequiredElements (ModelElement *element) |
void | clearRequiredElements () |
const OMF::Set & | constraints () const |
void | addConstraints (Constraint *constraint) |
void | removeConstraints (Constraint *constraint) |
void | clearConstraints () |
Namespace * | container () |
void | setContainer (Namespace *container) |
void | clearContainer () |
const OMF::List & | qualifiedName () |
OMF::Set | findRequiredElements (const OMF::Set &kinds, const OMF::Boolean &recursive) |
OMF::Boolean | isRequiredBecause (ModelElement *otherElement, OMF::String &reason) |
OMF::Boolean | isFrozen () |
OMF::Boolean | isVisible (ModelElement *otherElement) |
virtual unsigned | hashCode () const |
virtual const std::string & | typeCode () const |
const std::string | id () const |
void | setId (const std::string &id) |
void | incRef () |
void | decRef () |
void | purge () |
ModelObject * | parent () |
void | setParent (ModelObject *parent) |
Model * | model () |
void | setModel (Model *model) |
const std::vector< Property * > & | propertyList () const |
const std::map< std::string, Property * > & |
allProperties () const |
bool | hasProperty (const std::string &name) const |
Property * | getProperty (const std::string &name) const |
Object * | get (const std::string &name) |
void | set (const std::string &name, Object *value) |
void | add (const std::string &name, Object *value) |
void | remove (const std::string &name, Object *value) |
void | clear (const std::string &name) |
void | extend (Extension *ext) |
template |
extendWith (const std::string &name, Type &value) |
template |
extendWith (const std::string &name) |
bool | hasExtension (const std::string &name) |
Extension * | extension (const std::string &name) |
void | removeExtension (const std::string &name) |
Class * | proxy () |
Package * | decl () |
ModelObject * | metaObject () |
Protected Member Functions |
|
Property & | defProperty (const std::string &name) |
|
Reimplemented from Model::Classifier. |
|
|
|
Add the value of a named property. |
|
|
|
|
|
Return all properties. |
|
Returns a list of direct and indirect supertypes of this element. The order of the list of elements is determined by a depth first traversal of the supertypes with duplicates removed.
|
|
|
Clear the value of a named property. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns package that declares this class of this object. |
|
|
Provided so derived classes can add properties. This returns the newly allocated property object so it can be altered in a chained method x().y().z(). |
|
Extend the object with a new property. This entails the external construction of the extension that will be used by the model object. This is more useful for specialized extensions. |
|
This method is like the above, but the caller does not need a default value for the extension. |
|
This method is much like the first but internalizes the construction of the extension element. It uses the basic extension class and wraps the given value. |
|
Get the named extension property. |
|
This method works much like the findElementsByType() method except that it also searches the contents of all supertype classes. Note that this method can also be overloaded to provide further specialization such as in the pack class. The returned list is calculated in a depth first search of the inheritance lattice.
Reimplemented from Model::Namespace. |
|
This operation selects a subset of model elements that this element depends on. The kinds parameter gives the kinds of depencies of interest to the caller. Note that the values of the kinds parameter are defined by the standard constants in the MOF defined in [3.8]. If the recursive parameter is true, this method returns the transitive closure of the DependsOn association (all dependencies for the specified kinds).
|
|
Get a named property of the object. |
|
This method is used to return the property object for the requested name. This can be useful if the client needs to test some of the capabilities of the property prior to manipulating it. |
|
Does the object support a named extension? |
|
Hash codes for model objects are the integer representation of the this pointer. The pointer value is actually the identity of the object, so it seems like a good solution for hashing. Implements OMF::Object. |
|
This method is used to query whether or not a property is actually defined for this object. Note that we can't just test using get because the property may exist, but be a null pointer. |
|
Return the id of this object. Can be empty. |
|
|
|
Reports the "freeze" status of a model element. All model elements of a published model (such as this) are frozen. In effect, this method will always return false because I don't care about freeze status.
|
|
|
This operation performs two functions. It checks whether the model element depends on the given element. If so, the method returns true. Also, If there is a dependency, the operation sets the reason parameter to the kind of dependency.
|
|
|
|
This method always returns true (as per the standard) and is reserved for future use (which it never was used). Theoretically, we could implement it to determine whether the given element is visible from this element. In other words, there is a path through the containment tree from this element to the other that is not blocked by private visibilities.
|
|
This method searches for an element contained by this namespace whose name is precisely equal to the given name. The operation returns the element with the given name or null if no such element is found. The standards wants us to throw an exception here, but that seems a bit like overkill.
|
|
This method works much like lookupElement() except that it also searches the contents of all supertype classes. Note that this method can also be overloaded to provide further specialization such as in the Package class.
|
|
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. |
|
Return the model that owns this object.Note that this method can return null... in the case where this happens, we're really dealing with fragments of models. However, inserting the fragment into a model will resolve the ownership of the element. |
|
|
Determines if a proposed name is valid. Rather than enforce some kind of lame constraints in this area, we're going to be considerably more forgiving. This method will always return true.
|
|
Return the owner of this object or - the parent in the containment tree (after which the method is named). Reimplemented in UML::Generalization. |
|
Return a list of properties (ordered by definition). This method shouldn't really be used. It's kind of a hack that's been added to support XMI 1.2 field referencing for structure types. |
|
Get the class proxy for this model object. |
|
The purge method is a work-around for cases where the object must be deleted immediately (such as composite aggregation). This method deletes this object. Do not refer to it after calling this method. |
|
While the qualifiedName is typically described as an attribute of a model element, it's actually easier to just compute the list. Note that the qualified name is recomputed and stored locally every time this method is invoked. Also, this method is part of a read-only property. |
|
Remove a value from a named property. |
|
|
|
Remove the named extension. |
|
|
|
|
This method searches for a model element contained within this namespace based on a qualified name. Note that the qualified name is interpreted as the "path" to the object. Again, the standards want exceptions, but I think returning null should be appropriate.
|
|
Set the value of a named property. |
|
|
|
Never, ever call this method. It is used internally by this class and the Model class to set the ids for objects that are used during serialization. |
|
|
|
|
|
This method should only ever be called from within the model class and only when a new top-level object is assigned to the model. |
|
|
Set the parent in the containment tree. Note that this method should only ever be called by a reference mutator. It should not be the job of the client to manage containment relations. This method will recursively set the model for all owned elements of this object to the model of the owning object. It will also reallocate ids (if the parent has a model). |
|
|
|
The typecode of a model object is the name of the model object's class. Implements OMF::Object. |
|