|
Boost Users : |
Subject: Re: [Boost-users] Serialize a Tree
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-07-08 12:56:13
To serialize the tree use
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & type;
ar & name;
ar & parent;
}
I'm not sure what binValue is supposed to be but the following might work
better here
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & name;
ar & type;
ar & attribute_list;
}
string name;
int type;
string attribute_list;
..
"??" <luckyzhangwei_at_[hidden]> wrote in message
news:c7b1c0080907080014u7f117ec7s8b0b874d115c235_at_mail.gmail.com...
i want to serialize a self-defined tree to a binary file and vice-versa.
The data structure is as follows:
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net