umbrello API Documentation

UMLAttribute Class Reference

This class is used to set up information for an attribute. Sets up attribute information. More...

#include <attribute.h>

Inheritance diagram for UMLAttribute:

UMLClassifierListItem UMLObject UMLEntityAttribute List of all members.

Public Member Functions

 UMLAttribute (const UMLObject *parent, const QString &name, Uml::IDType id=Uml::id_None, Uml::Visibility s=Uml::Visibility::Private, UMLObject *type=0, const QString &iv=0)
 Sets up an attribute.
 UMLAttribute (const UMLObject *parent)
 Sets up an attribute.
bool operator== (UMLAttribute &rhs)
 Overloaded '==' operator.
virtual ~UMLAttribute ()
 destructor.
virtual void copyInto (UMLAttribute *rhs) const
 Copy the internal presentation of this object into the UMLAttribute object.
virtual UMLObjectclone () const
 Make a clone of the UMLAttribute.
QString getInitialValue ()
 Returns The initial value of the UMLAttribute.
void setInitialValue (const QString &iv)
 Sets the initial value of the UMLAttribute.
QString toString (Uml::Signature_Type sig=Uml::st_NoSig)
 Returns a string representation of the UMLAttribute.
QString getFullyQualifiedName (QString separator=QString::null, bool includeRoot=false) const
 Reimplement method from UMLObject.
void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)
 Creates the <UML:Attribute> XMI element.
virtual bool showPropertiesDialog (QWidget *parent)
 Display the properties configuration dialog for the attribute.
void setParmKind (Uml::Parameter_Direction pk)
Uml::Parameter_Direction getParmKind () const
virtual UMLClassifierList getTemplateParams ()
 Returns all the template params (if any) that are in the type of this attribute.

Protected Member Functions

bool load (QDomElement &element)
 Loads the <UML:Attribute> XMI element.

Protected Attributes

QString m_InitialValue
 text for the attribute's initial value.
Uml::Parameter_Direction m_ParmKind

Detailed Description

This class is used to set up information for an attribute. Sets up attribute information.

This is like a programming attribute. It has a type, name, visibility and initial value.

Author:
Paul Hensgen <phensgen@techie.com>
See also:
UMLObject Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org

Definition at line 28 of file attribute.h.


Constructor & Destructor Documentation

UMLAttribute::UMLAttribute const UMLObject parent,
const QString &  name,
Uml::IDType  id = Uml::id_None,
Uml::Visibility  s = Uml::Visibility::Private,
UMLObject type = 0,
const QString &  iv = 0
 

Sets up an attribute.

Parameters:
parent The parent of this UMLAttribute.
name The name of this UMLAttribute.
id The unique id given to this UMLAttribute.
s The visibility of the UMLAttribute.
type The type of this UMLAttribute.
iv The initial value of the attribute.

Definition at line 26 of file attribute.cpp.

References m_InitialValue.

Referenced by clone().

UMLAttribute::UMLAttribute const UMLObject parent  ) 
 

Sets up an attribute.

Parameters:
parent The parent of this UMLAttribute.

Definition at line 43 of file attribute.cpp.

UMLAttribute::~UMLAttribute  )  [virtual]
 

destructor.

Definition at line 49 of file attribute.cpp.


Member Function Documentation

bool UMLAttribute::operator== UMLAttribute rhs  ) 
 

Overloaded '==' operator.

Definition at line 141 of file attribute.cpp.

References UMLObject::m_pSecondary, and UMLObject::operator==().

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

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

Definition at line 156 of file attribute.cpp.

References UMLClassifierListItem::copyInto(), m_InitialValue, UMLObject::m_pSecondary, and UMLObject::m_SecondaryId.

Referenced by clone().

UMLObject * UMLAttribute::clone  )  const [virtual]
 

Make a clone of the UMLAttribute.

Implements UMLClassifierListItem.

Reimplemented in UMLEntityAttribute.

Definition at line 168 of file attribute.cpp.

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

Referenced by clone(), and UMLAttributeList::copyInto().

QString UMLAttribute::getInitialValue  ) 
 

Returns The initial value of the UMLAttribute.

Returns:
The initial value of the Atrtibute.

Definition at line 51 of file attribute.cpp.

References m_InitialValue.

Referenced by Import_Utils::insertMethod(), UMLListView::moveObject(), UMLEntityAttributeDialog::setupDialog(), UMLAttributeDialog::setupDialog(), PhpWriter::writeClass(), PascalWriter::writeClass(), JSWriter::writeClass(), ASWriter::writeClass(), and AdaWriter::writeClass().

void UMLAttribute::setInitialValue const QString &  iv  ) 
 

Sets the initial value of the UMLAttribute.

Parameters:
iv The initial value of the UMLAttribute.

Definition at line 55 of file attribute.cpp.

References UMLObject::emitModified(), and m_InitialValue.

Referenced by UMLEntityAttributeDialog::apply(), UMLAttributeDialog::apply(), UMLListViewItem::okRename(), PascalImport::parseStmt(), and AdaImport::parseStmt().

QString UMLAttribute::toString Uml::Signature_Type  sig = Uml::st_NoSig  )  [virtual]
 

Returns a string representation of the UMLAttribute.

Parameters:
sig If true will show the attribute type and initial value.
Returns:
Returns a string representation of the UMLAttribute.

Reimplemented from UMLClassifierListItem.

Reimplemented in UMLEntityAttribute.

Definition at line 70 of file attribute.cpp.

References UMLObject::getBaseType(), UMLObject::getFullyQualifiedName(), UMLObject::getName(), UMLClassifierListItem::getType(), UMLObject::getUMLPackage(), and m_InitialValue.

Referenced by UMLListView::createChildUMLObject(), UMLListViewItem::okRename(), AssociationWidget::setVisibility(), and UMLOperation::toString().

QString UMLAttribute::getFullyQualifiedName QString  separator = QString::null,
bool  includeRoot = false
const [virtual]
 

Reimplement method from UMLObject.

Reimplemented from UMLObject.

Definition at line 117 of file attribute.cpp.

References UMLApp::activeLanguageScopeSeparator(), UMLObject::getBaseType(), UMLObject::getFullyQualifiedName(), and UMLObject::getName().

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

Creates the <UML:Attribute> XMI element.

Implements UMLObject.

Reimplemented in UMLEntityAttribute.

Definition at line 178 of file attribute.cpp.

References UMLObject::getID(), m_InitialValue, and UMLObject::save().

bool UMLAttribute::showPropertiesDialog QWidget *  parent  )  [virtual]
 

Display the properties configuration dialog for the attribute.

Implements UMLClassifierListItem.

Reimplemented in UMLEntityAttribute.

Definition at line 239 of file attribute.cpp.

UMLClassifierList UMLAttribute::getTemplateParams  )  [virtual]
 

Returns all the template params (if any) that are in the type of this attribute.

Definition at line 294 of file attribute.cpp.

References UMLApp::getActiveLanguage(), UMLObject::getName(), and UMLClassifierListItem::getType().

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

Loads the <UML:Attribute> XMI element.

Reimplemented from UMLObject.

Reimplemented in UMLEntityAttribute.

Definition at line 192 of file attribute.cpp.

References m_InitialValue.


Member Data Documentation

QString UMLAttribute::m_InitialValue [protected]
 

text for the attribute's initial value.

Definition at line 126 of file attribute.h.

Referenced by copyInto(), getInitialValue(), load(), saveToXMI(), setInitialValue(), toString(), and UMLAttribute().


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:06 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003