com.threerings.presents.tools.cpp.marshaller_cpp.mustache Maven / Gradle / Ivy
The newest version!
#include "presents/stable.h"
#include "{{name}}.h"
#include "presents/PresentsClient.h"
{{#includes}}
#include "{{this}}"
{{/includes}}
using namespace {{namespace}};
DEFINE_STREAMABLE("{{javaName}}", {{name}});
{{#methods}}
void {{name}}::{{methodName}} ({{clientArguments}})
{
typedef std::vector< Shared > StreamableList;
Shared args(new StreamableList);
{{#serviceArguments}}
args->push_back({{this}});
{{/serviceArguments}}
args->push_back(getSharedThis());
client->sendRequest(invOid, invCode, {{-index}}, args);
}
{{/methods}}
Shared<{{name}}> {{name}}::getSharedThis()
{
return shared_from_this();
}