| 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 | |
| 143 | enum TypeAttribute |
no test coverage detected