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.

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

mercurial