Moved parsing utilities to separate namespace.
This commit is contained in:
@@ -44,8 +44,6 @@ class Description
|
||||
|
||||
void parseSectionIdentifier(std::istream &istream, const std::string &expectedSectionIdentifier) const;
|
||||
|
||||
template<class T>
|
||||
T parse(std::istream &istream) const;
|
||||
const Variable &parseVariable(std::istream &istream) const;
|
||||
const Value &parseValue(std::istream &istream, const Variable &variable) const;
|
||||
AssignedVariable parseAssignedVariable(std::istream &istream) const;
|
||||
|
@@ -1,56 +0,0 @@
|
||||
#ifndef __SAS__PARSER_EXCEPTION_H
|
||||
#define __SAS__PARSER_EXCEPTION_H
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
namespace plasp
|
||||
{
|
||||
namespace sas
|
||||
{
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ParserException
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class ParserException: public std::exception
|
||||
{
|
||||
public:
|
||||
explicit ParserException()
|
||||
{
|
||||
}
|
||||
|
||||
explicit ParserException(const char *message)
|
||||
: m_message(message)
|
||||
{
|
||||
}
|
||||
|
||||
explicit ParserException(const std::string &message)
|
||||
: m_message(message)
|
||||
{
|
||||
}
|
||||
|
||||
~ParserException() throw()
|
||||
{
|
||||
}
|
||||
|
||||
const char *what() const throw()
|
||||
{
|
||||
if (m_message.empty())
|
||||
return "Unspecified error while parsing SAS description file";
|
||||
|
||||
return m_message.c_str();
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_message;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user