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

umbrello/umbrello

CPPCodeGenerator Class Reference

#include <cppcodegenerator.h>

Inheritance diagram for CPPCodeGenerator:

Inheritance graph
[legend]

List of all members.


Detailed Description

Definition at line 31 of file cppcodegenerator.h.


Public Slots

virtual void checkAddUMLObject (UMLObject *obj)
virtual void checkRemoveUMLObject (UMLObject *obj)
virtual void syncCodeToDocument ()

Public Member Functions

 CPPCodeGenerator ()
virtual ~CPPCodeGenerator ()
void setCreateProjectMakefile (bool new_var)
bool getCreateProjectMakefile ()
QString fixTypeName (const QString &string)
bool addHeaderCodeDocument (CPPHeaderCodeDocument *doc)
bool removeHeaderCodeDocument (CPPHeaderCodeDocument *remove_object)
Uml::Programming_Language getLanguage ()
CodeDocument * newClassifierCodeDocument (UMLClassifier *classifier)
CPPHeaderCodeDocument * newHeaderClassifierCodeDocument (UMLClassifier *classifier)
virtual CodeViewerDialog * getCodeViewerDialog (QWidget *parent, CodeDocument *doc, Settings::CodeViewerState state)
virtual void writeCodeToFile ()
virtual void writeCodeToFile (UMLClassifierList &list)
QStringList defaultDatatypes ()
virtual void saveToXMI (QDomDocument &doc, QDomElement &root)
virtual const QStringList reservedKeywords () const
virtual void createDefaultStereotypes ()
void initFromParentDocument ()

Static Public Attributes

static const bool DEFAULT_BUILD_MAKEFILE = false

Protected Member Functions

CPPMakefileCodeDocument * newMakefileCodeDocument ()
CPPHeaderCodeDocument * findHeaderCodeDocumentByClassifier (UMLClassifier *classifier)

Constructor & Destructor Documentation

CPPCodeGenerator::CPPCodeGenerator (  ) 

Basic Constructor.

Definition at line 40 of file cppcodegenerator.cpp.

CPPCodeGenerator::~CPPCodeGenerator (  )  [virtual]

Empty Destructor.

Definition at line 44 of file cppcodegenerator.cpp.


Member Function Documentation

void CPPCodeGenerator::setCreateProjectMakefile ( bool  buildIt  ) 

Set the value of m_createMakefile.

Parameters:
new_var the new value of m_createMakefile

Definition at line 68 of file cppcodegenerator.cpp.

bool CPPCodeGenerator::getCreateProjectMakefile (  ) 

Get the value of m_createMakefile.

Returns:
the value of m_createMakefile

Definition at line 79 of file cppcodegenerator.cpp.

QString CPPCodeGenerator::fixTypeName ( const QString &  string  ) 

Definition at line 157 of file cppcodegenerator.cpp.

bool CPPCodeGenerator::addHeaderCodeDocument ( CPPHeaderCodeDocument *  doc  ) 

Add a header CodeDocument object from m_headercodedocumentVector List.

Definition at line 83 of file cppcodegenerator.cpp.

bool CPPCodeGenerator::removeHeaderCodeDocument ( CPPHeaderCodeDocument *  remove_object  ) 

Remove a header CodeDocument object from m_headercodedocumentVector List.

Definition at line 107 of file cppcodegenerator.cpp.

Uml::Programming_Language CPPCodeGenerator::getLanguage (  )  [virtual]

returns "Cpp"

returns "C++"

Implements CodeGenerator.

Definition at line 60 of file cppcodegenerator.cpp.

CodeDocument * CPPCodeGenerator::newClassifierCodeDocument ( UMLClassifier *  classifier  )  [virtual]

Returns:
ClassifierCodeDocument

Parameters:
classifier The classifier for which the CodeDocument is to be created

Implements CodeGenerator.

Definition at line 247 of file cppcodegenerator.cpp.

