2017-07-20 06:08:49 +02:00
|
|
|
/*
|
|
|
|
* Problem.cpp, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#include "StdInc.h"
|
|
|
|
|
|
|
|
#include "Problem.h"
|
|
|
|
|
2022-07-26 15:07:42 +02:00
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
|
2017-07-20 06:08:49 +02:00
|
|
|
namespace spells
|
|
|
|
{
|
|
|
|
namespace detail
|
|
|
|
{
|
|
|
|
|
|
|
|
void ProblemImpl::add(MetaString && description, Severity severity)
|
|
|
|
{
|
2023-02-11 17:18:05 +02:00
|
|
|
data.emplace_back(description, severity);
|
2017-07-20 06:08:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void ProblemImpl::getAll(std::vector<std::string> & target) const
|
|
|
|
{
|
|
|
|
for(const auto & p : data)
|
|
|
|
target.push_back(p.first.toString());
|
|
|
|
}
|
|
|
|
|
|
|
|
//void ProblemImpl::getMostSevere(std::vector<std::string> & target) const
|
|
|
|
//{
|
|
|
|
// //TODO:
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//std::string ProblemImpl::getMostSevere() const
|
|
|
|
//{
|
|
|
|
// std::vector<std::string> temp;
|
|
|
|
// getMostSevere(temp);
|
|
|
|
// return temp.empty() ? "" : temp.front();
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2022-07-26 15:07:42 +02:00
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_END
|