Problem.cpp 904 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. namespace spells
  13. {
  14. namespace detail
  15. {
  16. ProblemImpl::ProblemImpl()
  17. {
  18. }
  19. ProblemImpl::~ProblemImpl()
  20. {
  21. }
  22. void ProblemImpl::add(MetaString && description, Severity severity)
  23. {
  24. data.push_back(std::make_pair(description, severity));
  25. }
  26. void ProblemImpl::getAll(std::vector<std::string> & target) const
  27. {
  28. for(const auto & p : data)
  29. target.push_back(p.first.toString());
  30. }
  31. //void ProblemImpl::getMostSevere(std::vector<std::string> & target) const
  32. //{
  33. // //TODO:
  34. //}
  35. //
  36. //std::string ProblemImpl::getMostSevere() const
  37. //{
  38. // std::vector<std::string> temp;
  39. // getMostSevere(temp);
  40. // return temp.empty() ? "" : temp.front();
  41. //}
  42. }
  43. }