umbrello API Documentation

UMLEntity Class Reference

This class contains the non-graphical information required for a UML Entity. Non-graphical Information for an Entity. More...

#include <entity.h>

Inheritance diagram for UMLEntity:

UMLClassifier UMLPackage UMLCanvasObject UMLObject List of all members.

Signals

void entityAttributeAdded (UMLClassifierListItem *)
void entityAttributeRemoved (UMLClassifierListItem *)

Public Member Functions

 UMLEntity (const QString &name="", Uml::IDType id=Uml::id_None)
 Sets up an entity.
virtual ~UMLEntity ()
 Standard deconstructor.
bool operator== (UMLEntity &rhs)
 Overloaded '==' operator.
virtual void copyInto (UMLEntity *rhs) const
 Copy the internal presentation of this object into the new object.
virtual UMLObjectclone () const
 Make a clone of this object.
UMLAttributecreateAttribute (const QString &name=QString::null, UMLObject *type=0)
 Creates an entity attribute for the parent concept.
UMLObjectaddEntityAttribute (const QString &name, Uml::IDType id=Uml::id_None)
 Adds an entityAttribute to the entity.
bool addEntityAttribute (UMLEntityAttribute *att, IDChangeLog *Log=0)
 Adds an already created entityAttribute.
bool addEntityAttribute (UMLEntityAttribute *att, int position)
 Adds an entityAttribute to the entity, at the given position.
int removeEntityAttribute (UMLClassifierListItem *a)
 Removes an entityAttribute from the class.
void signalEntityAttributeRemoved (UMLClassifierListItem *eattr)
 Emit the entityAttributeRemoved signal.
int entityAttributes ()
 Returns the number of entityAttributes for the class.
virtual bool resolveRef ()
 Resolve the types referenced by our UMLEntityAttributes.
virtual void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)
 Creates the <UML:Entity> element including its entityliterals.

Protected Member Functions

bool load (QDomElement &element)
 Loads the <UML:Entity> element including its entityAttributes.

Detailed Description

This class contains the non-graphical information required for a UML Entity. Non-graphical Information for an Entity.

This class inherits from UMLClassifier which contains most of the information.

Author:
Jonathan Riddell Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org

Definition at line 29 of file entity.h.


Constructor & Destructor Documentation

UMLEntity::UMLEntity const QString &  name = "",
Uml::IDType  id = Uml::id_None
[explicit]
 

Sets up an entity.

Parameters:
name The name of the Entity.
id The unique id of the Entity.

Definition at line 26 of file entity.cpp.

References UMLPackage::init().

Referenced by clone().

UMLEntity::~UMLEntity  )  [virtual]
 

Standard deconstructor.

Definition at line 30 of file entity.cpp.


Member Function Documentation

bool UMLEntity::operator== UMLEntity rhs  ) 
 

Overloaded '==' operator.

Definition at line 34 of file entity.cpp.

References UMLClassifier::operator==().

void UMLEntity::copyInto UMLEntity rhs  )  const [virtual]
 

Copy the internal presentation of this object into the new object.

Definition at line 38 of file entity.cpp.

References UMLClassifier::copyInto().

Referenced by clone().

UMLObject * UMLEntity::clone  )  const [virtual]
 

Make a clone of this object.

Reimplemented from UMLClassifier.

Definition at line 43 of file entity.cpp.

References clone(), copyInto(), and UMLEntity().

Referenced by clone().

UMLAttribute * UMLEntity::createAttribute const QString &  name = QString::null,
UMLObject type = 0
 

Creates an entity attribute for the parent concept.

Reimplementation of method from UMLClassifier.

Parameters:
name An optional name, used by when creating through UMLListView
type An optional type, used by when creating through UMLListView
Returns:
The UMLEntityAttribute created

Definition at line 55 of file entity.cpp.

References addEntityAttribute(), UMLCanvasObject::findChildObject(), UMLApp::getDocument(), UMLObject::getName(), UMLDoc::signalUMLObjectCreated(), and UMLCanvasObject::uniqChildName().

UMLObject * UMLEntity::addEntityAttribute const QString &  name,
Uml::IDType  id = Uml::id_None
 

Adds an entityAttribute to the entity.

Parameters:
name The name of the entityAttribute.
id The id of the entityAttribute (optional.) If omitted a new ID is assigned internally.
Returns:
Pointer to the UMLEntityAttribute created.

Definition at line 98 of file entity.cpp.

References UMLObject::emitModified(), and UMLObject::modified().

Referenced by createAttribute().

bool UMLEntity::addEntityAttribute UMLEntityAttribute att,
IDChangeLog Log = 0
 

Adds an already created entityAttribute.

The entityAttribute object must not belong to any other concept.

Parameters:
att Pointer to the UMLEntityAttribute.
Log Pointer to the IDChangeLog.
Returns:
True if the entityAttribute was successfully added.

Definition at line 107 of file entity.cpp.

References UMLObject::emitModified(), UMLCanvasObject::findChildObject(), UMLObject::getName(), and UMLObject::modified().

bool UMLEntity::addEntityAttribute UMLEntityAttribute att,
int  position
 

Adds an entityAttribute to the entity, at the given position.

If position is negative or too large, the entityAttribute is added to the end of the list.

Parameters:
att Pointer to the UMLEntityAttribute.
position Position index for the insertion.
Returns:
True if the entityAttribute was successfully added.

Definition at line 124 of file entity.cpp.

References UMLObject::emitModified(), UMLCanvasObject::findChildObject(), UMLObject::getName(), and UMLObject::modified().

int UMLEntity::removeEntityAttribute UMLClassifierListItem a  ) 
 

Removes an entityAttribute from the class.

Parameters:
a The entityAttribute to remove.
Returns:
Count of the remaining entityAttributes after removal. Returns -1 if the given entityAttribute was not found.

Definition at line 142 of file entity.cpp.

References UMLObject::emitModified().

Referenced by UMLDoc::removeUMLObject().

void UMLEntity::signalEntityAttributeRemoved UMLClassifierListItem eattr  ) 
 

Emit the entityAttributeRemoved signal.

Definition at line 161 of file entity.cpp.

Referenced by UMLClassifier::takeItem().

int UMLEntity::entityAttributes  ) 
 

Returns the number of entityAttributes for the class.

Returns:
The number of entityAttributes for the class.

Definition at line 156 of file entity.cpp.

References entityAttributes(), and UMLClassifier::getFilteredList().

Referenced by entityAttributes(), and saveToXMI().

bool UMLEntity::resolveRef  )  [virtual]
 

Resolve the types referenced by our UMLEntityAttributes.

Reimplements the method from UMLClassifier.

Reimplemented from UMLClassifier.

Definition at line 165 of file entity.cpp.

References UMLObject::getBaseType(), UMLObject::resolveRef(), and UMLClassifier::resolveRef().

void UMLEntity::saveToXMI QDomDocument &  qDoc,
QDomElement &  qElement
[virtual]
 

Creates the <UML:Entity> element including its entityliterals.

Reimplemented from UMLClassifier.

Definition at line 178 of file entity.cpp.

References entityAttributes(), UMLClassifier::getFilteredList(), UMLObject::save(), and UMLObject::saveToXMI().

bool UMLEntity::load QDomElement &  element  )  [protected, virtual]
 

Loads the <UML:Entity> element including its entityAttributes.

Reimplemented from UMLClassifier.

Definition at line 190 of file entity.cpp.

References UMLObject::loadFromXMI().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:08:07 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003