patrick
/
plasp
Archived
1
0
Fork 0
This repository has been archived on 2023-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
plasp/lib/pddlparse/include/pddlparse/Context.h

50 lines
1.1 KiB
C++

#ifndef __PDDL_PARSE__CONTEXT_H
#define __PDDL_PARSE__CONTEXT_H
#include <functional>
#include <pddlparse/Tokenizer.h>
namespace pddl
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Context
//
////////////////////////////////////////////////////////////////////////////////////////////////////
struct Context
{
constexpr static const char *auxiliaryPrefix()
{
return "__plasp_";
}
// TODO: replace std::string with char *
using WarningCallback = std::function<void (tokenize::Location, const std::string &)>;
Context() = default;
~Context() = default;
explicit Context(Tokenizer &&tokenizer, WarningCallback warningCallback)
: tokenizer{std::move(tokenizer)},
warningCallback{warningCallback}
{
}
Context(const Context &other) = delete;
Context &operator=(const Context &other) = delete;
Context(Context &&other) = default;
Context &operator=(Context &&other) = default;
Tokenizer tokenizer;
WarningCallback warningCallback;
};
////////////////////////////////////////////////////////////////////////////////////////////////////
}
#endif