umbrello/umbrello
CodeGenerationPolicy Class Reference
#include <codegenerationpolicy.h>

Detailed Description
class CodeGenerationPolicy This class describes the code generation policy for this project.Definition at line 36 of file codegenerationpolicy.h.
Member Enumeration Documentation
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 52 of file codegenerationpolicy.h.
Constructor & Destructor Documentation
| CodeGenerationPolicy::CodeGenerationPolicy | ( | CodeGenerationPolicy * | clone | ) |
| CodeGenerationPolicy::CodeGenerationPolicy | ( | ) |
Definition at line 57 of file codegenerationpolicy.cpp.
| CodeGenerationPolicy::~CodeGenerationPolicy | ( | ) | [virtual] |
Member Function Documentation
| void CodeGenerationPolicy::setOverwritePolicy | ( | OverwritePolicy | new_var | ) |
Set the value of m_overwritePolicy Policy of how to deal with overwriting existing files.
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
- Parameters:
-
new_var the new value of m_overwritePolicy
- Parameters:
-
new_var the new value of m_overwritePolicy
Definition at line 82 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 "Ok", "Ask", "Never" "Cancel".
- Returns:
- the value of m_overwritePolicy
- Returns:
- the value of m_overwritePolicy
Definition at line 92 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 119 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 value of m_codeVerboseSectionComments
Definition at line 130 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 of m_codeVerboseDocumentComments
Definition at line 141 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 153 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 path of m_headingFileDir new_var the new value of m_headingFileDir
Definition at line 162 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 171 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 179 of file codegenerationpolicy.cpp.
| bool CodeGenerationPolicy::getIncludeHeadings | ( | ) | const |
Get the value of m_includeHeadings.
- Returns:
- the value of m_includeHeadings
Definition at line 188 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.
| 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 206 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setLineEndingType | ( | NewLineType | type | ) |
Set the value of m_lineEndingType What line ending characters to use.
- Parameters:
-
new_var the new value of m_lineEndingType
Definition at line 215 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 237 of file codegenerationpolicy.cpp.
| QString CodeGenerationPolicy::getNewLineEndingChars | ( | ) | const |
Utility function to get the actual characters.
Definition at line 243 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:
-
type the new value of m_indentationType new_var the new value of m_indentationType
Definition at line 252 of file codegenerationpolicy.cpp.
| CodeGenerationPolicy::IndentationType CodeGenerationPolicy::getIndentationType | ( | ) |
| void CodeGenerationPolicy::setIndentationAmount | ( | int | amount | ) |
How many units to indent for each indentation level.
Definition at line 262 of file codegenerationpolicy.cpp.
| int CodeGenerationPolicy::getIndentationAmount | ( | ) |
Definition at line 271 of file codegenerationpolicy.cpp.
| QString CodeGenerationPolicy::getIndentation | ( | ) | const |
Get the string representation of each level of indentation.
Utility method to get the amount (and type of whitespace) to indent with.
The amount and type of whitespace to indent with.
- Returns:
- the value of m_indentationType
the value of the indentation
Definition at line 279 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 306 of file codegenerationpolicy.cpp.
| CodeGenerationPolicy::ModifyNamePolicy CodeGenerationPolicy::getModifyPolicy | ( | ) | const |
Get the value of m_modifyPolicy.
- Returns:
- the value of m_modifyPolicy
Definition at line 314 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setAutoGenerateConstructors | ( | bool | var | ) |
Set the value of m_autoGenerateConstructors.
- Parameters:
-
var the new value new_var the new value
Definition at line 322 of file codegenerationpolicy.cpp.
| bool CodeGenerationPolicy::getAutoGenerateConstructors | ( | ) |
Get the value of m_autoGenerateConstructors.
- Returns:
- value the boolean value of m_autoGenerateConstructors
the value of m_autoGenerateConstructors
Definition at line 331 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 335 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 340 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setAssociationFieldScope | ( | Uml::Visibility::Value | var | ) |
Set the value of m_associationFieldScope.
- Parameters:
-
var the new value
Definition at line 344 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 349 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 357 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 464 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setDefaults | ( | CodeGenerationPolicy * | defaults, | |
| bool | emitUpdateSignal = true | |||
| ) | [virtual] |
set the defaults for this code generator from the passed generator.
Definition at line 369 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::setDefaults | ( | bool | emitUpdateSignal = true |
) | [virtual] |
| void CodeGenerationPolicy::writeConfig | ( | ) | [virtual] |
| void CodeGenerationPolicy::emitModifiedCodeContentSig | ( | ) |
Definition at line 364 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 100 of file codegenerationpolicy.cpp.
| CodeGenerationPolicy::CommentStyle CodeGenerationPolicy::getCommentStyle | ( | ) |
Get the value of m_commentStyle.
- Returns:
- the value of m_commentStyle
Definition at line 109 of file codegenerationpolicy.cpp.
| void CodeGenerationPolicy::modifiedCodeContent | ( | ) | [signal] |
| void CodeGenerationPolicy::calculateIndentation | ( | ) | [protected] |
Definition at line 283 of file codegenerationpolicy.cpp.
Member Data Documentation
QString CodeGenerationPolicy::m_lineEndingChars [protected] |
Definition at line 361 of file codegenerationpolicy.h.
QString CodeGenerationPolicy::m_indentation [protected] |
Definition at line 362 of file codegenerationpolicy.h.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference