Jump to content
OpenSplice DDS Forum
Sign in to follow this  
bdavis

wishes and dreams (aka "i want a unicorn')

Recommended Posts

I wish, the idlpp would generate a set of serialization routines that I could use in application code.

 

 

std::string to_JSON (  IdlStruct S );

IdlStruct S from_JSON ( std::string );

 

std::string to_XML ( idlStruct S);

idlStruct S from_XML ( std::string)

 

// and maybe some 'c' callable ones as well !!

 

Or maybe the solution is for me to parse the idl file myself and make this.  Something that would be quite handy at times.

 

 

--bud davis

 

 

 

Share this post


Link to post
Share on other sites

HI Bud,

 

As is well-known, unicorns do exist. The problem is finding fully grown ones, it is only the baby ones that are quite common.

 

In other words:

- does it really have to be C++ or is C good enough?

- what are your performance requirements?

- how much effort are you willing to put into it?

- what licensing schemes are acceptable?

 

There is a C library named "corto" on github that does all this. The generic type handling in https://github.com/prismtech/opensplice-tools can convert between something resembling C99 designated initializers and the in-memory representation of the IDL-to-C mapping — and so all the tricks needed to do this are in there even if it does require hooking up the right parsers. Then there is my proof-of-concept Haskell binding (https://github.com/prismtech/haskell-dds), if you're really looking for a proper unicorn :)

 

The second and third are definitely limited to the C representation, I'm not sure about the first. One way to deal with that is to have a multi-language program that does the conversion between C and C++ representations via DDS.

 

Best regards,

Erik

Share this post


Link to post
Share on other sites

Erik,

 

Interesting.  I have seen this project on github before, even tried to compile it, but did not go any farther.

Time to give it a closer look.

 

thanks,

Bud Davis

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×