umbrello/umbrello
javaclassifiercodedocument.cpp
Go to the documentation of this file.
256 uWarning()<<" loadChildBlocks : unable to initialize any child blocks in doc: "<<test->getFileName()<<" "<<this;
260 uWarning()<<" loadChildBlocks : unable to initialize any child blocks in Hblock: "<<hb->getTag()<<" "<<this;
319 CodeClassFieldList staticAttribClassFields = getSpecificClassFields (CodeClassField::Attribute, true);
320 CodeClassFieldList attribClassFields = getSpecificClassFields (CodeClassField::Attribute, false);
323 CodeClassFieldList plainAssocClassFields = getSpecificClassFields (CodeClassField::PlainAssociation);
324 CodeClassFieldList aggregationClassFields = getSpecificClassFields (CodeClassField::Aggregation);
325 CodeClassFieldList compositionClassFields = getSpecificClassFields (CodeClassField::Composition);
334 QString endLine = commonPolicy->getNewLineEndingChars(); // a shortcut..so we don't have to call this all the time
345 QString packageText = getPackage().isEmpty() ? "" : QString(QLatin1String("package ")+pkgs+QLatin1Char(';')+endLine);
346 CodeBlockWithComments * pblock = addOrUpdateTaggedCodeBlockWithComments("packages", packageText, "", 0, false);
389 CodeBlockWithComments * iblock = addOrUpdateTaggedCodeBlockWithComments("imports", importStatement, "", 0, false);
454 HierarchicalCodeBlock * fieldDeclBlock = myClassDeclCodeBlock->getHierarchicalCodeBlock("fieldsDecl", "Fields", 1);
475 HierarchicalCodeBlock * methodsBlock = myClassDeclCodeBlock->getHierarchicalCodeBlock("methodsBlock", "Methods", 1);
489 HierarchicalCodeBlock * constBlock = methodsBlock->getHierarchicalCodeBlock("constructorMethods", "Constructors", 1);
505 constBlock->addOrUpdateTaggedCodeBlockWithComments("emptyconstructor", emptyConstStatement, "Empty Constructor", 1, false);
517 HierarchicalCodeBlock * accessorBlock = methodsBlock->getHierarchicalCodeBlock("accessorMethods", "Accessor Methods", 1);
528 HierarchicalCodeBlock * staticAccessors = accessorBlock->getHierarchicalCodeBlock("staticAccessorMethods", "", 1);
534 HierarchicalCodeBlock * regularAccessors = accessorBlock->getHierarchicalCodeBlock("regularAccessorMethods", "", 1);
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: codeblock.cpp:91
CodeClassFieldList getSpecificClassFields(CodeClassField::ClassFieldType cfType)
Get a list of codeclassifier objects held by this classifiercodedocument that meet the passed criteri...
Definition: classifiercodedocument.cpp:54
This class contains the non-graphical information required for a UML Package.
Definition: package.h:32
virtual CodeBlockWithComments * newCodeBlockWithComments()
Create a new CodeBlockWithComments object belonging to this CodeDocument.
Definition: codedocument.cpp:465
virtual CodeBlock * newCodeBlock()
Create a new CodeBlock object belonging to this CodeDocument.
Definition: codedocument.cpp:456
QString getJavaClassName(const QString &name)
Definition: javaclassifiercodedocument.cpp:90
TextBlock * findCodeClassFieldTextBlockByTag(const QString &tag)
Find a specific textblock held by any code class field in this document by its tag.
Definition: classifiercodedocument.cpp:766
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
Definition: codeclassfield.h:34
class ClassifierCodeDocument A CodeDocument which represents a UMLClassifier (e.g.
Definition: classifiercodedocument.h:33
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: codecomment.cpp:42
the content was generated by code generation itself
Definition: codeblock.h:28
QString getNewLineEndingChars() const
Utility function to get the actual characters.
Definition: codegenerationpolicy.cpp:248
CodeClassFieldList * getCodeClassFieldList()
Get the list of CodeClassField objects held by m_classfieldVector.
Definition: classifiercodedocument.cpp:262
virtual void loadFromXMI(QDomElement &root)
load params from the appropriate XMI element node.
Definition: javaclassdeclarationblock.cpp:43
virtual ~JavaClassifierCodeDocument()
Empty Destructor.
Definition: javaclassifiercodedocument.cpp:44
class CodeGenerationPolicy This class describes the code generation policy for this project...
Definition: codegenerationpolicy.h:29
Definition: codeclassfield.h:34
virtual HierarchicalCodeBlock * newHierarchicalCodeBlock()
Create a new HierarchicalCodeBlock object belonging to this CodeDocument.
Definition: codedocument.cpp:474
ContentType contentType() const
Get the value of m_contentType specifies whether the content (text) of this object was generated by t...
Definition: codeblock.cpp:54
UMLClassifier * getParentClassifier()
Get the value of m_parentclassifier.
Definition: classifiercodedocument.cpp:271
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:872
virtual bool addTextBlock(TextBlock *add_object)
Add a TextBlock object to the m_textblockVector List.
Definition: codegenobjectwithtextblocks.cpp:57
void addCodeClassFieldMethods(CodeClassFieldList &list)
Utility method to add accessormethods in this object.
Definition: hierarchicalcodeblock.cpp:215
void resetTextBlocks()
Reset/clear our inventory of textblocks in this document.
Definition: javaclassifiercodedocument.cpp:278
void updateContent()
Update the content of this code document.
Definition: javaclassifiercodedocument.cpp:296
bool isLifeOperation()
Shortcut for (isConstructorOperation() || isDestructorOperation()).
Definition: operation.cpp:395
bool getCodeVerboseDocumentComments() const
Get the value of m_codeVerboseDocumentComments Whether or not verbose code commenting for documentati...
Definition: codegenerationpolicy.cpp:147
QString getPath()
Get the value of the path to this code document.
Definition: javaclassifiercodedocument.cpp:72
class CodeBlockWithComments A very common type of text block in any type of code. ...
Definition: codeblockwithcomments.h:24
bool parentIsClass()
Return if the parent classifier is a class.
Definition: classifiercodedocument.cpp:405
QString capitalizeFirstLetter(const QString &string)
Return the input string with the first letter capitalized.
Definition: codegen_utils.cpp:421
virtual void loadFromXMI(QDomElement &root)
load params from the appropriate XMI element node.
Definition: hierarchicalcodeblock.cpp:269
Definition: codeoperation.h:23
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: codeoperation.cpp:83
void resetTextBlocks()
Reset/clear our inventory of textblocks in this document.
Definition: codedocument.cpp:337
bool parentIsInterface()
Return if the parent classifier is an interface.
Definition: classifiercodedocument.cpp:413
Definition: javacodeoperation.h:21
void setWriteOutText(bool write)
Set the value of m_writeOutText Whether or not to include the text of this TextBlock into a file...
Definition: textblock.cpp:131
bool getAutoGenerateAttribAccessors()
Get the value of m_autoGenerateAttribAccessors.
Definition: javacodegenerationpolicy.cpp:75
Definition: codeclassfield.h:34
void setWriteOutMethods(bool val)
Determine if we will allow methods to be viewable.
Definition: codeclassfield.cpp:210
bool addTextBlock(TextBlock *add_object)
Add a TextBlock object to the m_textblockVector List.
Definition: hierarchicalcodeblock.cpp:93
bool addCodeOperation(CodeOperation *op)
Add a code operation to this java classifier code document.
Definition: javaclassifiercodedocument.cpp:117
JavaClassifierCodeDocument(UMLClassifier *classifier)
Constructor.
Definition: javaclassifiercodedocument.cpp:38
static void findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
Finds all classes in the current document to which objects of class c are in some way related...
Definition: codegenerator.cpp:682
CodeGenerationPolicy * commonPolicy() const
Returns the default code generation policy.
Definition: uml.cpp:2132
bool getAutoGenerateConstructors()
Get the value of m_autoGenerateConstructors.
Definition: codegenerationpolicy.cpp:365
virtual HierarchicalCodeBlock * getHierarchicalCodeBlock(const QString &tag, const QString &comment, int indentLevel)
Will get a hierarchicalcodeblock from the document with given tag.
Definition: codegenobjectwithtextblocks.cpp:183
UMLOperation * getParentOperation()
Add a Parameter object to the m_parameterVector List.
Definition: codeoperation.cpp:64
virtual void loadChildTextBlocksFromNode(QDomElement &root)
Need to overwrite this for java since we need to pick up the java class declaration block...
Definition: javaclassifiercodedocument.cpp:130
UMLObject * findObjectById(Uml::ID::Type id)
Used to find a reference to a UMLObject by its ID.
Definition: umldoc.cpp:766
Definition: hierarchicalcodeblock.h:22
The fundemental unit of text within an output file containing code.
Definition: textblock.h:24
CodeBlockWithComments * addOrUpdateTaggedCodeBlockWithComments(const QString &tag, const QString &text, const QString &ctext, int indentLevel, bool forceUserBlockUpdate)
Allows the user to either add a code block with comments to the end of the list of text blocks in thi...
Definition: codegenobjectwithtextblocks.cpp:287
QString package(const QString &separator=QString(), bool includeRoot=false)
Return the package(s) in which this UMLObject is contained as a text.
Definition: umlobject.cpp:603
void declareClassFields(CodeClassFieldList &list, CodeGenObjectWithTextBlocks *parent)
Add declaration blocks for the passed classfields.
Definition: classifiercodedocument.cpp:373
bool getAutoGenerateAssocAccessors()
Get the value of m_autoGenerateAssocAccessors.
Definition: javacodegenerationpolicy.cpp:84
void updateContent()
Update the start/end text of this codeblock.
Definition: javaclassdeclarationblock.cpp:51
UMLOperationList getOpList(bool includeInherited=false, UMLClassifierSet *alreadyTraversed=0)
Return a list of operations for the Classifier.
Definition: classifier.cpp:960
JavaCodeGenerationPolicy * getJavaPolicy()
Get the dialog widget which allows user interaction with the object parameters.
Definition: javaclassifiercodedocument.cpp:49
bool hasObjectVectorClassFields()
Tell if any of the accessor classfields will be of lists of objects.
Definition: classifiercodedocument.cpp:124
static QString cleanName(const QString &name)
Replaces spaces with underscores and capitalises as defined in m_modname.
Definition: codegenerator.cpp:609
Base class for programming language specific code generation policy extensions.
Definition: codegenpolicyext.h:28
bool hasClassFields()
Does this object have any classfields declared?
Definition: classifiercodedocument.cpp:147
void setFileExtension(const QString &new_var)
Set the value of m_fileExtension.
Definition: codedocument.cpp:72
QString getPackage() const
Get the value of the package of this code document.
Definition: codedocument.cpp:122
Definition: umlobject.h:54
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: codeblockwithcomments.cpp:96
virtual void synchronize()
Cause this classifier code document to synchronize to current policy.
Definition: classifiercodedocument.cpp:475
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:05:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:05:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.