I was evaluating the posibility of IDLCXX generator generates a weak definition of << operator overloading or a call to an external implementation of it.
I was trying define a custom character formatter so I could translate, for example to a JSON or YML format of the generated object but I see no way of doing it.
With this, I see no way of defining a custom serializer for the Msg object as string.
If I define another, it will be ambiguous.
isn't there a way of defining, by example a virtual function toString(), on the generated object that receives the ostream object as parameter and can be override so we can define a custom serialization?
Hello guys
I was evaluating the posibility of IDLCXX generator generates a weak definition of << operator overloading or a call to an external implementation of it.
I was trying define a custom character formatter so I could translate, for example to a JSON or YML format of the generated object but I see no way of doing it.
By example...
In the HelloWorldSubscriber Example we have
https://vscode.dev/github/eclipse-cyclonedds/cyclonedds-cxx/blob/master/examples/helloworld/subscriber.cpp#L75
the operator << is defined at
https://vscode.dev/github/eclipse-cyclonedds/cyclonedds-cxx/blob/master/build/examples/helloworld/HelloWorldData.cpp#L13
With this, I see no way of defining a custom serializer for the Msg object as string.
If I define another, it will be ambiguous.
isn't there a way of defining, by example a virtual function toString(), on the generated object that receives the ostream object as parameter and can be override so we can define a custom serialization?
Best regards!