I am using omniIDL for generating some non-CORBA application-specific code. The problem I&#39;m having is that when const or enum symbols are used in .idl, the resulting AST passed to my back-end seems to always have pre-substituted the values of these symbols. This will give the desired machine code when compiled, but is not always optimal in terms of clarity of the generated code. To illustrate, consider the following .idl:<br>
<br>// myObject.idl:<br>module myObject {<br>    const int arySize = 4;<br>    const int seqSize = arySize;<br>    struct myStruct {<br>        int a[arySize];<br>    }<br>    sequence&lt;float, seqSize&gt; mySeq;<br>}<br>
<br>In the back end, when parsing the AST nodes that are defined using one of these const symbols (seqSize, myStruct.a, or mySeq), there appears to be no reference to the name of the symbol. Only the value. So my back end has no choice but to generate a corresponding C++ class something like:<br>
<br>// myObject.h:<br>namespace myObject {<br>    const int arySize = 4;<br>    const int seqSize = 4;<br>    struct myStruct {<br>        int a[4];<br>    }<br>    sequence&lt;float, 4&gt; mySeq;<br>}<br><br>This is OK, but it would be more clear if it could use the actual symbol in the generated code, something like:<br>
<br>// myObject.h:<br>
namespace myObject {<br>
    const int arySize = 4;<br>
    const int seqSize = arySize;<br>    struct myStruct {<br>        int a[arySize];<br>    }<br>
    sequence&lt;float, seqSize&gt; mySeq;<br>}<br>
<br>I realize this is merely an aesthetic issue, but does anyone know a way to achieve what I am trying to achieve here? <br><br>Thanks,<br>Tim<br>