[Property Message] How to store variant in property tree

Hi
I want to store variant object in my property tree. The variant for now
will have only 3dPoint object, but it should vary multiple types in future.
I tried the following code , and I am getting compiler errors. I know
that maybe I need to write some kind of translation code for this to
work,but don't know how to do that exactly and having hard time to grasp
the concept. So how can I do this if possibly at all ? A code example
would be great
class 3dPoint
{
public:
3dPoint(double,double,double);
double x;
double y;
double z;
};
typedef boost::variant

Hi I want to store variant object in my property tree. The variant for now will have only 3dPoint object, but it should vary multiple types in future. I tried the following code , and I am getting compiler errors. I know that maybe I need to write some kind of translation code for this to work,but don't know how to do that exactly and having hard time to grasp the concept. So how can I do this if possibly at all ? A code example would be great The serializations of property_tree are not tested for tree's that don't use some basic_string instantiation as key and value type. It's very
On 21.12.2012 08:27, Elizabeta wrote: likely that they just don't work. Sorry. This is somewhere on my plans for the future, but don't hold your breath. Sebastian

On 12/21/2012 11:33 AM, Sebastian Redl wrote:
Hi I want to store variant object in my property tree. The variant for now will have only 3dPoint object, but it should vary multiple types in future. I tried the following code , and I am getting compiler errors. I know that maybe I need to write some kind of translation code for this to work,but don't know how to do that exactly and having hard time to grasp the concept. So how can I do this if possibly at all ? A code example would be great The serializations of property_tree are not tested for tree's that don't use some basic_string instantiation as key and value type. It's very
On 21.12.2012 08:27, Elizabeta wrote: likely that they just don't work. Sorry.
This is somewhere on my plans for the future, but don't hold your breath.
Sebastian
Thank you, good to know
participants (2)
-
Elizabeta
-
Sebastian Redl