Book a Demo

Author Topic: Where are <code genoptions...> for elements coming from?  (Read 3538 times)

heba

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Where are <code genoptions...> for elements coming from?
« on: March 06, 2019, 02:51:38 am »
Hi all,

I just stumbled upon a C++ code generator issue where on interface class is generated without the ctor/dtor while another one gets the default ctor/dtors.

Searching for a potential difference, the only one I spotted so far appears in the XMI export. The element which generates "better" has lots of "genoptions" defined.

The element which has the unwanted ctors in the output looks like this:
Code: [Select]
<element xmi:idref="..">[..]
  <code gentype="C++"/>
  [..]
</element>

The good one looks like follows:
Code: [Select]
<element xmi:idref="..">[..]
<code genoptions="nKill=1;nLang=0;sLang=C++;bConstructor=0;bConInline=0;sConScope=Public;bCpyConstructor=0;bCpyConInline=0;sCpyConScope=Protected;bDestructor=0;bDesVirtual=0;bDesInline=0;sDesScope=Public;CHeader=.hpp;CBody=.cpp;JBody=.java;VBody=.cls;VBNetBody=.vb;WFSBody=.vbs;JavaScriptBody=.js;ModelicaBody=.mo;MDGBPSimExecutionEngineExtensionBody=;sAssocName=m_$LinkClass;bGetSet=1;bGenInterfaces=1;JCol=Vector;CCol=[];VCol=Collection;bVMultiuse=1;bVPersist=0;bVDatabind=0;bVDatasource=0;bVGlobal=0;bVCreatable=1;bVExposed=0;sMTS=0;sCRefType=&amp;;sCGetPrefix=Get;sCSetPrefix=Set;sJGetPrefix=get;sJSetPrefix=set;sCSGetPrefix=Get;sCSSetPrefix=Set;sVVersion=6.0;CSBody=.cs;DBody=.pas;bJInnerClasses=1;sJCollection=;sCodePage=28591 (ISO 8859-1 Latin I);sPHPBody=.php;sPHPVersion=5.3;sPHPGetPrefix=get;sPHPSetPrefix=set;ASBody=.as;PyBody=.py;CPPVersion=;ASVersion=2.0;ANSICHeader=.h;ANSICBody=.c;ANSIC_OOSupport=0;ANSIC_NSDLMT=_;ANSIC_RefParam=1;ANSIC_RefStyle=*;ANSIC_RefName=this;ANSIC_ConstructorName=new;ANSIC_DestructorName=delete;CPPCollections=CArray&lt;#TYPE#&gt;_x241F_CMap&lt;CString,LPCTSTR,#TYPE#*,#TYPE#*&gt;_x241F_;CSCollections=List&lt;#TYPE#&gt;_x241F_Stack&lt;#TYPE#&gt;_x241F_Queue&lt;#TYPE#&gt;_x241F_;JCollections=HashSet&lt;#TYPE#&gt;_x241F_Map&lt;String,#TYPE#&gt;_x241F_List&lt;#TYPE#&gt;_x241F_;CPPWrappers=unique_ptr&lt;#TYPE#&gt;_x241F_shared_ptr&lt;#TYPE#&gt;_x241F_weak_ptr&lt;#TYPE#&gt;_x241F_;" gentype="C++"
</element>

Question is, where do all these switches come from? Was it reverse-engineered and added by the importer? 
It looks like options like bConstructor=0; are what I might need but how can I add this from with EA?

Thanks in advance
Heiko