Minor refactoring to simplify parser classes.
This commit is contained in:
parent
d7db0d8ccd
commit
c10187f6ba
@ -12,9 +12,8 @@ namespace parsebase
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class CaseSensitiveParserPolicy
|
||||
struct CaseSensitiveParserPolicy
|
||||
{
|
||||
public:
|
||||
static constexpr char transformCharacter(char c) noexcept
|
||||
{
|
||||
return c;
|
||||
@ -38,9 +37,8 @@ class CaseSensitiveParserPolicy
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class CaseInsensitiveParserPolicy
|
||||
struct CaseInsensitiveParserPolicy
|
||||
{
|
||||
public:
|
||||
static char transformCharacter(char c) noexcept
|
||||
{
|
||||
return std::tolower(c);
|
||||
|
@ -30,27 +30,14 @@ class Stream
|
||||
};
|
||||
|
||||
public:
|
||||
explicit Stream();
|
||||
Stream();
|
||||
explicit Stream(std::string streamName, std::istream &istream);
|
||||
~Stream() = default;
|
||||
|
||||
Stream(const Stream &other) = delete;
|
||||
Stream &operator=(const Stream &other) = delete;
|
||||
|
||||
Stream(Stream &&other)
|
||||
: m_stream{std::move(other.m_stream)},
|
||||
m_delimiters{std::move(other.m_delimiters)}
|
||||
{
|
||||
}
|
||||
|
||||
Stream &operator=(Stream &&other)
|
||||
{
|
||||
m_stream = std::move(other.m_stream);
|
||||
m_delimiters = std::move(other.m_delimiters);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
~Stream() = default;
|
||||
Stream(Stream &&other) = default;
|
||||
Stream &operator=(Stream &&other) = default;
|
||||
|
||||
void read(std::string streamName, std::istream &istream);
|
||||
void read(const std::experimental::filesystem::path &path);
|
||||
|
@ -16,9 +16,8 @@ namespace detail
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class PDDLParserPolicy
|
||||
struct PDDLParserPolicy
|
||||
{
|
||||
public:
|
||||
static char transformCharacter(char c) noexcept
|
||||
{
|
||||
return std::tolower(c);
|
||||
|
Reference in New Issue
Block a user