MCPcopy Create free account
hub / github.com/cinemast/libjson-rpc-cpp / prolog

Method prolog

src/stubgenerator/helper/cpphelper.cpp:145–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void CPPHelper::prolog(CodeGenerator &cg, const string &stubname) {
146 cg.writeLine("/**");
147 cg.writeLine(" * This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY!");
148 cg.writeLine(" */");
149 cg.writeNewLine();
150
151 string stub_upper = stubname;
152 std::transform(stub_upper.begin(), stub_upper.end(), stub_upper.begin(), ::toupper);
153 StubGenerator::replaceAll2(stub_upper, "::", "_");
154
155 cg.writeLine(StubGenerator::replaceAll(TEMPLATE_CPPSERVER_GUARD1, "<STUBNAME>", stub_upper));
156 cg.writeLine(StubGenerator::replaceAll(TEMPLATE_CPPSERVER_GUARD2, "<STUBNAME>", stub_upper));
157 cg.writeNewLine();
158}
159
160void CPPHelper::epilog(CodeGenerator &cg, const string &stubname) {
161 string stub_upper = stubname;

Callers

nothing calls this directly

Calls 4

writeLineMethod · 0.80
writeNewLineMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected