| souffle
    2.0.2-371-g6315b36
    | 
 
 
 
Go to the documentation of this file.
   43 class FunctorDeclaration : 
public Node {
 
   49         assert(this->name.length() > 0 && 
"functor name is empty");
 
   53     const std::string& 
getName()
 const {
 
   82     void print(std::ostream& out)
 const override {
 
   92             fatal(
"unhandled `TypeAttribute`");
 
  103     bool equal(
const Node& node)
 const override {
 
  110     const std::string 
name;
 
  113     const std::vector<TypeAttribute> 
argsTypes;
 
  
User-defined functor declaration.
const std::string name
Name of functor.
const std::string & getName() const
Return name.
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
const std::vector< TypeAttribute > argsTypes
Types of arguments.
bool equal(const Node &node) const override
Abstract equality check for two AST nodes.
FunctorDeclaration * clone() const override
Create a clone (i.e.
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...
FunctorDeclaration(std::string name, std::vector< TypeAttribute > argsTypes, TypeAttribute returnType, bool stateful, SrcLocation loc={})
size_t getArity() const
Return number of arguments.
const std::vector< TypeAttribute > & getArgsTypes() const
Return type.
bool isStateful() const
Check whether functor is stateful.
void print(std::ostream &out) const override
Output to a given output stream.
const TypeAttribute returnType
Type of the return value.
void fatal(const char *format, const Args &... args)
const bool stateful
Stateful flag.
const SrcLocation & getSrcLoc() const
Return source location of the Node.
TypeAttribute getReturnType() const
Get return type.