IBM
Contents Index Previous Next



Reference


The reference contains two parts:

Data Model

The data model in OM Access is based on the UML Metamodel. For more information about the UML Metamodel, see the "UML Semantics" chapter of the "Unified Modeling Language, version 1.1" documentation. This document can be found at:
http://www-306.ibm.com/software/rational/uml/

If not mentioned otherwise, the members are of type string.

OMModule

An instance of the OMModule class contains information about an OM Diagram.

Member Description
classList

A list of Class, containing all of the classes.

generalizationList

A list of Generalization, containing all of the generalizations.

associationList

A list of AssocationClass, containing all of the associations/aggregations.

Class

An instance of the Class class contains information about a class.

Member Description
name

The class name as a string.

attributeList

A list of Attribute, each entry representing one attribute in the class.

operationList

A list of Operation, each entry representing one attribute in the class.

Operation

An instance of the Operation class contains information about an operation.

Member Description
visibility

Visibility of operation.

name

Name of operation.

returnType

Return type of operation.

parameterList

List of Parameter containing information about the operations parameters.

Parameter

An instance of the Parameter class contains information about a parameter.

Member Description
name

Name of the parameter.

type

Type of the parameter.

Attribute

An instance of the Attribute class contains information about an attribute.

Member Description
visibility

Visibility of attribute.

name

Name of attribute.

type

Type of the attribute.

value

Default value.

Generalization

An instance of the Generalization class contains information about a generalization.

Member Description
subtype

The name of the subtype, `subclass' of the generalization.

supertype

The name of the supertype, `superclass' of the generalization.

discriminator

The discriminator of the generalization.

AssociationClass

An instance of the AssociationClass class contains information about an association/aggregation. The connection between the different classes is maintained by fromEnd and toEnd.

Member Description
fromEnd

An AssociationEnd representing one of the ends of the association.

toEnd

An AssociationEnd representing the other end of the association.

isAggregation

A boolean that is true if the association is an aggregation.

hasAssociationClass

A boolean that is true if the association also have an AssocationClass.

If the association also has an associationclass, the class-information is contained in the instance, inherited from Class.

AssociationEnd

An instance of the AssociationEnd class contains information about a connection to a class, for example in an association.

Member Description
name

Name of this end.

rolename

Role name of association.

type

Name of the class connected to.

multiplicity

Multiplicity of association.

qualifier

Qualifier of association.

constraint

Constraint of association.

aggregation

Represents the type of the association.

isSorted

True if the association is sorted.

isOrdered

True if the association is ordered.

Functions

GetFile

bool GetFile(filename, omModule, status)
Description

Loads the contents of filename into omModule.Returns true on success, false if failed to load the module.

Parameters

Parameter Type Description
filename

string

The (absolute) name of the file containing the diagram.

omModule

OMModule *

A pointer to the OMModule where the diagrams data will be put.

status

string *

(optional) If loading failed a diagnostic message is inserted into this string.

GetBufID

bool GetBufID(bufID,omModule,status)
Description

Loads the contents of the buffer bufID into omModule. Returns true on success, false if failed to load the module.

Parameters

Parameter Type Description
bufID

string

The bufferID of the diagram.

omModule

OMModule *

A pointer to the OMModule where the diagrams data will be put.

status

string *

(optional) If loading failed a diagnostic message is inserted into this string.

GetSuperClassList

GetSuperClassList(omModule,className,superClasses)
Description

Fills the list superClasses with the names of the superclasses to className in omModule.

Parameters

Parameter Type Description
omModule

OMModule &

The OMModule containing the diagram information.

className

string

The name of the class whose superclasses are searched for.

superClasses

list<string> *

The list to put the name of the superclasses in.

GetSubClassList

GetSubClassList(omModule,className,superClasses)
Description

Fills the list subClasses with the names of the subclasses to className in omModule.

Parameters

Parameter Type Description
omModule

OMModule &

The OMModule containing the diagram information.

className

string

The name of the class whose subclasses are searched for.

subClasses

list<string> *

The list to put the name of the subclasses in.

SourceAggregationEnd

string SourceAggregationEnd(association)
Description

Returns the name of the class which starts the aggregation (the end with the square in it), the owner-part. (The source contains the end.)

Parameters

Parameter Type Description
association

AssociationClass

The association to check.

TargetAggregationEnd

string TargetAggregationEnd(association)
Description

Returns the name of the class that ends the aggregation (the end without the square in it), the owned-part. (The source contains the end.)

Parameters

Parameter Type Description
association

AssociationClass

The association to check.

GetEndPoints

void GetEndPoints(association, classes)
Description

Fills the classes list with the names of the classes that this association/aggregation is connected to.

Parameters

Parameter Type Description
association

AssociationClass

The association to check.

classes

list<string> *

The list to insert the names into.

HasEndpoint

bool hasEndPoint(association, name)
Description

Returns true if association has an endpoint at name.

Parameters

Parameter Type Description
association

AssociationClass

The association to check.

name

string

The class to check.

GetAggregations

void GetAggregations(omModule,aggregations)
Description

Fills aggregations with all the aggregations in omModule.

Parameters

Parameter Type Description
omModule

OMModule

The OMModule containing the diagram information.

aggregations

list<Associ
ationClass>

The list to fill with aggregations.

GetAggregations

void GetAggregations(comModule,aggregations,owner)
Description

Fills aggregations with all the aggregations in omModule, that has owner as source.

Parameters

Parameter Type Description
omModule

OMModule

The OMModule containing the diagram information.

aggregations

list<AssociationClass>

The list to fill with aggregations.

owner

string

the name of the class that has to be the owner.

GetAssociations

void GetAssociations(omModule, associations)
Description

Fills associations with all the associations in omModule.

Parameters

Parameter Type Description
omModule

OMModule

The OMModule containing the diagram information.

associations

list<AssociationClass>

The list to fill with associations.

GetAssociations

void GetAssociations(omModule, associations,
	 	      firstEnd)
Description

Fills associations with all the associations in omModule, that is connected to firstEnd, in some end.

Parameters

Parameter Type Description
omModule

OMModule

The OMModule containing the diagram information.

associations

list<AssociationClass>

The list to fill with associations.

firstEnd

string

The name of one of the classes that the association has to be connected to.

GetAssociations

void GetAssociations(omModule,associations,
	 	      firstEnd,secondEnd)
Description

Fills associations with all the associations in omModule, that is connected to firstEnd, and secondEnd.

Parameters

Parameter Type Description
omModule

OMModule

The OMModule containing the diagram information.

associations

list<AssociationClass>

The list to fill with aggregations.

firstEnd

string

The name of one of the classes that the association has to be connected to.

secondEnd

string

The name of the second class that the association has to be connected to.

TraceModule

void TraceModule(omModule,os)
Description

Outputs a textual dump of omModule to os, with as much information as possible, useful for debugging purposes.

Parameters

Parameter Type Description
omModule

OMModule

The OMModule containing the diagram information.

os

ostream

The stream to output the dump to.


http://www.ibm.com/rational
Contents Index Previous Next