ui: generic solution parser

completed first version of generic solution parsers
This commit is contained in:
Manuel Dobusch
2016-05-18 16:50:26 +02:00
parent 2f25279662
commit 5295267513
6 changed files with 24 additions and 39 deletions
@@ -125,6 +125,18 @@ std::string SolutionParserManager::getParserIdeId(const unsigned int idx) const
return "";
}
std::string SolutionParserManager::getIconPath(const unsigned int idx) const
{
if (checkIndex(idx))
{
return m_solutionParsers[idx]->getIconPath();
}
LOG_WARNING_STREAM(<< "Index is out of range, was " << idx << ". Max is " << m_solutionParsers.size() - 1);
return "";
}
bool SolutionParserManager::checkIndex(const unsigned int idx) const
{
return (idx < m_solutionParsers.size());
@@ -24,6 +24,7 @@ public:
std::string getParserDescription(const unsigned int idx) const;
std::string getParserFileEnding(const unsigned int idx) const;
std::string getParserIdeId(const unsigned int idx) const;
std::string getIconPath(const unsigned int idx) const;
private:
bool checkIndex(const unsigned int idx) const;