|
|
This class contains the non-graphical information required for a UML Concept (ie a class). This class inherits from UMLObject which contains most of the information. The UMLDoc class creates instances of this type. All Concepts will need a unique id. This will be given by the UMLDoc class. If you don't leave it up to the UMLDoc class then call the method UMLDoc::getUniqueID to get a unique id.
See also: UMLObject
| UMLConcept (QObject * parent, QString Name, int id)
| UMLConcept |
Sets up a Concept.
Parameters:
| parent | The parent to this Concept. |
| name | The name of the Concept. |
| id | The unique id of the Concept. |
| UMLConcept (QObject * parent)
| UMLConcept |
Sets up a Concept.
Parameters:
| parent | The parent to this Concept. |
| ~UMLConcept ()
| ~UMLConcept |
[virtual]
Standard deconstructor.
| bool operator== ( UMLConcept & rhs )
| operator== |
Overloaded '==' operator
Reimplemented from UMLObject.
| UMLObject* addAttribute (QString name, int id)
| addAttribute |
Adds an attribute to the Concept.
Parameters:
| name | The name of the Attribute. |
| id | The id of the Attribute. |
| int removeAttribute (UMLObject *a)
| removeAttribute |
Removes an attribute from the Concept.
Parameters:
| a | The attribute to remove. |
| UMLObject* addOperation (QString name, int id)
| addOperation |
Adds an operation to the Concept.
Parameters:
| name | The name of the operation. |
| id | The id of the operation. |
| int removeOperation (UMLObject *o)
| removeOperation |
Remove an operation from the Concept.
Parameters:
| o | The operation to remove. |
| int attributes ()
| attributes |
Returns the number of attributes for the Concept.
Returns: The number of attributes for the Concept.
| int operations ()
| operations |
Returns the number of operations for the Concept.
Returns: The number of operations for the Concept.
| QPtrList<UMLAttribute>* getAttList ()
| getAttList |
Return the list of attributes for the Concept.
Returns: The list of attributes for the Concept.
| QPtrList<UMLOperation>* getOpList ()
| getOpList |
Return the list of operations for the Concept.
Returns: The list of operation for the Concept.
| QPtrList<UMLObject> findChildObject (UMLObject_Type t, QString n)
| findChildObject |
Find a list of attributes or operations with the given name.
Parameters:
| t | The type to find. |
| n | The name of the attribute or operation to find. |
Returns: The operation or attribute found. Will return 0 if none found.
| UMLObject * findChildObject (int id)
| findChildObject |
Find an attribute or operation.
Parameters:
| id | The id of the attribute or operation to find. |
Returns: The operation or attribute found. Will return 0 if none found.
| bool serialize (QDataStream *s, bool archive)
| serialize |
[virtual]
Use to save or load this classes information
Parameters:
| s | Pointer to the datastream (file) to save/load from. |
| archive | If true will save the classes information, else will load the information. |
Returns: Returns the result of the operation.
Reimplemented from UMLObject.
| long getClipSizeOf ()
| getClipSizeOf |
[virtual]
Returns the amount of bytes needed to serialize an instance object to the clipboard
Reimplemented from UMLObject.
| void init ()
| init |
Initializes key variables of the class.
| void addOperation (UMLOperation* Op, IDChangeLog* Log = 0)
| addOperation |
Adds an already created Operation. The Operation must not belong to any other concept
| void addAttribute (UMLAttribute* Att, IDChangeLog* Log = 0)
| addAttribute |
Adds an already created attribute, the attribute object must not belong to any other concept
| bool saveToXMI ( QDomDocument & qDoc, QDomElement & qElement )
| saveToXMI |
Reimplemented from UMLObject.
| bool loadFromXMI ( QDomElement & element )
| loadFromXMI |
Reimplemented from UMLObject.
| QString uniqChildName (const UMLObject_Type type)
| uniqChildName |
Returns a name for the new attribute or operation, appended with a number if the default name is taken e.g. new attribute, new attribute_1 etc