Problem.cpp 954 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Problem.cpp, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #include "StdInc.h"
  11. #include "Problem.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. namespace spells
  14. {
  15. namespace detail
  16. {
  17. ProblemImpl::ProblemImpl()
  18. {
  19. }
  20. ProblemImpl::~ProblemImpl()
  21. {
  22. }
  23. void ProblemImpl::add(MetaString && description, Severity severity)
  24. {
  25. data.push_back(std::make_pair(description, severity));
  26. }
  27. void ProblemImpl::getAll(std::vector<std::string> & target) const
  28. {
  29. for(const auto & p : data)
  30. target.push_back(p.first.toString());
  31. }
  32. //void ProblemImpl::getMostSevere(std::vector<std::string> & target) const
  33. //{
  34. // //TODO:
  35. //}
  36. //
  37. //std::string ProblemImpl::getMostSevere() const
  38. //{
  39. // std::vector<std::string> temp;
  40. // getMostSevere(temp);
  41. // return temp.empty() ? "" : temp.front();
  42. //}
  43. }
  44. }
  45. VCMI_LIB_NAMESPACE_END