Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (17 sloc) 0.565 kB
#include "presents/stable.h"
#include "DSet.h"
using namespace presents::dobj;
DEFINE_STREAMABLE("com.threerings.presents.dobj.DSet", DSet);
void DSet::readObject (ObjectInputStream& in)
{
size = in.readInt();
entries = Shared<std::vector< Shared <Streamable> > >(new std::vector< Shared <Streamable> >(size));
for (int ii = 0; ii < size; ii++) {
(*entries)[ii] = boost::static_pointer_cast<Streamable>(in.readObject());
}
}
void DSet::writeObject (ObjectOutputStream& out) const
{
out.writeInt(size);
out.writeField(entries);
}
Jump to Line
Something went wrong with that request. Please try again.