IDL module c++ namespace generation

4 posts / 0 new
Last post
Offline
Last seen: 9 years 6 months ago
Joined: 01/06/2014
Posts: 2
IDL module c++ namespace generation

I have a fairly complex set of IDL files and they use the IDL module syntax.  I have successfully used the java language generation and rtiddsgen correctly creates the directory structures and namespaces for the imports.

I am now trying to do the same in C++ and while it seems to parse the module directives correctly, creates the correct #include directives (with sub directories/etc), and adds in the correct namespace syntax, it puts all of the .h files in the root directory and not in the correct subdirectories.  Is this a bug, or am I missing a specific command line option?

Thanks,

Jeff Hyams

Offline
Last seen: 5 years 9 months ago
Joined: 01/17/2013
Posts: 23

Hi Jeff,

When rtiddsgen generates code in C++ it generates a set of files per IDL file regardless how many types are defined in the IDL (as opposite to Java where it generates a set of files per type in the IDL). Since there can be several namespaces for different types defined in the IDL, it does not create any directory structure. If you want them to be created in an specific folder you can use the -d <outputDirectory> option.

Regards,

Aida

 

 

Offline
Last seen: 9 years 6 months ago
Joined: 01/06/2014
Posts: 2

Aida,

Thank you for the response, that does make sense.  I do have another related question.  In the IDL, I have #include directives that include IDL files in a different relative directory structure from the IDL file I am generating from.  The generated header file copies the paths of these includes directly as C++ #include directives with the full path, so I would like to generate the code with the same paths(which I can of course do with the -d option).  However, I would like to place my source and header files in different root directories.  Is there a way to split the destination source and header directories directly with the codegen, or will I need to write a script to copy them once I've generated the code?

Thanks,

Jeff

Offline
Last seen: 5 years 9 months ago
Joined: 01/17/2013
Posts: 23

Hi Jeff,

I'm sorry but rtiddsgen does not have such an option to split the generated code in different directories.

Regards,

Aída