Add a C++ client for presents.
It provides code generators for streamables, services and receivers, but not DObject. It uses Apple's CFNetwork for its sockets and builds with XCode, so it's limited to OS X and iOS. It should be straightforward to replace both to make it cross-platform. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6264 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#include "presents/stable.h"
|
||||
#include "ClientObject.h"
|
||||
|
||||
using namespace presents::data;
|
||||
|
||||
DEFINE_STREAMABLE("com.threerings.presents.data.ClientObject", ClientObject);
|
||||
|
||||
void ClientObject::readObject (ObjectInputStream& in)
|
||||
{
|
||||
presents::dobj::DObject::readObject(in);
|
||||
username = boost::static_pointer_cast<util::Name>(in.readObject());
|
||||
receivers = boost::static_pointer_cast<presents::dobj::DSet>(in.readObject());
|
||||
permPolicy = boost::static_pointer_cast<presents::data::PermissionPolicy>(in.readObject());
|
||||
}
|
||||
|
||||
void ClientObject::writeObject (ObjectOutputStream& out) const
|
||||
{
|
||||
presents::dobj::DObject::writeObject(out);
|
||||
out.writeObject(username);
|
||||
out.writeObject(receivers);
|
||||
out.writeObject(permPolicy);
|
||||
}
|
||||
Reference in New Issue
Block a user