CPPHeaderCodeDocument * CPPCodeGenerator::newHeaderClassifierCodeDocument ( UMLClassifier *  classifier  ) 

Definition at line 254 of file cppcodegenerator.cpp.

CodeViewerDialog * CPPCodeGenerator::getCodeViewerDialog ( QWidget *  parent,
CodeDocument *  doc,
Settings::CodeViewerState  state 
) [virtual]

Get the editing dialog for this code document.

Reimplemented from CodeGenerator.

Definition at line 120 of file cppcodegenerator.cpp.

void CPPCodeGenerator::writeCodeToFile (  )  [virtual]

Write out all code documents to file as appropriate.

Reimplemented from CodeGenerator.

Definition at line 203 of file cppcodegenerator.cpp.

void CPPCodeGenerator::writeCodeToFile ( UMLClassifierList &  list  )  [virtual]

This method is here to provide class wizard the ability to write out only those classes which are selected by the user.

Reimplemented from CodeGenerator.

Definition at line 215 of file cppcodegenerator.cpp.

QStringList CPPCodeGenerator::defaultDatatypes (  )  [virtual]

Add C++ primitives as datatypes.

Reimplemented from CodeGenerator.

Definition at line 354 of file cppcodegenerator.cpp.

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

Save the XMI representation of this object.

Reimplemented from CodeGenerator.

Definition at line 163 of file cppcodegenerator.cpp.

const QStringList CPPCodeGenerator::reservedKeywords (  )  const [virtual]

get list of reserved keywords

Reimplemented from CodeGenerator.

Definition at line 358 of file cppcodegenerator.cpp.

void CPPCodeGenerator::createDefaultStereotypes (  )  [virtual]

Add the default stereotypes for c++ (constructor, int etc).

Reimplemented from CodeGenerator.

Definition at line 362 of file cppcodegenerator.cpp.

void CPPCodeGenerator::initFromParentDocument (  )  [virtual]

Overloaded so that we may have both source and header documents for each classifier.

Reimplemented from CodeGenerator.

Definition at line 274 of file cppcodegenerator.cpp.

CPPMakefileCodeDocument * CPPCodeGenerator::newMakefileCodeDocument (  )  [protected]

Returns:
CPPMakeCodeDocument

Returns:
CPPMakefileCodeDocument
Parameters:
this 

Definition at line 265 of file cppcodegenerator.cpp.

CPPHeaderCodeDocument * CPPCodeGenerator::findHeaderCodeDocumentByClassifier ( UMLClassifier *  classifier  )  [protected]

Find a cppheadercodedocument by the given classifier.

Returns:
CPPHeaderCodeDocument
Parameters:
classifier 

Definition at line 236 of file cppcodegenerator.cpp.

void CPPCodeGenerator::checkAddUMLObject ( UMLObject *  obj  )  [virtual, slot]

These 2 functions check for adding or removing objects to the UMLDocument they are need to be overridden here because unlike in the Java (or most other lang) we add 2 types of classifiercodedocument per classifier, e.g.

a "source" and a "header" document.

Reimplemented from CodeGenerator.

Definition at line 302 of file cppcodegenerator.cpp.

void CPPCodeGenerator::checkRemoveUMLObject ( UMLObject *  obj  )  [virtual, slot]

Reimplemented from CodeGenerator.

Definition at line 322 of file cppcodegenerator.cpp.

void CPPCodeGenerator::syncCodeToDocument (  )  [virtual, slot]

Force a synchronize of this code generator, and its present contents, to that of the parent UMLDocument.

"UserGenerated" code will be preserved, but Autogenerated contents will be updated/replaced or removed as is apppropriate.

Need to override parent method because we have header documents to consider too.

Reimplemented from CodeGenerator.

Definition at line 185 of file cppcodegenerator.cpp.


Member Data Documentation

const bool CPPCodeGenerator::DEFAULT_BUILD_MAKEFILE = false [static]

Definition at line 36 of file cppcodegenerator.h.


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