umbrello/umbrello
CodeGenerationPolicy Class Reference
class CodeGenerationPolicy This class describes the code generation policy for this project. More...
#include <codegenerationpolicy.h>

Detailed Description
class CodeGenerationPolicy This class describes the code generation policy for this project.
Note that as the code gen policy may be the 'default' policy, it may not be coupled with a code generator.
Definition at line 29 of file codegenerationpolicy.h.
Member Enumeration Documentation
Definition at line 50 of file codegenerationpolicy.h.
Definition at line 49 of file codegenerationpolicy.h.
Definition at line 47 of file codegenerationpolicy.h.
Definition at line 48 of file codegenerationpolicy.h.
OverwritePolicy can have the following values
- Ok: if there is a file named the same as what you want to name your output file, you can overwrite the old file.
- Ask:if there is a file named the same as what you want to name your output file, you should ask the User what to do, and give him the option to overwrite the file write the code to a different file, or to abort the generation of this class.
- Never: you cannot overwrite any files. Generates a new file name like "fileName1.h", "fileName2.h" until you find an appropriate name.
- Cancel: Do not output anything. This is only set if the user chooses Apply to All Remaining Files and clicks on Do not Output in the Ask dialog
Definition at line 46 of file codegenerationpolicy.h.
Constructor & Destructor Documentation
| CodeGenerationPolicy::CodeGenerationPolicy | ( | CodeGenerationPolicy * | clone | ) |
Constructor.
- Parameters:
-
clone generation policy to clone
Definition at line 41 of file codegenerationpolicy.cpp.
| CodeGenerationPolicy::CodeGenerationPolicy | ( | ) |
Constructor.
Definition at line 52 of file codegenerationpolicy.cpp.
| CodeGenerationPolicy::~CodeGenerationPolicy | ( | ) | [virtual] |
Destructor.
Definition at line 60 of file codegenerationpolicy.cpp.
Member Function Documentation
| void CodeGenerationPolicy::calculateIndentation | ( | ) | [protected] |
Calculate the indentation.
Definition at line 308 of file codegenerationpolicy.cpp.
| CodeGenerationPolicyPage * CodeGenerationPolicy::createPage | ( | QWidget * | pWidget = 0, |
|
| const char * | name = 0 | |||
| ) | [virtual] |
Create a new dialog interface for this object.
- Returns:
- dialog object
Definition at line 413 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::emitModifiedCodeContentSig | ( | ) |
Emits the signal 'ModifiedCodeContent'.
Definition at line 421 of file codegenerationpolicy.cpp.
| Uml::Visibility::Value CodeGenerationPolicy::getAssociationFieldScope | ( | ) |
Get the value of m_associationFieldScope.
- Returns:
- the Visibility value of m_associationFieldScope
Definition at line 404 of file codegenerationpolicy.cpp.
| Uml::Visibility::Value CodeGenerationPolicy::getAttributeAccessorScope | ( | ) |
Get the value of m_attributeAccessorScope.
- Returns:
- the Visibility value of m_attributeAccessorScope
Definition at line 385 of file codegenerationpolicy.cpp.
| bool CodeGenerationPolicy::getAutoGenerateConstructors | ( | ) |
Get the value of m_autoGenerateConstructors.
- Returns:
- the value of m_autoGenerateConstructors
Definition at line 366 of file codegenerationpolicy.cpp.
| bool CodeGenerationPolicy::getCodeVerboseDocumentComments | ( | ) | const |
Get the value of m_codeVerboseDocumentComments Whether or not verbose code commenting for documentation is desired.
If true, documentation for various code will be written even if no code would normally be created at that point in the file.
- Returns:
- the value of m_codeVerboseDocumentComments
Definition at line 148 of file codegenerationpolicy.cpp.
| bool CodeGenerationPolicy::getCodeVerboseSectionComments | ( | ) | const |
Get the value of m_codeVerboseSectionComments Whether or not verbose code commenting for sections is desired.
If true, comments for sections will be written even if the section is empty.
- Returns:
- the flag whether verbose code commenting for sections is desired
Definition at line 123 of file codegenerationpolicy.cpp.
| CodeGenerationPolicy::CommentStyle CodeGenerationPolicy::getCommentStyle | ( | ) |
Get the value of m_commentStyle.
- Returns:
- the comment style
Definition at line 100 of file codegenerationpolicy.cpp.
Gets the heading file (as a string) to be inserted at the beginning of the generated file.
you give the file type as parameter and get the string. if fileName starts with a period (.) then fileName is the extension (.cpp, .h, .java) if fileName starts with another character you are requesting a specific file (mylicensefile.txt). The files can have parameters which are denoted by parameter%.
current parameters are author% date% time% filepath%
Definition at line 541 of file codegenerationpolicy.cpp.
| QString CodeGenerationPolicy::getHeadingFileDir | ( | ) | const |
Get the value of m_headingFileDir location of the header file template.
- Returns:
- the value of m_headingFileDir
Definition at line 168 of file codegenerationpolicy.cpp.
| bool CodeGenerationPolicy::getIncludeHeadings | ( | ) | const |
Get the value of m_includeHeadings.
- Returns:
- the value of m_includeHeadings
Definition at line 187 of file codegenerationpolicy.cpp.
| QString CodeGenerationPolicy::getIndentation | ( | ) | const |
Utility method to get the amount (and type of whitespace) to indent with.
- Returns:
- the value of the indentation
Definition at line 300 of file codegenerationpolicy.cpp.
| int CodeGenerationPolicy::getIndentationAmount | ( | ) |
Get indentation level units.
Definition at line 291 of file codegenerationpolicy.cpp.
| CodeGenerationPolicy::IndentationType CodeGenerationPolicy::getIndentationType | ( | ) |
Get the value of m_indentationType.
Definition at line 269 of file codegenerationpolicy.cpp.
| CodeGenerationPolicy::NewLineType CodeGenerationPolicy::getLineEndingType | ( | ) |
Get the value of m_lineEndingType What line ending characters to use.
- Returns:
- the value of m_lineEndingType
Definition at line 240 of file codegenerationpolicy.cpp.
| CodeGenerationPolicy::ModifyNamePolicy CodeGenerationPolicy::getModifyPolicy | ( | ) | const |
Get the value of m_modifyPolicy.
- Returns:
- the value of m_modifyPolicy
Definition at line 347 of file codegenerationpolicy.cpp.
| QString CodeGenerationPolicy::getNewLineEndingChars | ( | ) | const |
Utility function to get the actual characters.
- Returns:
- the line ending characters
Definition at line 249 of file codegenerationpolicy.cpp.
| QDir CodeGenerationPolicy::getOutputDirectory | ( | ) |
Get the value of m_outputDirectory location of where output files will go.
- Returns:
- the value of m_outputDirectory
Definition at line 207 of file codegenerationpolicy.cpp.
| CodeGenerationPolicy::OverwritePolicy CodeGenerationPolicy::getOverwritePolicy | ( | ) | const |
Get the value of m_overwritePolicy Policy of how to deal with overwriting existing files.
Allowed values are "ask", "yes" and "no".
- Returns:
- the overwrite policy
Definition at line 81 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::modifiedCodeContent | ( | ) | [signal] |
| void CodeGenerationPolicy::setAssociationFieldScope | ( | Uml::Visibility::Value | var | ) |
Set the value of m_associationFieldScope.
- Parameters:
-
var the new value
Definition at line 394 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setAttributeAccessorScope | ( | Uml::Visibility::Value | var | ) |
Set the value of m_attributeAccessorScope.
- Parameters:
-
var the new value
Definition at line 375 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setAutoGenerateConstructors | ( | bool | var | ) |
Set the value of m_autoGenerateConstructors.
- Parameters:
-
var the new value
Definition at line 356 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setCodeVerboseDocumentComments | ( | bool | new_var | ) |
Set the value of m_codeVerboseDocumentComments Whether or not verbose code commenting for documentation is desired.
If true, documentation for various code will be written even if no code would normally be created at that point in the file.
- Parameters:
-
new_var the new value to set verbose code commenting
Definition at line 135 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setCodeVerboseSectionComments | ( | bool | new_var | ) |
Set the value of m_codeVerboseSectionComments Whether or not verbose code commenting for sections is desired.
If true, comments for sections will be written even if the section is empty.
- Parameters:
-
new_var the new value of m_codeVerboseSectionComments
Definition at line 111 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setCommentStyle | ( | CommentStyle | new_var | ) |
Set the value of m_commentStyle.
- Parameters:
-
new_var the new value of m_commentStyle
Definition at line 90 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setDefaults | ( | bool | emitUpdateSignal = true |
) | [virtual] |
set the defaults from a config file
Definition at line 460 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setDefaults | ( | CodeGenerationPolicy * | defaults, | |
| bool | emitUpdateSignal = true | |||
| ) | [virtual] |
set the defaults from a config file
Definition at line 430 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setHeadingFileDir | ( | const QString & | path | ) |
Set the value of m_headingFileDir location of the header file template.
- Parameters:
-
path the new value of m_headingFileDir
Definition at line 158 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setIncludeHeadings | ( | bool | new_var | ) |
Set the value of m_includeHeadings.
- Parameters:
-
new_var the new value of m_includeHeadings
Definition at line 177 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setIndentationAmount | ( | int | amount | ) |
Set how many units to indent for each indentation level.
- Parameters:
-
amount the amount of indentation units
Definition at line 278 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setIndentationType | ( | IndentationType | new_var | ) |
Set the value of m_indentationType The amount and type of whitespace to indent with.
- Parameters:
-
new_var the new value of m_indentationType
Definition at line 259 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setLineEndingType | ( | NewLineType | type | ) |
Set the value of m_lineEndingType What line ending characters to use.
- Parameters:
-
type the new value of m_lineEndingType
Definition at line 217 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setModifyPolicy | ( | ModifyNamePolicy | new_var | ) |
Set the value of m_modifyPolicy.
- Parameters:
-
new_var the new value of m_modifyPolicy
Definition at line 338 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setOutputDirectory | ( | QDir | new_var | ) |
Set the value of m_outputDirectory location of where output files will go.
- Parameters:
-
new_var the new value of m_outputDirectory
Definition at line 197 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setOverwritePolicy | ( | OverwritePolicy | new_var | ) |
Set the value of m_overwritePolicy Policy of how to deal with overwriting existing files.
Allowed values are "ask", "yes" and "no".
- Parameters:
-
new_var the new value of m_overwritePolicy
Definition at line 70 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::writeConfig | ( | ) | [virtual] |
Write Default params.
Definition at line 503 of file codegenerationpolicy.cpp.
Member Data Documentation
QString CodeGenerationPolicy::m_indentation [protected] |
Definition at line 148 of file codegenerationpolicy.h.
QString CodeGenerationPolicy::m_lineEndingChars [protected] |
Definition at line 147 of file codegenerationpolicy.h.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference