expands a file path (./ becomes the directory of this theme file, ~/ becomes $HOME/)
| 307 | |
| 308 | //expands a file path (./ becomes the directory of this theme file, ~/ becomes $HOME/) |
| 309 | std::string ThemeComponent::expandPath(std::string path) |
| 310 | { |
| 311 | if(path.empty()) |
| 312 | return ""; |
| 313 | |
| 314 | if(path[0] == '~') |
| 315 | path = getHomePath() + path.substr(1, path.length() - 1); |
| 316 | else if(path[0] == '.') |
| 317 | path = boost::filesystem::path(mPath).parent_path().string() + path.substr(1, path.length() - 1); |
| 318 | |
| 319 | return path; |
| 320 | } |
| 321 | |
| 322 | //takes a string containing a mathematical expression (possibly including variables) and resolves it to a float value |
| 323 | float ThemeComponent::resolveExp(std::string str, float defaultVal) |
nothing calls this directly
no test coverage detected