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

umbrello/umbrello

UMLEnum Class Reference

#include <enum.h>

Inheritance diagram for UMLEnum:

Inheritance graph
[legend]

List of all members.


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 29 of file enum.h.


Signals

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

Public Member Functions

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

Protected Member Functions

bool load (QDomElement &element)

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 25 of file enum.cpp.

UMLEnum::~UMLEnum (  )  [virtual]

Standard deconstructor.

Definition at line 29 of file enum.cpp.


Member Function Documentation

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

Overloaded '==' operator.

Definition at line 33 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 37 of file enum.cpp.

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

Make a clone of this object.

Reimplemented from UMLClassifier.

Definition at line 42 of file enum.cpp.

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

Creates a literal for the enum.

Returns:
The UMLEnum created

Definition at line 55 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 94 of file enum.cpp.

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

Adds an already created enumliteral.

The enumliteral object must not belong to any other concept.

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

Definition at line 108 of file enum.cpp.

bool UMLEnum::addEnumLiteral ( UMLEnumLiteral *  Att,
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.

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

Definition at line 125 of file enum.cpp.

int UMLEnum::removeEnumLiteral ( UMLEnumLiteral *  a  ) 

Removes an enumliteral from the class.

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

Definition at line 143 of file enum.cpp.

int UMLEnum::enumLiterals (  ) 

Returns the number of enumliterals for the class.

Returns:
The number of enumliterals for the class.

Definition at line 157 of file enum.cpp.

void UMLEnum::signalEnumLiteralRemoved ( UMLClassifierListItem *  elit  ) 

Emit the enumLiteralRemoved signal.

Definition at line 161 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 165 of file enum.cpp.

void UMLEnum::enumLiteralAdded ( UMLClassifierListItem *   )  [signal]

void UMLEnum::enumLiteralRemoved ( UMLClassifierListItem *   )  [signal]

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

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

Reimplemented from UMLClassifier.

Definition at line 175 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"
  • kate
  •     kate
  • umbrello
  •   umbrello
Generated for kdesdk by doxygen 1.5.4
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