Parse attribute parameter from parameter text
| 1051 | |
| 1052 | // Parse attribute parameter from parameter text |
| 1053 | Param::Param(const std::string& paramText) |
| 1054 | { |
| 1055 | // parse out name/value pair if there is one |
| 1056 | std::string::size_type pos = paramText.find("=") ; |
| 1057 | if ( pos != std::string::npos ) { |
| 1058 | // name |
| 1059 | name_ = paramText.substr(0, pos); // #nocov start |
| 1060 | trimWhitespace(&name_); |
| 1061 | // value |
| 1062 | value_ = paramText.substr(pos + 1) ; |
| 1063 | trimWhitespace(&value_); |
| 1064 | stripQuotes(&value_); // #nocov end |
| 1065 | } |
| 1066 | else { |
| 1067 | name_ = paramText; |
| 1068 | trimWhitespace(&name_); |
| 1069 | stripQuotes(&name_); |
| 1070 | } |
| 1071 | } |
| 1072 | |
| 1073 | // Check if the attribute has a parameter of a paricular name |
| 1074 | Param Attribute::paramNamed(const std::string& name) const { |
nothing calls this directly
no test coverage detected