I have a problem with serializing classes generated by corba - especially with any kind of sequences - TAO::unbouded_value_sequence, TAO::unbouded_basic_string_sequence, etc.
Is there any "good" solution for serialization of CORBA structures or do I have reverse engineer the code of corba clases and try to write serialization funtion for each of them?
EDIT:
struct Something;
typedef
TAO_Var_Var_T<
Something
>
Something_var;
typedef
TAO_Out_T<
Something
>
Something_out;
struct Something
{
typedef Something_var _var_type;
typedef Something_out _out_type;
static void _tao_any_destructor (void *);
TAO::String_Manager member1;
};
class SequenceOfSomething;
typedef
TAO_VarSeq_Var_T<
SequenceOfSomething
>
SequenceOfSomething_var;
typedef
TAO_Seq_Out_T<
SequenceOfSomething
>
SequenceOfSomething_out;
class SequenceOfSomething
: public
TAO::unbounded_value_sequence<
Something
>
{
public:
SequenceOfSomething (void);
SequenceOfSomething ( ::CORBA::ULong max);
SequenceOfSomething (
::CORBA::ULong max,
::CORBA::ULong length,
SequenceOfSomething* buffer,
::CORBA::Boolean release = false
);
SequenceOfSomething (const SequenceOfSomething &);
virtual ~SequenceOfSomething (void);
static void _tao_any_destructor (void *);
typedef SequenceOfSomething_var _var_type;
typedef SequenceOfSomething_out _out_type;
};
This is some sample code generated from IDL definitions.
I installed the ACE+TAO frameworks, and fiddled with things.¹
It looks like it's easier to go from the actual IDL.
The code to parse the IDL is included in the SDK, so maybe you can leverage that to generate some serialization code.
Sidenote: why Boost Serialize something that has IIOP serialization fully implemented for it? Could you consider Boost Serializing a binary buffer with the ACE serialization? If not, why not?
¹ actually compiling code: http://paste.ubuntu.com/12907686/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With