projdesign/generation_settings

changeset 13
47ce95feb61a
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/projdesign/generation_settings	Tue Aug 04 18:12:44 2009 +0200
     1.3 @@ -0,0 +1,305 @@
     1.4 +
     1.5 +  cpp_default_defs 
     1.6 +  cpp_h_extension "h" cpp_src_extension "cpp" java_extension "java" php_extension "php" python_extension "py" idl_extension "idl"
     1.7 +
     1.8 +  type_forms 15 // uml cpp java idl cpp_in cpp_out cpp_inout cpp_return
     1.9 +    "void" "void" "void" "void" "${type}" "${type} &" "${type}" "${type}"
    1.10 +    "any" "void *" "Object" "any" "const ${type}" "${type}" "${type} &" "${type}"
    1.11 +    "bool" "bool" "boolean" "boolean" "${type}" "${type} &" "${type} &" "${type}"
    1.12 +    "char" "char" "char" "char" "${type}" "${type} &" "${type} &" "${type}"
    1.13 +    "uchar" "unsigned char" "char" "octet" "${type}" "${type} &" "${type} &" "${type}"
    1.14 +    "byte" "unsigned char" "byte" "octet" "${type}" "${type} &" "${type} &" "${type}"
    1.15 +    "short" "short" "short" "short" "${type}" "${type} &" "${type} &" "${type}"
    1.16 +    "ushort" "unsigned short" "short" "unsigned short" "${type}" "${type} &" "${type} &" "${type}"
    1.17 +    "int" "int" "int" "long" "${type}" "${type} &" "${type} &" "${type}"
    1.18 +    "uint" "unsigned int" "int" "unsigned long" "${type}" "${type} &" "${type} &" "${type}"
    1.19 +    "long" "long" "long" "long" "${type}" "${type} &" "${type} &" "${type}"
    1.20 +    "ulong" "unsigned long" "long" "unsigned long" "${type}" "${type} &" "${type} &" "${type}"
    1.21 +    "float" "float" "float" "float" "${type}" "${type} &" "${type} &" "${type}"
    1.22 +    "double" "double" "double" "double" "${type}" "${type} &" "${type} &" "${type}"
    1.23 +    "string" "string" "String" "string" "${type}" "${type} &" "${type} &" "${type}"
    1.24 +  
    1.25 +  relations_stereotypes 5 // uml cpp java pythonidl
    1.26 +    "sequence" "vector" "Vector" "list" "sequence"
    1.27 +    "vector" "vector" "Vector" "list" "sequence"
    1.28 +    "list" "list" "List" "list" "sequence"
    1.29 +    "set" "set" "Set" "set" "sequence"
    1.30 +    "map" "map" "Map" "dict" "sequence"
    1.31 +  
    1.32 +  classes_stereotypes 14 // uml cpp java php python idl
    1.33 +    "class" "class" "class" "class" "class" "valuetype"
    1.34 +    "interface" "class" "interface" "interface" "class" "interface"
    1.35 +    "exception" "class" "class" "class" "class" "exception"
    1.36 +    "enum" "enum" "enum" "enum" "enum" "enum"
    1.37 +    "enum_pattern" "enum" "enum_pattern" "enum" "enum" "enum"
    1.38 +    "struct" "struct" "class" "class" "class" "struct"
    1.39 +    "union" "union" "class" "class" "class" "union"
    1.40 +    "typedef" "typedef" "ignored" "ignored" "ignored" "typedef"
    1.41 +    "boundary" "class" "class" "class" "class" "interface"
    1.42 +    "control" "class" "class" "class" "class" "valuetype"
    1.43 +    "entity" "class" "class" "class" "class" "valuetype"
    1.44 +    "actor" "ignored" "ignored" "ignored" "ignored" "ignored"
    1.45 +    "@interface" "ignored" "@interface" "ignored" "ignored" "ignored"
    1.46 +    "stereotype" "ignored" "ignored" "ignored" "ignored" "ignored"
    1.47 +  
    1.48 +  cpp_enum_default_type_forms "${type}" "${type} &" "${type} &" "${type}" // in out inout return
    1.49 +  other_cpp_types_default_type_forms "const ${type} &" "${type} &" "${type} &" "${type}" // in out inout return
    1.50 +
    1.51 +  cpp_default_h_content "#ifndef ${NAMESPACE}_${NAME}_H
    1.52 +#define ${NAMESPACE}_${NAME}_H
    1.53 +
    1.54 +${comment}
    1.55 +${includes}
    1.56 +${declarations}
    1.57 +${namespace_start}
    1.58 +${definition}
    1.59 +${namespace_end}
    1.60 +#endif
    1.61 +"
    1.62 +  cpp_default_src_content "${comment}
    1.63 +${includes}
    1.64 +${namespace_start}
    1.65 +${members}
    1.66 +${namespace_end}"
    1.67 +  cpp_default_class_decl "${comment}${template}class ${name}${inherit} {
    1.68 +${members}};
    1.69 +${inlines}
    1.70 +"
    1.71 +  cpp_default_external_class_decl "${name}
    1.72 +#include <${name}.h>
    1.73 +"
    1.74 +  cpp_default_struct_decl "${comment}${template}struct ${name}${inherit} {
    1.75 +${members}};
    1.76 +${inlines}
    1.77 +"
    1.78 +  cpp_default_union_decl "${comment}${template}union ${name} {
    1.79 +${members}};
    1.80 +${inlines}
    1.81 +"
    1.82 +  cpp_default_enum_decl "${comment}enum ${name} {
    1.83 +${items}
    1.84 +};
    1.85 +"
    1.86 +  cpp_default_typedef_decl "${comment}typedef ${type} ${name};
    1.87 +"
    1.88 +  cpp_default_attribute_declaration "    ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value};
    1.89 +" // multiplicity 1
    1.90 +  "    ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type}> ${name}${value};
    1.91 +" // multiplicity * a..b
    1.92 +  "    ${comment}${static}${mutable}${volatile}${const}${type} ${name}${multiplicity}${value};
    1.93 +" // multiplicity [..]
    1.94 +  cpp_default_enum_item_declaration "  ${name}${value},${comment}"
    1.95 +  cpp_association_aggregation_declaration
    1.96 +    "    ${comment}${static}${mutable}${volatile}${const}${type} * ${name}${value};
    1.97 +" // multiplicity 1
    1.98 +    "    ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type} *> ${name}${value};
    1.99 +" // multiplicity * a..b
   1.100 +    "    ${comment}${static}${mutable}${volatile}${const}${type} * ${name}${multiplicity}${value};
   1.101 +" // multiplicity [..]
   1.102 +  cpp_aggregation_by_value_declaration
   1.103 +    "    ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value};
   1.104 +" // multiplicity 1
   1.105 +    "    ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type}> ${name}${value};
   1.106 +" // multiplicity * a..b
   1.107 +    "    ${comment}${static}${mutable}${volatile}${const}${type} ${name}${multiplicity}${value};
   1.108 +" // multiplicity [..]
   1.109 +  cpp_get "get_${name}" inline const value_const public
   1.110 +  cpp_set "set_${name}" public
   1.111 +  cpp_default_operation_declaration "    ${comment}${friend}${static}${inline}${virtual}${type} ${name}${(}${)}${const}${volatile}${throw}${abstract};
   1.112 +"
   1.113 +  cpp_default_operation_definition "${comment}${inline}${type} ${class}::${name}${(}${)}${const}${volatile}${throw}${staticnl}{
   1.114 +  ${body}}
   1.115 +"
   1.116 +  java_default_src_content "${comment}
   1.117 +${package}
   1.118 +${imports}
   1.119 +${definition}"
   1.120 +  java_default_class_decl "${comment}${@}${visibility}${final}${abstract}class ${name}${extends}${implements} {
   1.121 +${members}}
   1.122 +"
   1.123 +  java_default_external_class_decl "${name}"
   1.124 +  java_default_interface_decl "${comment}${@}${visibility}interface ${name}${extends} {
   1.125 +${members}}
   1.126 +"
   1.127 +  java5_default_enum_decl "${comment}${@}${visibility}${final}${abstract}enum ${name}${implements} {
   1.128 +${items};
   1.129 +${members}}
   1.130 +"
   1.131 +  java_default_enum_decl "${comment}${@}${visibility}final class ${name} {
   1.132 +${members}
   1.133 +  private final int value;
   1.134 +
   1.135 +  public int value() {
   1.136 +    return value;
   1.137 +  }
   1.138 +
   1.139 +  public static ${name} fromInt(int value) {
   1.140 +    switch (value) {
   1.141 +${cases}    default: throw new Error();
   1.142 +    }
   1.143 +
   1.144 +  }
   1.145 +  private ${name}(int v) { value = v; };
   1.146 +}
   1.147 +"
   1.148 +  java_default_attribute_declaration "  ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type} ${name}${value};
   1.149 +" // multiplicity 1
   1.150 +  "  ${comment}${@}${visibility}${static}${final}${transient}${volatile}${stereotype}<${type}> ${name}${value};
   1.151 +" // multiplicity * a..b
   1.152 +  "  ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type}${multiplicity} ${name}${value};
   1.153 +" // multiplicity N
   1.154 +  java5_default_enum_item_declaration "  ${@}${name}${value},${comment}"
   1.155 +  java_default_enum_item_declaration "  ${comment}${@}public static final int _${name}${value};
   1.156 +public static final ${class} ${name} = new ${class}(_${name});
   1.157 +"
   1.158 +  java_default_enum_case "    case _${name}: return ${name};
   1.159 +"
   1.160 +  java_association_aggregation_declaration
   1.161 +    "  ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type} ${name}${value};
   1.162 +" // multiplicity 1
   1.163 +    "  ${comment}${@}${visibility}${static}${final}${transient}${volatile}${stereotype}<${type}> ${name}${value};
   1.164 +" // multiplicity * a..b
   1.165 +    "  ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type}${multiplicity} ${name}${value};
   1.166 +" // multiplicity N
   1.167 +  java_get "get${Name}" final public
   1.168 +  java_set "set${Name}" public
   1.169 +  java_default_operation_definition "  ${comment}${@}${visibility}${final}${static}${abstract}${synchronized}${type} ${name}${(}${)}${throws}${staticnl}{
   1.170 +  ${body}}
   1.171 +"
   1.172 +  php_default_src_content "<?php
   1.173 +${comment}
   1.174 +${definition}
   1.175 +?>
   1.176 +"
   1.177 +  php_default_class_decl "${comment}${final}${visibility}${abstract}class ${name}${extends}${implements} {
   1.178 +${members}}
   1.179 +"
   1.180 +  php_default_enum_decl "${comment}${visibility}final class ${name} {
   1.181 +${items}}
   1.182 +"
   1.183 +  php_default_external_class_decl "${name}"
   1.184 +  php_default_interface_decl "${comment}${visibility}interface ${name} {
   1.185 +${members}}
   1.186 +"
   1.187 +  php_default_attribute_declaration "  ${comment}${visibility}${const}${static}${var}${name}${value};
   1.188 +"
   1.189 +  php_default_enum_item_decl "  const ${name}${value};${comment}
   1.190 +"
   1.191 +  php_default_relation_declaration"  ${comment}${visibility}${const}${static}${var}${name}${value};
   1.192 +"
   1.193 +  php_get "get${Name}" final
   1.194 +  php_set "set${Name}"
   1.195 +  php_default_operation_definition "  ${comment}${final}${visibility}${abstract}${static}function ${name}${(}${)}
   1.196 +{
   1.197 +  ${body}}
   1.198 +"
   1.199 +  python_2_2
   1.200 +  python_indent_step "    "
   1.201 +  python_default_src_content "${comment}
   1.202 +${import}
   1.203 +${definition}"
   1.204 +  python_default_class_decl "class ${name}${inherit}:
   1.205 +${docstring}${members}
   1.206 +"
   1.207 +  python_default_enum_decl "class ${name}:
   1.208 +${docstring}${members}
   1.209 +"
   1.210 +  python_default_external_class_decl "${name}"
   1.211 +  python_default_attribute_declaration "${comment}${self}${name} = ${value}
   1.212 +" // multiplicity 1
   1.213 +  "${comment}${self}${name} = ${stereotype}()
   1.214 +" // multiplicity != 1
   1.215 +  python_default_enum_item_decl "${comment}${self}${name} = ${value}
   1.216 +"
   1.217 +  python_default_relation_declaration"${comment}${self}${name} = ${value}
   1.218 +" // multiplicity 1
   1.219 +  "${comment}${self}${name} = ${stereotype}()
   1.220 +" // multiplicity != 1
   1.221 +  python_default_composition_declaration"${comment}${self}${name} = ${type}()
   1.222 +" // multiplicity 1
   1.223 +  "${comment}${self}${name} = ${stereotype}()
   1.224 +" // multiplicity != 1
   1.225 +  python_default_operation_definition "${@}${static}${abstract}def ${name}${(}${)}:
   1.226 +${docstring}${body}
   1.227 +"
   1.228 +  python_get "get${Name}"
   1.229 +  python_set "set${Name}"
   1.230 +  idl_default_src_content "#ifndef ${MODULE}_${NAME}_H
   1.231 +#define ${MODULE}_${NAME}_H
   1.232 +
   1.233 +${comment}
   1.234 +${includes}
   1.235 +${module_start}
   1.236 +${definition}
   1.237 +${module_end}
   1.238 +#endif
   1.239 +"
   1.240 +  idl_default_interface_decl "${comment}${abstract}${local}interface ${name}${inherit} {
   1.241 +${members}};
   1.242 +"
   1.243 +  idl_default_valuetype_decl "${comment}${abstract}${custom}valuetype ${name}${inherit} {
   1.244 +${members}};
   1.245 +"
   1.246 +  idl_default_struct_decl "${comment}struct ${name} {
   1.247 +${members}};
   1.248 +"
   1.249 +  idl_default_typedef_decl "${comment}typedef ${type} ${name};
   1.250 +"
   1.251 +  idl_default_exception_decl "${comment}exception ${name} {
   1.252 +${members}};
   1.253 +"
   1.254 +  idl_default_union_decl "${comment}union ${name} switch(${switch}) {
   1.255 +${members}};
   1.256 +"
   1.257 +  idl_default_enum_decl "${comment}enum ${name} {
   1.258 +${items}};
   1.259 +"
   1.260 +  idl_default_external_class_decl "${name}
   1.261 +#include \"${name}.idl\"
   1.262 +"
   1.263 +  idl_default_attribute_declaration "  ${comment}${readonly}${attribute}${type} ${name};
   1.264 +" // multiplicity 1
   1.265 +  "  ${comment}${readonly}${attribute}${stereotype}<${type}> ${name};
   1.266 +" // multiplicity * a..b
   1.267 +  "  ${comment}${readonly}${attribute}${stereotype}<${type},${multiplicity}> ${name};
   1.268 +" // multiplicity N
   1.269 +  idl_default_valuetype_attribute_declaration "  ${comment}${visibility}${type} ${name};
   1.270 +" // multiplicity 1
   1.271 +  "  ${comment}${visibility}${stereotype}<${type}> ${name};
   1.272 +" // multiplicity * a..b
   1.273 +  "  ${comment}${visibility}${stereotype}<${type},${multiplicity}> ${name};
   1.274 +" // multiplicity N
   1.275 +  idl_default_const_declaration "  ${comment}const ${type} ${name}${value};
   1.276 +" // multiplicity 1
   1.277 +  "  ${comment}const ${stereotype}<${type}> ${name}${value};
   1.278 +" // multiplicity * a..b
   1.279 +  "  ${comment}const ${stereotype}<${type},${multiplicity}> ${name}${value};
   1.280 +" // multiplicity N
   1.281 +  idl_default_enum_item_declaration "  ${name},${comment}"
   1.282 +  idl_default_union_item_declaration "  ${comment}case ${case} : ${readonly}${type} ${name};" // multiplicity 1
   1.283 +  "  ${comment}case ${case} : ${readonly}${stereotype}<${type}> ${name};" // multiplicity * a..b
   1.284 +  "  ${comment}case ${case} : ${readonly}${stereotype}<${type},${multiplicity}> ${name};" // multiplicity N
   1.285 +  idl_association_aggregation_declaration
   1.286 +    "  ${comment}${readonly}${attribute}${type} ${name};
   1.287 +" // multiplicity 1
   1.288 +    "  ${comment}${readonly}${attribute}${stereotype}<${type}> ${name};
   1.289 +" // multiplicity * a..b
   1.290 +    "  ${comment}${readonly}${attribute}${stereotype}<${type},${multiplicity}> ${name};
   1.291 +" // multiplicity N
   1.292 +  idl_valuetype_association_aggregation_declaration
   1.293 +    "  ${comment}${visibility}${type} ${name};
   1.294 +" // multiplicity 1
   1.295 +    "  ${comment}${visibility}${stereotype}<${type}> ${name};
   1.296 +" // multiplicity * a..b
   1.297 +    "  ${comment}${visibility}${stereotype}<${type},${multiplicity}> ${name};
   1.298 +" // multiplicity N
   1.299 +  idl_union_association_aggregation_declaration
   1.300 +    "  ${comment}case ${case} : ${readonly}${type} ${name};" // multiplicity 1
   1.301 +    "  ${comment}case ${case} : ${readonly}${stereotype}<${type}> ${name};" // multiplicity * a..b
   1.302 +    "  ${comment}case ${case} : ${readonly}${stereotype}<${type},${multiplicity}> ${name};" // multiplicity N
   1.303 +  idl_get "get_${name}"
   1.304 +  idl_set "set_${name}"  twoways
   1.305 +  idl_default_operation_declaration "  ${comment}${oneway}${type} ${name}${(}${)}${raisesnl}${raises};
   1.306 +"
   1.307 +  uml_get_name uml uml_set_name uml
   1.308 +end

mercurial