| 155 | } |
| 156 | |
| 157 | void constructFromString(std::string Input) |
| 158 | { |
| 159 | /** read type from string */ |
| 160 | auto Split = Input.find_first_of(' '); |
| 161 | std::string Name = Input.substr(0, Split); |
| 162 | |
| 163 | /** choose config according to type */ |
| 164 | if(_Config->checkName(Name)) |
| 165 | { |
| 166 | constructEmpty(_Config->getType(Name)); |
| 167 | parseSubstring(Input.substr(Split)); |
| 168 | } |
| 169 | else |
| 170 | { |
| 171 | PRINT_ERROR("Type does not exist: ", Name); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | /** pointer to the the list of configurations */ |
| 176 | const ConfigType * _Config; |