MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / ConvertEnumConstant

Method ConvertEnumConstant

source/generator_go.cpp:8037–8058  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8035}
8036
8037std::string GeneratorGo::ConvertEnumConstant(const std::string& value)
8038{
8039 std::string ns = "";
8040 std::string t = "";
8041 std::string v = "";
8042
8043 size_t pos = value.find_last_of('.');
8044 if (pos != std::string::npos)
8045 {
8046 t.assign(value, 0, pos);
8047 v.assign(value, pos + 1, value.size() - pos);
8048 }
8049
8050 pos = t.find_last_of('.');
8051 if (pos != std::string::npos)
8052 {
8053 ns.assign(t, 0, pos);
8054 t.assign(t, pos + 1, t.size() - pos);
8055 }
8056
8057 return ns + ConvertToUpper(t) + "_" + v;
8058}
8059
8060std::string GeneratorGo::ConvertEnumConstant(const std::string& name, const std::string& type, const std::string& value)
8061{

Callers

nothing calls this directly

Calls 3

assignMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected