-
Is there a way to get the openddsharp.standard.idlgenerator to tweak its generated code? Specifically we would like to have the generated C# TypeSupport classes inherit from a common interface that contains the declarations for GetTypeName, RegisterType and UnregisterType. This would make it possible to use generics when handling lots of TypeSupport classes from more complex IDL files. More broadly, it would be nice if a config file could be supplied to the generator which would allow further tweaking but I fear that would be more complex. Note, I am using the command line tools as per the getting started page. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Is there a way to get the openddsharp.standard.idlgenerator to tweak its generated code? Yes, the CSharpImplTemplate.txt is copied in the This would make it possible to use generics when handling lots of TypeSupport classes from more complex IDL files. Agree, and could be used for other implementations as well, so feel free to pull request your changes to be integrated in the next releases. More broadly, it would be nice if a config file could be supplied to the generator which would allow further tweaking but I fear that would be more complex. Again agree, templating system is quite limited using the current implementation. I created a PoC some time ago to replace EDIT: A better implementation would be to implement two interfaces, a generic |
Beta Was this translation helpful? Give feedback.
Is there a way to get the openddsharp.standard.idlgenerator to tweak its generated code?
Yes, the CSharpImplTemplate.txt is copied in the
<IDL_NUGET_PATH>/OpenDDS_<arch>/dds/idl
folder. We could define interface in the project (i.e. ITypeSupport) and ensureTypeSupport
classes inherit it in the code generator.This would make it possible to use generics when handling lots of TypeSupport classes from more complex IDL files.
Agree, and could be used for other implementations as well, so feel free to pull request your changes to be integrated in the next releases.
More broadly, it would be nice if a config file could be supplied to the generator which would allow further tweaking but I fear …