Serialization of EO user objects.

This commit is contained in:
Benjamin Bouvier 2012-06-15 10:56:59 +02:00
commit 0bd33fe692
16 changed files with 919 additions and 0 deletions

38
eo/src/serial/Array.cpp Normal file
View file

@ -0,0 +1,38 @@
# include "Array.h"
namespace eoserial
{
std::ostream& Array::print( std::ostream& out ) const
{
out << "[";
bool first = true;
for (ArrayChildren::const_iterator it = begin(),
end = this->end();
it != end;
++it)
{
if ( first )
{
first = false;
} else {
out << ", ";
}
(*it)->print( out );
}
out << "]\n";
return out;
}
Array::~Array()
{
for (ArrayChildren::iterator it = begin(),
end = this->end();
it != end;
++it)
{
delete *it;
}
}
} // namespace eoserial