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