• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • kdesdk
  • Sitemap
  • Contact Us
 

umbrello/umbrello

UMLEnum Class Reference

This class contains the non-graphical information required for a UML Enum. More...

#include <enum.h>

Inheritance diagram for UMLEnum:
Inheritance graph
[legend]

List of all members.

Signals

void enumLiteralAdded (UMLClassifierListItem *)
void enumLiteralRemoved (UMLClassifierListItem *)

Public Member Functions

 UMLEnum (const QString &name=QString(), Uml::IDType id=Uml::id_None)
virtual ~UMLEnum ()
bool addEnumLiteral (UMLEnumLiteral *literal, int position)
bool addEnumLiteral (UMLEnumLiteral *literal, IDChangeLog *Log=0)
UMLObject * addEnumLiteral (const QString &name, Uml::IDType id=Uml::id_None)
virtual UMLObject * clone () const
virtual void copyInto (UMLObject *lhs) const
UMLObject * createEnumLiteral (const QString &name=QString())
int enumLiterals ()
virtual UMLClassifierListItem * makeChildObject (const QString &xmiTag)
bool operator== (const UMLEnum &rhs)
int removeEnumLiteral (UMLEnumLiteral *literal)
virtual void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)
void signalEnumLiteralRemoved (UMLClassifierListItem *elit)

Protected Member Functions

bool load (QDomElement &element)

Detailed Description

This class contains the non-graphical information required for a UML Enum.

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

Non-graphical Information for an Enum.

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

Definition at line 28 of file enum.h.


Constructor & Destructor Documentation

UMLEnum::UMLEnum ( const QString &  name = QString(),
Uml::IDType  id = Uml::id_None 
) [explicit]

Sets up an enum.

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

Definition at line 31 of file enum.cpp.

UMLEnum::~UMLEnum (  )  [virtual]

Standard destructor.

Definition at line 39 of file enum.cpp.


Member Function Documentation

bool UMLEnum::addEnumLiteral ( UMLEnumLiteral *  literal,
int  position 
)

Adds an enumliteral to the enum, at the given position.

If position is negative or too large, the enumliteral is added to the end of the list. TODO: give default value -1 to position (append) - now it conflicts with the method above..

Parameters:
literal Pointer to the UMLEnumLiteral.
position Position index for the insertion.
Returns:
True if the enumliteral was successfully added.

Definition at line 180 of file enum.cpp.

bool UMLEnum::addEnumLiteral ( UMLEnumLiteral *  literal,
IDChangeLog *  Log = 0 
)

Adds an already created enumliteral.

The enumliteral object must not belong to any other concept.

Parameters:
literal Pointer to the UMLEnumLiteral.
Log Pointer to the IDChangeLog.
Returns:
True if the enumliteral was successfully added.

Definition at line 154 of file enum.cpp.

UMLObject * UMLEnum::addEnumLiteral ( const QString &  name,
Uml::IDType  id = Uml::id_None 
)

Adds an enumliteral to the enum.

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

Definition at line 132 of file enum.cpp.

UMLObject * UMLEnum::clone (  )  const [virtual]

Make a clone of this object.

Reimplemented from UMLClassifier.

Definition at line 64 of file enum.cpp.

void UMLEnum::copyInto ( UMLObject *  lhs  )  const [virtual]

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

Reimplemented from UMLClassifier.

Definition at line 56 of file enum.cpp.

UMLObject * UMLEnum::createEnumLiteral ( const QString &  name = QString()  ) 

Creates a literal for the enum.

Returns:
The UMLEnum created

Definition at line 85 of file enum.cpp.

void UMLEnum::enumLiteralAdded ( UMLClassifierListItem *   )  [signal]
void UMLEnum::enumLiteralRemoved ( UMLClassifierListItem *   )  [signal]
int UMLEnum::enumLiterals (  ) 

Returns the number of enumliterals for the class.

Returns:
The number of enumliterals for the class.

Definition at line 223 of file enum.cpp.

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

Loads the <UML:Enum> element including its enumliterals.

Reimplemented from UMLClassifier.

Definition at line 253 of file enum.cpp.

UMLClassifierListItem * UMLEnum::makeChildObject ( const QString &  xmiTag  )  [virtual]

Create a new ClassifierListObject (enumLiteral) according to the given XMI tag.

Returns NULL if the string given does not contain one of the tags <UML:EnumLiteral> Used by the clipboard for paste operation. Reimplemented from UMLClassifier for UMLEnum

Reimplemented from UMLClassifier.

Definition at line 288 of file enum.cpp.

bool UMLEnum::operator== ( const UMLEnum &  rhs  ) 

Overloaded '==' operator.

Reimplemented from UMLClassifier.

Definition at line 47 of file enum.cpp.

int UMLEnum::removeEnumLiteral ( UMLEnumLiteral *  literal  ) 

Removes an enumliteral from the class.

Parameters:
literal The enumliteral to remove.
Returns:
Count of the remaining enumliterals after removal. Returns -1 if the given enumliteral was not found.

Definition at line 204 of file enum.cpp.

void UMLEnum::saveToXMI ( QDomDocument &  qDoc,
QDomElement &  qElement 
) [virtual]

Creates the <UML:Enum> element including its enumliterals.

Reimplemented from UMLClassifier.

Definition at line 239 of file enum.cpp.

void UMLEnum::signalEnumLiteralRemoved ( UMLClassifierListItem *  elit  ) 

Emit the enumLiteralRemoved signal.

Definition at line 231 of file enum.cpp.


The documentation for this class was generated from the following files:
  • enum.h
  • enum.cpp

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdesdk

Skip menu "kdesdk"
  • kapptemplate
  • kate
  •     kate
  • kbugbuster
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello
Generated for kdesdk by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal