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

Method namespaceOpen

src/stubgenerator/helper/cpphelper.cpp:167–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167int CPPHelper::namespaceOpen(CodeGenerator &cg, const string &classname) {
168 vector<string> namespaces = splitPackages(classname);
169
170 for (unsigned int i = 0; i < namespaces.size() - 1; i++) {
171 cg.write("namespace ");
172 cg.write(namespaces.at(i));
173 cg.writeLine(" {");
174 cg.increaseIndentation();
175 }
176 return namespaces.size() - 1;
177}
178
179void CPPHelper::namespaceClose(CodeGenerator &cg, int depth) {
180 for (int i = 0; i < depth; i++) {

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.80
writeMethod · 0.80
writeLineMethod · 0.80
increaseIndentationMethod · 0.80

Tested by

no test coverage detected