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

umbrello/umbrello

CodeClassField Class Reference

class CodeClassField a special type of parameter. More...

#include <codeclassfield.h>

Inheritance diagram for CodeClassField:
Inheritance graph
[legend]

List of all members.

Public Types

enum  ClassFieldType {
  Attribute, PlainAssociation, Self, Aggregation,
  Composition, Unknown_Assoc
}

Signals

void modified ()

Public Member Functions

 CodeClassField (ClassifierCodeDocument *parentDoc, UMLRole *role)
 CodeClassField (ClassifierCodeDocument *parentDoc, UMLAttribute *attrib)
virtual ~CodeClassField ()
bool fieldIsSingleValue ()
CodeAccessorMethod * findMethodByType (CodeAccessorMethod::AccessorType type, int role_id=-1)
void finishInitialization ()
ClassFieldType getClassFieldType () const
CodeClassFieldDeclarationBlock * getDeclarationCodeBlock ()
QString getListObjectType ()
CodeAccessorMethodList getMethodList () const
QString getTypeName ()
bool getWriteOutMethods () const
virtual void loadFromXMI (QDomElement &root)
int maximumListOccurances ()
int minimumListOccurances ()
bool parentIsAttribute () const
virtual void saveToXMI (QDomDocument &doc, QDomElement &root)
void setWriteOutMethods (bool val)
virtual void synchronize ()
void updateContent ()

Protected Member Functions

bool addMethod (CodeAccessorMethod *add)
QString cleanName (const QString &name)
QString fixInitialStringDeclValue (const QString &val, const QString &type)
QString getUMLObjectName (UMLObject *obj)
bool removeMethod (CodeAccessorMethod *remove)
void setListClassName (const QString &className)
void setParentUMLObject (UMLObject *obj)

Detailed Description

class CodeClassField a special type of parameter.

. occurs on class declarations.

Definition at line 29 of file codeclassfield.h.


Member Enumeration Documentation

enum CodeClassField::ClassFieldType
Enumerator:
Attribute 
PlainAssociation 
Self 
Aggregation 
Composition 
Unknown_Assoc 

Definition at line 34 of file codeclassfield.h.


Constructor & Destructor Documentation

CodeClassField::CodeClassField ( ClassifierCodeDocument *  parentDoc,
UMLAttribute *  attrib 
)

Constructors.

Definition at line 38 of file codeclassfield.cpp.

CodeClassField::CodeClassField ( ClassifierCodeDocument *  parentDoc,
UMLRole *  role 
)

Definition at line 31 of file codeclassfield.cpp.

CodeClassField::~CodeClassField (  )  [virtual]

Empty Destructor.

Definition at line 45 of file codeclassfield.cpp.


Member Function Documentation

bool CodeClassField::addMethod ( CodeAccessorMethod *  add  )  [protected]

Add a Method object to the m_methodVector List.

Definition at line 149 of file codeclassfield.cpp.

QString CodeClassField::cleanName ( const QString &  name  )  [protected]

A little utility method to make life easier for code document programmers.

Definition at line 366 of file codeclassfield.cpp.

bool CodeClassField::fieldIsSingleValue (  ) 

Determine whether the parent object in this classfield indicates that it is a single variable or a List (Vector).

One day this will be done correctly with special multiplicity object.

Definition at line 597 of file codeclassfield.cpp.

CodeAccessorMethod * CodeClassField::findMethodByType ( CodeAccessorMethod::AccessorType  type,
int  role_id = -1 
)

Utility method to allow finding particular accessor method of this code class field by its type identifier.

Definition at line 407 of file codeclassfield.cpp.

void CodeClassField::finishInitialization (  ) 

Finish off initializations of the object.

This is necessary as a separate method because we cannot call virtual methods that are reimplemented in a language specific class during our own construction (the own object is not finished being constructed and therefore the C++ dispatch mechanism does not yet work as expected.)

Definition at line 640 of file codeclassfield.cpp.

QString CodeClassField::fixInitialStringDeclValue ( const QString &  val,
const QString &  type 
) [protected]

