projdesign/generation_settings

Tue, 04 Aug 2009 18:12:44 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 04 Aug 2009 18:12:44 +0200
changeset 13
47ce95feb61a
permissions
-rw-r--r--

Include project documents (plan, SRS, design) in distribution.

michael@13 1
michael@13 2 cpp_default_defs
michael@13 3 cpp_h_extension "h" cpp_src_extension "cpp" java_extension "java" php_extension "php" python_extension "py" idl_extension "idl"
michael@13 4
michael@13 5 type_forms 15 // uml cpp java idl cpp_in cpp_out cpp_inout cpp_return
michael@13 6 "void" "void" "void" "void" "${type}" "${type} &" "${type}" "${type}"
michael@13 7 "any" "void *" "Object" "any" "const ${type}" "${type}" "${type} &" "${type}"
michael@13 8 "bool" "bool" "boolean" "boolean" "${type}" "${type} &" "${type} &" "${type}"
michael@13 9 "char" "char" "char" "char" "${type}" "${type} &" "${type} &" "${type}"
michael@13 10 "uchar" "unsigned char" "char" "octet" "${type}" "${type} &" "${type} &" "${type}"
michael@13 11 "byte" "unsigned char" "byte" "octet" "${type}" "${type} &" "${type} &" "${type}"
michael@13 12 "short" "short" "short" "short" "${type}" "${type} &" "${type} &" "${type}"
michael@13 13 "ushort" "unsigned short" "short" "unsigned short" "${type}" "${type} &" "${type} &" "${type}"
michael@13 14 "int" "int" "int" "long" "${type}" "${type} &" "${type} &" "${type}"
michael@13 15 "uint" "unsigned int" "int" "unsigned long" "${type}" "${type} &" "${type} &" "${type}"
michael@13 16 "long" "long" "long" "long" "${type}" "${type} &" "${type} &" "${type}"
michael@13 17 "ulong" "unsigned long" "long" "unsigned long" "${type}" "${type} &" "${type} &" "${type}"
michael@13 18 "float" "float" "float" "float" "${type}" "${type} &" "${type} &" "${type}"
michael@13 19 "double" "double" "double" "double" "${type}" "${type} &" "${type} &" "${type}"
michael@13 20 "string" "string" "String" "string" "${type}" "${type} &" "${type} &" "${type}"
michael@13 21
michael@13 22 relations_stereotypes 5 // uml cpp java pythonidl
michael@13 23 "sequence" "vector" "Vector" "list" "sequence"
michael@13 24 "vector" "vector" "Vector" "list" "sequence"
michael@13 25 "list" "list" "List" "list" "sequence"
michael@13 26 "set" "set" "Set" "set" "sequence"
michael@13 27 "map" "map" "Map" "dict" "sequence"
michael@13 28
michael@13 29 classes_stereotypes 14 // uml cpp java php python idl
michael@13 30 "class" "class" "class" "class" "class" "valuetype"
michael@13 31 "interface" "class" "interface" "interface" "class" "interface"
michael@13 32 "exception" "class" "class" "class" "class" "exception"
michael@13 33 "enum" "enum" "enum" "enum" "enum" "enum"
michael@13 34 "enum_pattern" "enum" "enum_pattern" "enum" "enum" "enum"
michael@13 35 "struct" "struct" "class" "class" "class" "struct"
michael@13 36 "union" "union" "class" "class" "class" "union"
michael@13 37 "typedef" "typedef" "ignored" "ignored" "ignored" "typedef"
michael@13 38 "boundary" "class" "class" "class" "class" "interface"
michael@13 39 "control" "class" "class" "class" "class" "valuetype"
michael@13 40 "entity" "class" "class" "class" "class" "valuetype"
michael@13 41 "actor" "ignored" "ignored" "ignored" "ignored" "ignored"
michael@13 42 "@interface" "ignored" "@interface" "ignored" "ignored" "ignored"
michael@13 43 "stereotype" "ignored" "ignored" "ignored" "ignored" "ignored"
michael@13 44
michael@13 45 cpp_enum_default_type_forms "${type}" "${type} &" "${type} &" "${type}" // in out inout return
michael@13 46 other_cpp_types_default_type_forms "const ${type} &" "${type} &" "${type} &" "${type}" // in out inout return
michael@13 47
michael@13 48 cpp_default_h_content "#ifndef ${NAMESPACE}_${NAME}_H
michael@13 49 #define ${NAMESPACE}_${NAME}_H
michael@13 50
michael@13 51 ${comment}
michael@13 52 ${includes}
michael@13 53 ${declarations}
michael@13 54 ${namespace_start}
michael@13 55 ${definition}
michael@13 56 ${namespace_end}
michael@13 57 #endif
michael@13 58 "
michael@13 59 cpp_default_src_content "${comment}
michael@13 60 ${includes}
michael@13 61 ${namespace_start}
michael@13 62 ${members}
michael@13 63 ${namespace_end}"
michael@13 64 cpp_default_class_decl "${comment}${template}class ${name}${inherit} {
michael@13 65 ${members}};
michael@13 66 ${inlines}
michael@13 67 "
michael@13 68 cpp_default_external_class_decl "${name}
michael@13 69 #include <${name}.h>
michael@13 70 "
michael@13 71 cpp_default_struct_decl "${comment}${template}struct ${name}${inherit} {
michael@13 72 ${members}};
michael@13 73 ${inlines}
michael@13 74 "
michael@13 75 cpp_default_union_decl "${comment}${template}union ${name} {
michael@13 76 ${members}};
michael@13 77 ${inlines}
michael@13 78 "
michael@13 79 cpp_default_enum_decl "${comment}enum ${name} {
michael@13 80 ${items}
michael@13 81 };
michael@13 82 "
michael@13 83 cpp_default_typedef_decl "${comment}typedef ${type} ${name};
michael@13 84 "
michael@13 85 cpp_default_attribute_declaration " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value};
michael@13 86 " // multiplicity 1
michael@13 87 " ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type}> ${name}${value};
michael@13 88 " // multiplicity * a..b
michael@13 89 " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${multiplicity}${value};
michael@13 90 " // multiplicity [..]
michael@13 91 cpp_default_enum_item_declaration " ${name}${value},${comment}"
michael@13 92 cpp_association_aggregation_declaration
michael@13 93 " ${comment}${static}${mutable}${volatile}${const}${type} * ${name}${value};
michael@13 94 " // multiplicity 1
michael@13 95 " ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type} *> ${name}${value};
michael@13 96 " // multiplicity * a..b
michael@13 97 " ${comment}${static}${mutable}${volatile}${const}${type} * ${name}${multiplicity}${value};
michael@13 98 " // multiplicity [..]
michael@13 99 cpp_aggregation_by_value_declaration
michael@13 100 " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value};
michael@13 101 " // multiplicity 1
michael@13 102 " ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type}> ${name}${value};
michael@13 103 " // multiplicity * a..b
michael@13 104 " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${multiplicity}${value};
michael@13 105 " // multiplicity [..]
michael@13 106 cpp_get "get_${name}" inline const value_const public
michael@13 107 cpp_set "set_${name}" public
michael@13 108 cpp_default_operation_declaration " ${comment}${friend}${static}${inline}${virtual}${type} ${name}${(}${)}${const}${volatile}${throw}${abstract};
michael@13 109 "
michael@13 110 cpp_default_operation_definition "${comment}${inline}${type} ${class}::${name}${(}${)}${const}${volatile}${throw}${staticnl}{
michael@13 111 ${body}}
michael@13 112 "
michael@13 113 java_default_src_content "${comment}
michael@13 114 ${package}
michael@13 115 ${imports}
michael@13 116 ${definition}"
michael@13 117 java_default_class_decl "${comment}${@}${visibility}${final}${abstract}class ${name}${extends}${implements} {
michael@13 118 ${members}}
michael@13 119 "
michael@13 120 java_default_external_class_decl "${name}"
michael@13 121 java_default_interface_decl "${comment}${@}${visibility}interface ${name}${extends} {
michael@13 122 ${members}}
michael@13 123 "
michael@13 124 java5_default_enum_decl "${comment}${@}${visibility}${final}${abstract}enum ${name}${implements} {
michael@13 125 ${items};
michael@13 126 ${members}}
michael@13 127 "
michael@13 128 java_default_enum_decl "${comment}${@}${visibility}final class ${name} {
michael@13 129 ${members}
michael@13 130 private final int value;
michael@13 131
michael@13 132 public int value() {
michael@13 133 return value;
michael@13 134 }
michael@13 135
michael@13 136 public static ${name} fromInt(int value) {
michael@13 137 switch (value) {
michael@13 138 ${cases} default: throw new Error();
michael@13 139 }
michael@13 140
michael@13 141 }
michael@13 142 private ${name}(int v) { value = v; };
michael@13 143 }
michael@13 144 "
michael@13 145 java_default_attribute_declaration " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type} ${name}${value};
michael@13 146 " // multiplicity 1
michael@13 147 " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${stereotype}<${type}> ${name}${value};
michael@13 148 " // multiplicity * a..b
michael@13 149 " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type}${multiplicity} ${name}${value};
michael@13 150 " // multiplicity N
michael@13 151 java5_default_enum_item_declaration " ${@}${name}${value},${comment}"
michael@13 152 java_default_enum_item_declaration " ${comment}${@}public static final int _${name}${value};
michael@13 153 public static final ${class} ${name} = new ${class}(_${name});
michael@13 154 "
michael@13 155 java_default_enum_case " case _${name}: return ${name};
michael@13 156 "
michael@13 157 java_association_aggregation_declaration
michael@13 158 " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type} ${name}${value};
michael@13 159 " // multiplicity 1
michael@13 160 " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${stereotype}<${type}> ${name}${value};
michael@13 161 " // multiplicity * a..b
michael@13 162 " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type}${multiplicity} ${name}${value};
michael@13 163 " // multiplicity N
michael@13 164 java_get "get${Name}" final public
michael@13 165 java_set "set${Name}" public
michael@13 166 java_default_operation_definition " ${comment}${@}${visibility}${final}${static}${abstract}${synchronized}${type} ${name}${(}${)}${throws}${staticnl}{
michael@13 167 ${body}}
michael@13 168 "
michael@13 169 php_default_src_content "<?php
michael@13 170 ${comment}
michael@13 171 ${definition}
michael@13 172 ?>
michael@13 173 "
michael@13 174 php_default_class_decl "${comment}${final}${visibility}${abstract}class ${name}${extends}${implements} {
michael@13 175 ${members}}
michael@13 176 "
michael@13 177 php_default_enum_decl "${comment}${visibility}final class ${name} {
michael@13 178 ${items}}
michael@13 179 "
michael@13 180 php_default_external_class_decl "${name}"
michael@13 181 php_default_interface_decl "${comment}${visibility}interface ${name} {
michael@13 182 ${members}}
michael@13 183 "
michael@13 184 php_default_attribute_declaration " ${comment}${visibility}${const}${static}${var}${name}${value};
michael@13 185 "
michael@13 186 php_default_enum_item_decl " const ${name}${value};${comment}
michael@13 187 "
michael@13 188 php_default_relation_declaration" ${comment}${visibility}${const}${static}${var}${name}${value};
michael@13 189 "
michael@13 190 php_get "get${Name}" final
michael@13 191 php_set "set${Name}"
michael@13 192 php_default_operation_definition " ${comment}${final}${visibility}${abstract}${static}function ${name}${(}${)}
michael@13 193 {
michael@13 194 ${body}}
michael@13 195 "
michael@13 196 python_2_2
michael@13 197 python_indent_step " "
michael@13 198 python_default_src_content "${comment}
michael@13 199 ${import}
michael@13 200 ${definition}"
michael@13 201 python_default_class_decl "class ${name}${inherit}:
michael@13 202 ${docstring}${members}
michael@13 203 "
michael@13 204 python_default_enum_decl "class ${name}:
michael@13 205 ${docstring}${members}
michael@13 206 "
michael@13 207 python_default_external_class_decl "${name}"
michael@13 208 python_default_attribute_declaration "${comment}${self}${name} = ${value}
michael@13 209 " // multiplicity 1
michael@13 210 "${comment}${self}${name} = ${stereotype}()
michael@13 211 " // multiplicity != 1
michael@13 212 python_default_enum_item_decl "${comment}${self}${name} = ${value}
michael@13 213 "
michael@13 214 python_default_relation_declaration"${comment}${self}${name} = ${value}
michael@13 215 " // multiplicity 1
michael@13 216 "${comment}${self}${name} = ${stereotype}()
michael@13 217 " // multiplicity != 1
michael@13 218 python_default_composition_declaration"${comment}${self}${name} = ${type}()
michael@13 219 " // multiplicity 1
michael@13 220 "${comment}${self}${name} = ${stereotype}()
michael@13 221 " // multiplicity != 1
michael@13 222 python_default_operation_definition "${@}${static}${abstract}def ${name}${(}${)}:
michael@13 223 ${docstring}${body}
michael@13 224 "
michael@13 225 python_get "get${Name}"
michael@13 226 python_set "set${Name}"
michael@13 227 idl_default_src_content "#ifndef ${MODULE}_${NAME}_H
michael@13 228 #define ${MODULE}_${NAME}_H
michael@13 229
michael@13 230 ${comment}
michael@13 231 ${includes}
michael@13 232 ${module_start}
michael@13 233 ${definition}
michael@13 234 ${module_end}
michael@13 235 #endif
michael@13 236 "
michael@13 237 idl_default_interface_decl "${comment}${abstract}${local}interface ${name}${inherit} {
michael@13 238 ${members}};
michael@13 239 "
michael@13 240 idl_default_valuetype_decl "${comment}${abstract}${custom}valuetype ${name}${inherit} {
michael@13 241 ${members}};
michael@13 242 "
michael@13 243 idl_default_struct_decl "${comment}struct ${name} {
michael@13 244 ${members}};
michael@13 245 "
michael@13 246 idl_default_typedef_decl "${comment}typedef ${type} ${name};
michael@13 247 "
michael@13 248 idl_default_exception_decl "${comment}exception ${name} {
michael@13 249 ${members}};
michael@13 250 "
michael@13 251 idl_default_union_decl "${comment}union ${name} switch(${switch}) {
michael@13 252 ${members}};
michael@13 253 "
michael@13 254 idl_default_enum_decl "${comment}enum ${name} {
michael@13 255 ${items}};
michael@13 256 "
michael@13 257 idl_default_external_class_decl "${name}
michael@13 258 #include \"${name}.idl\"
michael@13 259 "
michael@13 260 idl_default_attribute_declaration " ${comment}${readonly}${attribute}${type} ${name};
michael@13 261 " // multiplicity 1
michael@13 262 " ${comment}${readonly}${attribute}${stereotype}<${type}> ${name};
michael@13 263 " // multiplicity * a..b
michael@13 264 " ${comment}${readonly}${attribute}${stereotype}<${type},${multiplicity}> ${name};
michael@13 265 " // multiplicity N
michael@13 266 idl_default_valuetype_attribute_declaration " ${comment}${visibility}${type} ${name};
michael@13 267 " // multiplicity 1
michael@13 268 " ${comment}${visibility}${stereotype}<${type}> ${name};
michael@13 269 " // multiplicity * a..b
michael@13 270 " ${comment}${visibility}${stereotype}<${type},${multiplicity}> ${name};
michael@13 271 " // multiplicity N
michael@13 272 idl_default_const_declaration " ${comment}const ${type} ${name}${value};
michael@13 273 " // multiplicity 1
michael@13 274 " ${comment}const ${stereotype}<${type}> ${name}${value};
michael@13 275 " // multiplicity * a..b
michael@13 276 " ${comment}const ${stereotype}<${type},${multiplicity}> ${name}${value};
michael@13 277 " // multiplicity N
michael@13 278 idl_default_enum_item_declaration " ${name},${comment}"
michael@13 279 idl_default_union_item_declaration " ${comment}case ${case} : ${readonly}${type} ${name};" // multiplicity 1
michael@13 280 " ${comment}case ${case} : ${readonly}${stereotype}<${type}> ${name};" // multiplicity * a..b
michael@13 281 " ${comment}case ${case} : ${readonly}${stereotype}<${type},${multiplicity}> ${name};" // multiplicity N
michael@13 282 idl_association_aggregation_declaration
michael@13 283 " ${comment}${readonly}${attribute}${type} ${name};
michael@13 284 " // multiplicity 1
michael@13 285 " ${comment}${readonly}${attribute}${stereotype}<${type}> ${name};
michael@13 286 " // multiplicity * a..b
michael@13 287 " ${comment}${readonly}${attribute}${stereotype}<${type},${multiplicity}> ${name};
michael@13 288 " // multiplicity N
michael@13 289 idl_valuetype_association_aggregation_declaration
michael@13 290 " ${comment}${visibility}${type} ${name};
michael@13 291 " // multiplicity 1
michael@13 292 " ${comment}${visibility}${stereotype}<${type}> ${name};
michael@13 293 " // multiplicity * a..b
michael@13 294 " ${comment}${visibility}${stereotype}<${type},${multiplicity}> ${name};
michael@13 295 " // multiplicity N
michael@13 296 idl_union_association_aggregation_declaration
michael@13 297 " ${comment}case ${case} : ${readonly}${type} ${name};" // multiplicity 1
michael@13 298 " ${comment}case ${case} : ${readonly}${stereotype}<${type}> ${name};" // multiplicity * a..b
michael@13 299 " ${comment}case ${case} : ${readonly}${stereotype}<${type},${multiplicity}> ${name};" // multiplicity N
michael@13 300 idl_get "get_${name}"
michael@13 301 idl_set "set_${name}" twoways
michael@13 302 idl_default_operation_declaration " ${comment}${oneway}${type} ${name}${(}${)}${raisesnl}${raises};
michael@13 303 "
michael@13 304 uml_get_name uml uml_set_name uml
michael@13 305 end

mercurial