souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
50 class Directive :
public Node {
72 this->name = std::move(
name);
76 const std::string&
getParameter(
const std::string& key)
const {
81 void addParameter(
const std::string& key, std::string value) {
91 const std::map<std::string, std::string>&
getParameters()
const {
102 void print(std::ostream& os)
const override {
105 os <<
"(" <<
join(
parameters,
",", [](std::ostream& out,
const auto& arg) {
106 out << arg.first <<
"=\"" << arg.second <<
"\"";
111 bool equal(
const Node& node)
const override {
112 const auto& other =
static_cast<const Directive&
>(node);
DirectiveType type
Type of directive.
const QualifiedName & getQualifiedName() const
Get relation name.
#define UNREACHABLE_BAD_CASE_ANALYSIS
QualifiedName name
Relation name of the directive.
Directive * clone() const override
Create a clone (i.e.
l j a showGridBackground &&c b raw series this eventEmitter e
Directive(DirectiveType type, QualifiedName name, SrcLocation loc={})
void setQualifiedName(QualifiedName name)
Set relation name.
bool hasParameter(const std::string &key) const
Check for a parameter.
void print(std::ostream &os) const override
Output to a given output stream.
a directive has a type (e.g. input/output/printsize/limitsize), qualified relation name,...
bool equal(const Node &node) const override
Abstract equality check for two AST nodes.
detail::joined_sequence< Iter, Printer > join(const Iter &a, const Iter &b, const std::string &sep, const Printer &p)
Creates an object to be forwarded to some output stream for printing sequences of elements interspers...
void addParameter(const std::string &key, std::string value)
Add new parameter.
std::ostream & operator<<(std::ostream &os, DirectiveType e)
std::map< std::string, std::string > parameters
Parameters of directive.
void setType(DirectiveType type)
Set directive type.
DirectiveType getType() const
Get directive type.
const std::string & getParameter(const std::string &key) const
Get parameter.
const std::map< std::string, std::string > & getParameters() const
Get parameters.
const SrcLocation & getSrcLoc() const
Return source location of the Node.
Qualified Name class defines fully/partially qualified names to identify objects in components.