Another utility method to make life easier for code document programmers this one fixes the initial declared value of string attributes so that if it is empty or lacking quotations, it comes out as "".

Definition at line 376 of file codeclassfield.cpp.

CodeClassField::ClassFieldType CodeClassField::getClassFieldType (  )  const

Get the type of classfield this is.

Definition at line 128 of file codeclassfield.cpp.

CodeClassFieldDeclarationBlock * CodeClassField::getDeclarationCodeBlock (  ) 

Return the declaration statement for this class field object.

will be empty until this (abstract) class is inherited in elsewhere.

Definition at line 213 of file codeclassfield.cpp.

QString CodeClassField::getListObjectType (  ) 

Definition at line 105 of file codeclassfield.cpp.

CodeAccessorMethodList CodeClassField::getMethodList (  )  const

Get the list of Method objects held by m_methodVector.

Returns:
QPtrList<CodeMethodBlock *> list of Method objects held by m_methodVector

Definition at line 183 of file codeclassfield.cpp.

QString CodeClassField::getTypeName (  )  [virtual]

Get the value of m_dialog.

Returns:
the value of m_dialog

Reimplemented from CodeParameter.

Reimplemented in DCodeClassField, JavaCodeClassField, and RubyCodeClassField.

Definition at line 87 of file codeclassfield.cpp.

QString CodeClassField::getUMLObjectName ( UMLObject *  obj  )  [protected]

Definition at line 141 of file codeclassfield.cpp.

bool CodeClassField::getWriteOutMethods (  )  const

Determine if we will *allow* methods to be viewable.

this flag is often used to toggle autogeneration of accessor methods in the code class field.

Definition at line 193 of file codeclassfield.cpp.

void CodeClassField::loadFromXMI ( QDomElement &  root  )  [virtual]

Load params from the appropriate XMI element node.

Definition at line 221 of file codeclassfield.cpp.

int CodeClassField::maximumListOccurances (  ) 

Find the maximum number of things that can occur in an association If mistakenly called on attribute CF's the default value of is "1" is returned.

If the association (role) CF doesn't have a multiplicty or has a "*" specified then '-1' (unbounded) is returned.

Definition at line 342 of file codeclassfield.cpp.

int CodeClassField::minimumListOccurances (  ) 

Find the minimum number of things that can occur in an association If mistakenly called on attribute CF's the default value of is "0" is returned.

Similarly, if the association (role) CF doesn't have a multiplicty 0 is returned.

Definition at line 318 of file codeclassfield.cpp.

void CodeClassField::modified (  )  [signal]
bool CodeClassField::parentIsAttribute (  )  const

Get the value of m_isAbstract.

Returns:
the value of m_isAbstract

Definition at line 119 of file codeclassfield.cpp.

bool CodeClassField::removeMethod ( CodeAccessorMethod *  remove  )  [protected]

Remove a Method object from m_methodVector List.

Definition at line 170 of file codeclassfield.cpp.

void CodeClassField::saveToXMI ( QDomDocument &  doc,
QDomElement &  root 
) [virtual]

Save the XMI representation of this object.

Definition at line 303 of file codeclassfield.cpp.

void CodeClassField::setListClassName ( const QString &  className  )  [protected]
void CodeClassField::setParentUMLObject ( UMLObject *  obj  )  [protected]

Set the parent UMLobject appropriately.

Definition at line 67 of file codeclassfield.cpp.

void CodeClassField::setWriteOutMethods ( bool  val  ) 

Determine if we will *allow* methods to be viewable.

this flag is often used to toggle autogeneration of accessor methods in the code class field.

Definition at line 203 of file codeclassfield.cpp.

void CodeClassField::synchronize (  )  [virtual]

Force the synchronization of the content (methods and declarations) of this class field.

Definition at line 393 of file codeclassfield.cpp.

void CodeClassField::updateContent (  )  [virtual]

Updates the status of the accessor methods as to whether or not they should be written out.

Implements CodeParameter.

Definition at line 499 of file codeclassfield.cpp.


The documentation for this class was generated from the following files:
  • codeclassfield.h
  • codeclassfield.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