[xsd-users] handling auto_ptr?
Azadeh Omrani
a.omrani at gmail.com
Sun Dec 28 06:16:13 EST 2008
Hi,
I have the auto_ptr pointer pointing to the memory which has been filled by
parsing an xml document. This is done in a method of a class.
class A
{
auto_ptr<b::B> p;
public:
void parseData(string); //fills the memory pointed by p using xsd.
void?? getParsedData(auto_ptr<b::B>??);
A();
~A();
}
void main()
{
A * a =new A();
a->parseData("inst.xml");
//How can I have the parsed data here without nullifying the private
parameter p? (coz I will need p locally later)
//auto_ptr<b::B> ap;
//a->getParsedData(ap); ?? This way (ap=p;) the member p will be destroyed
}
Actually I want to know how to make a whole copy of the memory pointed by an
auto_ptr without loosing the source and without double parsing.
Thank you
Azadeh
More information about the xsd-users
mailing list