| 49 | : StubGenerator(stubname, procedures, filename) {} |
| 50 | |
| 51 | void CPPServerStubGenerator::generateStub() { |
| 52 | vector<string> classname = CPPHelper::splitPackages(this->stubname); |
| 53 | CPPHelper::prolog(*this, this->stubname); |
| 54 | |
| 55 | this->writeLine("#include <jsonrpccpp/server.h>"); |
| 56 | this->writeNewLine(); |
| 57 | |
| 58 | int depth = CPPHelper::namespaceOpen(*this, stubname); |
| 59 | |
| 60 | this->writeLine(replaceAll(TEMPLATE_CPPSERVER_SIGCLASS, "<stubname>", classname.at(classname.size() - 1))); |
| 61 | this->writeLine("{"); |
| 62 | this->increaseIndentation(); |
| 63 | this->writeLine("public:"); |
| 64 | this->increaseIndentation(); |
| 65 | |
| 66 | this->writeLine(replaceAll(TEMPLATE_CPPSERVER_SIGCONSTRUCTOR, "<stubname>", classname.at(classname.size() - 1))); |
| 67 | this->writeLine("{"); |
| 68 | this->generateBindings(); |
| 69 | this->writeLine("}"); |
| 70 | |
| 71 | this->writeNewLine(); |
| 72 | |
| 73 | this->generateProcedureDefinitions(); |
| 74 | |
| 75 | this->generateAbstractDefinitions(); |
| 76 | |
| 77 | this->decreaseIndentation(); |
| 78 | this->decreaseIndentation(); |
| 79 | this->writeLine("};"); |
| 80 | this->writeNewLine(); |
| 81 | |
| 82 | CPPHelper::namespaceClose(*this, depth); |
| 83 | CPPHelper::epilog(*this, this->stubname); |
| 84 | } |
| 85 | |
| 86 | void CPPServerStubGenerator::generateBindings() { |
| 87 | string tmp; |
nothing calls this directly
no test coverage detected