MCPcopy Create free account
hub / github.com/apache/brpc / to_cpp_name

Function to_cpp_name

src/mcpack2pb/generator.cpp:171–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171static std::string to_cpp_name(const std::string& full_name) {
172 std::string cname;
173 cname.reserve(full_name.size() + 8);
174 for (size_t i = 0; i < full_name.size(); ++i) {
175 if (full_name[i] == '.') {
176 cname.append("::", 2);
177 } else {
178 cname.push_back(full_name[i]);
179 }
180 }
181 return cname;
182}
183
184bool generate_declarations(const std::set<std::string>& ref_msgs,
185 const std::set<std::string>& ref_maps,

Callers 3

generate_parsingFunction · 0.85
generate_serializingFunction · 0.85
generate_registrationFunction · 0.85

Calls 4

reserveMethod · 0.45
sizeMethod · 0.45
appendMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected