PropertyParserKeyword.cpp 535 B

123456789101112131415161718192021
  1. #include "PropertyParserKeyword.h"
  2. namespace Rml {
  3. PropertyParserKeyword::PropertyParserKeyword() {}
  4. PropertyParserKeyword::~PropertyParserKeyword() {}
  5. bool PropertyParserKeyword::ParseValue(Property& property, const String& value, const ParameterMap& parameters) const
  6. {
  7. ParameterMap::const_iterator iterator = parameters.find(StringUtilities::ToLower(value));
  8. if (iterator == parameters.end())
  9. return false;
  10. property.value = Variant((*iterator).second);
  11. property.unit = Unit::KEYWORD;
  12. return true;
  13. }
  14. } // namespace Rml