umbrello
2.39.2
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <codegenerationpolicy.h>
Public Types | |
enum | OverwritePolicy { Ok =0 , Ask , Never , Cancel } |
enum | ModifyNamePolicy { No =0 , Underscore , Capitalise } |
enum | WriteSectionCommentsPolicy { None =0 , WhenNonEmpty , Always } |
enum | NewLineType { UNIX =0 , DOS , MAC } |
enum | IndentationType { NONE =0 , TAB , SPACE } |
enum | CommentStyle { SingleLine =0 , MultiLine } |
Signals | |
void | modifiedCodeContent () |
Protected Member Functions | |
void | calculateIndentation () |
Protected Attributes | |
QString | m_lineEndingChars |
QString | m_indentation |
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.
OverwritePolicy can have the following values
Enumerator | |
---|---|
Ok | |
Ask | |
Never | |
Cancel |
|
explicit |
Constructor.
clone | generation policy to clone |
CodeGenerationPolicy::CodeGenerationPolicy | ( | ) |
Constructor.
|
virtual |
Destructor
|
protected |
Calculate the indentation.
|
virtual |
Create a new dialog interface for this object.
void CodeGenerationPolicy::emitModifiedCodeContentSig | ( | ) |
Emits the signal 'ModifiedCodeContent'.
Uml::Visibility::Enum CodeGenerationPolicy::getAssociationFieldScope | ( | ) |
Get the value of m_associationFieldScope
Uml::Visibility::Enum CodeGenerationPolicy::getAttributeAccessorScope | ( | ) |
Get the value of m_attributeAccessorScope
bool CodeGenerationPolicy::getAutoGenerateConstructors | ( | ) |
Get the value of m_autoGenerateConstructors
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.
CodeGenerationPolicy::CommentStyle CodeGenerationPolicy::getCommentStyle | ( | ) |
Get the value of m_commentStyle
QString CodeGenerationPolicy::getHeadingFile | ( | const QString & | str | ) |
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%
QString CodeGenerationPolicy::getHeadingFileDir | ( | ) | const |
Get the value of m_headingFileDir location of the header file template.
bool CodeGenerationPolicy::getIncludeHeadings | ( | ) | const |
Get the value of m_includeHeadings
QString CodeGenerationPolicy::getIndentation | ( | ) | const |
Utility method to get the amount (and type of whitespace) to indent with.
int CodeGenerationPolicy::getIndentationAmount | ( | ) |
Get indentation level units.
CodeGenerationPolicy::IndentationType CodeGenerationPolicy::getIndentationType | ( | ) |
Get the value of m_indentationType
CodeGenerationPolicy::NewLineType CodeGenerationPolicy::getLineEndingType | ( | ) |
Get the value of m_lineEndingType What line ending characters to use.
CodeGenerationPolicy::ModifyNamePolicy CodeGenerationPolicy::getModifyPolicy | ( | ) | const |
Get the value of m_modifyPolicy
QString CodeGenerationPolicy::getNewLineEndingChars | ( | ) | const |
Utility function to get the actual characters.
QDir CodeGenerationPolicy::getOutputDirectory | ( | ) |
Get the value of m_outputDirectory location of where output files will go.
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".
CodeGenerationPolicy::WriteSectionCommentsPolicy CodeGenerationPolicy::getSectionCommentsPolicy | ( | ) | const |
Get the value of Settings::optionState().codeGenerationState.writeSectionComments Whether or not verbose code commenting for sections is desired. If the value is Always, comments for sections will be written even if the section is empty.
|
signal |
void CodeGenerationPolicy::setAssociationFieldScope | ( | Uml::Visibility::Enum | var | ) |
Set the value of m_associationFieldScope
var | the new value |
void CodeGenerationPolicy::setAttributeAccessorScope | ( | Uml::Visibility::Enum | var | ) |
Set the value of m_attributeAccessorScope
var | the new value |
void CodeGenerationPolicy::setAutoGenerateConstructors | ( | bool | var | ) |
Set the value of m_autoGenerateConstructors
var | the new value |
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.
new_var | the new value to set verbose code commenting |
void CodeGenerationPolicy::setCommentStyle | ( | CommentStyle | new_var | ) |
Set the value of m_commentStyle
new_var | the new value of m_commentStyle |
|
virtual |
set the defaults from a config file
|
virtual |
set the defaults from a config file
void CodeGenerationPolicy::setHeadingFileDir | ( | const QString & | path | ) |
Set the value of m_headingFileDir location of the header file template.
path | the new value of m_headingFileDir |
void CodeGenerationPolicy::setIncludeHeadings | ( | bool | new_var | ) |
Set the value of m_includeHeadings
new_var | the new value of m_includeHeadings |
void CodeGenerationPolicy::setIndentationAmount | ( | int | amount | ) |
Set how many units to indent for each indentation level.
amount | the amount of indentation units |
void CodeGenerationPolicy::setIndentationType | ( | IndentationType | new_var | ) |
Set the value of m_indentationType The amount and type of whitespace to indent with.
new_var | the new value of m_indentationType |
void CodeGenerationPolicy::setLineEndingType | ( | NewLineType | type | ) |
Set the value of m_lineEndingType What line ending characters to use.
type | the new value of m_lineEndingType |
void CodeGenerationPolicy::setModifyPolicy | ( | ModifyNamePolicy | new_var | ) |
Set the value of m_modifyPolicy
new_var | the new value of m_modifyPolicy |
void CodeGenerationPolicy::setOutputDirectory | ( | QDir | new_var | ) |
Set the value of m_outputDirectory location of where output files will go.
new_var | the new value of m_outputDirectory |
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".
new_var | the new value of m_overwritePolicy |
void CodeGenerationPolicy::setSectionCommentsPolicy | ( | WriteSectionCommentsPolicy | new_var | ) |
Set the value of Settings::optionState().codeGenerationState.writeSectionComments Whether or not verbose code commenting for sections is desired. If the value is Always, comments for sections will be written even if the section is empty.
new_var | the new WriteSectionCommentsPolicy to set |
|
virtual |
Write Default params.
|
protected |
|
protected |