All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.threerings.presents.tools.cpp.streamable_cpp.mustache Maven / Gradle / Ivy

#include "presents/stable.h"
#include "{{name}}.h"
{{#includes}}
#include "{{this}}"
{{/includes}}

using namespace {{namespace}};

DEFINE_STREAMABLE("{{javaName}}", {{name}});

void {{name}}::readObject (ObjectInputStream& {{inStreamArg}})
{
{{#superclassStreamable}}
    {{super}}::readObject(in);
{{/superclassStreamable}}
{{#fields}}
    {{name}} = {{reader}};
{{/fields}}
}

void {{name}}::writeObject (ObjectOutputStream& {{outStreamArg}}) const
{
{{#superclassStreamable}}
    {{super}}::writeObject(out);
{{/superclassStreamable}}
{{#fields}}
    {{writer}};
{{/fields}}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy