MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetFriendlyName

Method GetFriendlyName

tools/mkclass/classcompiler.hpp:113–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 int Priority{0};
112
113 inline std::string GetFriendlyName() const
114 {
115 if (!AlternativeName.empty())
116 return AlternativeName;
117
118 bool cap = true;
119 std::string name = Name;
120
121 for (char& ch : name) {
122 if (ch == '_') {
123 cap = true;
124 continue;
125 }
126
127 if (cap) {
128 ch = toupper(ch);
129 cap = false;
130 }
131 }
132
133 name.erase(
134 std::remove(name.begin(), name.end(), '_'),
135 name.end()
136 );
137
138 /* TODO: figure out name */
139 return name;
140 }
141};
142
143enum TypeAttribute

Callers 1

HandleClassMethod · 0.80

Calls 4

emptyMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected