umbrello/umbrello
#include <entity.h>
Signals | |
void | entityAttributeAdded (UMLClassifierListItem *) |
void | entityAttributeRemoved (UMLClassifierListItem *) |
void | entityConstraintAdded (UMLClassifierListItem *) |
void | entityConstraintRemoved (UMLClassifierListItem *) |
Signals inherited from UMLClassifier | |
void | attributeAdded (UMLClassifierListItem *) |
void | attributeRemoved (UMLClassifierListItem *) |
void | operationAdded (UMLClassifierListItem *) |
void | operationRemoved (UMLClassifierListItem *) |
void | templateAdded (UMLClassifierListItem *) |
void | templateRemoved (UMLClassifierListItem *) |
Signals inherited from UMLCanvasObject | |
void | sigAssociationEndAdded (UMLAssociation *assoc) |
void | sigAssociationEndRemoved (UMLAssociation *assoc) |
Signals inherited from UMLObject | |
void | modified () |
Protected Member Functions | |
bool | load (QDomElement &element) |
Protected Member Functions inherited from UMLObject | |
void | init () |
void | maybeSignalObjectCreated () |
Detailed Description
This class contains the non-graphical information required for a UML Entity.
This class inherits from UMLClassifier which contains most of the information.
Non-graphical Information for an Entity.
Constructor & Destructor Documentation
|
explicit |
Constructor.
Definition at line 41 of file entity.cpp.
|
virtual |
Standard destructor.
Definition at line 53 of file entity.cpp.
Member Function Documentation
bool UMLEntity::addConstraint | ( | UMLEntityConstraint * | constr | ) |
Adds a Constraint to this UMLEntity.
To set a UMLUniqueConstraint as Primary Key use setAsPrimaryKey.
- Parameters
-
constr The UMLEntityConstraint that is to be added
- Returns
- true if the constraint could be added successfully
Definition at line 573 of file entity.cpp.
UMLObject * UMLEntity::addEntityAttribute | ( | const QString & | name, |
Uml::ID::Type | id = Uml::ID::None |
||
) |
Adds an entityAttribute.
The entityAttribute object must not belong to any other concept.
- Parameters
-
name name of the UMLEntityAttribute id id of the UMLEntityAttribute
- Returns
- True if the entityAttribute was successfully added.
Definition at line 305 of file entity.cpp.
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 322 of file entity.cpp.
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. TODO: give default value -1 to position (append) - now it conflicts with the method above..
- Parameters
-
att Pointer to the UMLEntityAttribute. position Position index for the insertion.
- Returns
- True if the entityAttribute was successfully added.
Definition at line 348 of file entity.cpp.
|
virtual |
Make a clone of this object.
Reimplemented from UMLClassifier.
Definition at line 84 of file entity.cpp.
|
virtual |
Copy the internal presentation of this object into the new object.
Reimplemented from UMLClassifier.
Definition at line 70 of file entity.cpp.
|
virtual |
Create an UMLAttribute.
- Parameters
-
name an optional name for the attribute type an optional type object for the attribute vis the visibility of the attribute iv the initial value for the attribute
- Returns
- the just created attribute or null
Reimplemented from UMLClassifier.
Definition at line 100 of file entity.cpp.
UMLCheckConstraint * UMLEntity::createCheckConstraint | ( | const QString & | name = QString() | ) |
Creates a Check Constraint for this Entity.
- Parameters
-
name an optional name
- Returns
- the CheckConstraint created
Definition at line 254 of file entity.cpp.
UMLForeignKeyConstraint * UMLEntity::createForeignKeyConstraint | ( | const QString & | name = QString() | ) |
Creates a Foreign Key Constraint for this Entity.
- Parameters
-
name an optional name
- Returns
- the ForeignKeyConstraint created
Definition at line 205 of file entity.cpp.
UMLUniqueConstraint * UMLEntity::createUniqueConstraint | ( | const QString & | name = QString() | ) |
Creates a Unique Constraint for this Entity.
- Parameters
-
name an optional name
- Returns
- the UniqueConstraint created
- Todo:
- check parameter
Definition at line 151 of file entity.cpp.
|
signal |
|
signal |
int UMLEntity::entityAttributes | ( | ) |
Returns the number of entityAttributes for the class.
- Returns
- The number of entityAttributes for the class.
Definition at line 391 of file entity.cpp.
|
signal |
|
signal |
UMLEntityAttributeList UMLEntity::getEntityAttributes | ( | ) | const |
Returns the Entity Attributes.
Same as getFilteredList(UMLObject::ot_EntityAttribute).
Definition at line 689 of file entity.cpp.
|
virtual |
Reimplementation of getFilteredList to support ot=UMLObject::ot_EntityConstraint.
Reimplemented from UMLClassifier.
Definition at line 642 of file entity.cpp.
bool UMLEntity::hasPrimaryKey | ( | ) | const |
Checks if This UMLEntity has a primary key set.
- Returns
- true if a Primary Key Exists for this UMLEntity
Definition at line 558 of file entity.cpp.
bool UMLEntity::isPrimaryKey | ( | UMLUniqueConstraint * | uConstr | ) | const |
Checks if a given Unique Constraint is primary key of this entity.
- Parameters
-
uConstr a Unique Constraint
- Returns
- bool true if passed parameter is a primary key of this entity
Definition at line 676 of file entity.cpp.
|
protectedvirtual |
Loads the <UML:Entity> element including its entityAttributes.
Reimplemented from UMLClassifier.
Definition at line 456 of file entity.cpp.
|
virtual |
Create a new ClassifierListObject (entityattribute) according to the given XMI tag.
Returns NULL if the string given does not contain one of the tags <UML:EntityAttribute> Used by the clipboard for paste operation. Reimplemented from UMLClassifier for UMLEntity
Reimplemented from UMLClassifier.
Definition at line 710 of file entity.cpp.
bool UMLEntity::operator== | ( | const UMLEntity & | rhs | ) | const |
Overloaded '==' operator.
Definition at line 61 of file entity.cpp.
bool UMLEntity::removeConstraint | ( | UMLEntityConstraint * | constr | ) |
Removes an existing constraint from this UMLEntity.
If the Contraint is a Primary Key, this Entity will no longer have a PrimaryKey.
- Parameters
-
constr the constraint to be removed
- Returns
- true if the constraint could be removed successfully
Definition at line 596 of file entity.cpp.
int UMLEntity::removeEntityAttribute | ( | UMLClassifierListItem * | att | ) |
Removes an entityAttribute from the class.
- Parameters
-
att The entityAttribute to remove.
- Returns
- Count of the remaining entityAttributes after removal. Returns -1 if the given entityAttribute was not found.
Definition at line 372 of file entity.cpp.
|
virtual |
Resolve the types referenced by our UMLEntityAttributes.
Reimplements the method from UMLClassifier.
Reimplemented from UMLClassifier.
Definition at line 409 of file entity.cpp.
|
virtual |
Creates the <UML:Entity> element including its entityliterals.
Reimplemented from UMLClassifier.
Definition at line 435 of file entity.cpp.
bool UMLEntity::setAsPrimaryKey | ( | UMLUniqueConstraint * | uconstr | ) |
Sets the UniqueConstraint passed as the Primary Key of this Entity If the UniqueConstraint exists, then it is made a primary key Else the UniqueConstraint is added and set as PrimaryKey.
- Parameters
-
uconstr The Unique Constraint that is to be set as Primary Key
- Returns
- true if Primary key could be set successfully
Definition at line 510 of file entity.cpp.
void UMLEntity::signalEntityAttributeRemoved | ( | UMLClassifierListItem * | eattr | ) |
Emit the entityAttributeRemoved signal.
Definition at line 400 of file entity.cpp.
void UMLEntity::unsetPrimaryKey | ( | ) |
Unset a Primary Key Constraint if it exists, else does nothing This function will make the primary key into just another UniqueConstraint if it exists.
Definition at line 549 of file entity.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.