MCPcopy Create free account
hub / github.com/Kistler-Group/sdbus-cpp / createHeader

Method createHeader

tools/xml2cpp-codegen/BaseGenerator.cpp:67–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67std::string BaseGenerator::createHeader(const char* filename, const StubType& stubType) const
68{
69 std::ostringstream head;
70 head << getHeaderComment();
71
72 std::string specialization = stubType == StubType::ADAPTOR ? "adaptor" : "proxy";
73
74 std::string cond_comp{"__sdbuscpp__" + underscorize(filename)
75 + "__" + specialization + "__H__"};
76
77 head << "#ifndef " << cond_comp << endl
78 << "#define " << cond_comp << endl << endl;
79
80 head << "#include <sdbus-c++/sdbus-c++.h>" << endl
81 << "#include <string>" << endl
82 << "#include <tuple>" << endl
83 << endl;
84
85 return head.str();
86}
87
88std::tuple<unsigned, std::string> BaseGenerator::generateNamespaces(const std::string& ifaceName) const
89{

Callers

nothing calls this directly

Calls 2

getHeaderCommentFunction · 0.85
underscorizeFunction · 0.85

Tested by

no test coverage detected