Serialization of EO user objects.
This commit is contained in:
parent
cd94be6957
commit
0bd33fe692
16 changed files with 919 additions and 0 deletions
38
eo/src/serial/Array.cpp
Normal file
38
eo/src/serial/Array.cpp
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue