souffle  2.0.2-371-g6315b36
Public Member Functions | Protected Member Functions | Protected Attributes
souffle::ast::Variable Class Reference

Named variable class. More...

#include <Variable.h>

Inheritance diagram for souffle::ast::Variable:
Inheritance graph
Collaboration diagram for souffle::ast::Variable:
Collaboration graph

Public Member Functions

Variableclone () const override
 Create clone. More...
 
const std::string & getName () const
 Return variable name. More...
 
void setName (std::string name)
 Set variable name. More...
 
 Variable (std::string name, SrcLocation loc={})
 
- Public Member Functions inherited from souffle::ast::Argument
 Node (SrcLocation loc={})
 
- Public Member Functions inherited from souffle::ast::Node
virtual void apply (const NodeMapper &)
 Apply the mapper to all child nodes. More...
 
std::string extloc () const
 Return source location of the syntactic element. More...
 
virtual std::vector< const Node * > getChildNodes () const
 Obtain a list of all embedded AST child nodes. More...
 
const SrcLocationgetSrcLoc () const
 Return source location of the Node. More...
 
 Node (SrcLocation loc={})
 
bool operator!= (const Node &other) const
 Inequality check for two AST nodes. More...
 
bool operator== (const Node &other) const
 Equivalence check for two AST nodes. More...
 
void setSrcLoc (SrcLocation l)
 Set source location for the Node. More...
 
virtual ~Node ()=default
 

Protected Member Functions

bool equal (const Node &node) const override
 Abstract equality check for two AST nodes. More...
 
void print (std::ostream &os) const override
 Output to a given output stream. More...
 

Protected Attributes

std::string name
 Name. More...
 

Detailed Description

Named variable class.

Definition at line 38 of file Variable.h.

Constructor & Destructor Documentation

◆ Variable()

souffle::ast::Variable::Variable ( std::string  name,
SrcLocation  loc = {} 
)
inline

Definition at line 40 of file Variable.h.

References getName().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

Variable* souffle::ast::Variable::clone ( ) const
inlineoverridevirtual

Create clone.

Implements souffle::ast::Argument.

Definition at line 52 of file Variable.h.

55  {

◆ equal()

bool souffle::ast::Variable::equal ( const Node ) const
inlineoverrideprotectedvirtual

Abstract equality check for two AST nodes.

Reimplemented from souffle::ast::Node.

Definition at line 61 of file Variable.h.

◆ getName()

const std::string& souffle::ast::Variable::getName ( ) const
inline

Return variable name.

Definition at line 48 of file Variable.h.

50  :
51  void print(std::ostream& os) const override {

Referenced by Variable().

◆ print()

void souffle::ast::Variable::print ( std::ostream &  os) const
inlineoverrideprotectedvirtual

Output to a given output stream.

Implements souffle::ast::Node.

Definition at line 57 of file Variable.h.

◆ setName()

void souffle::ast::Variable::setName ( std::string  name)
inline

Set variable name.

Definition at line 43 of file Variable.h.

46  {

Field Documentation

◆ name

std::string souffle::ast::Variable::name
protected

Name.

Definition at line 67 of file Variable.h.


The documentation for this class was generated from the following file:
souffle::ast::analysis::Variable::print
virtual void print(std::ostream &out) const
Adds print support.
Definition: ConstraintSystem.h:166