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

String constant class. More...

#include <StringConstant.h>

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

Public Member Functions

StringConstantclone () const override
 Create clone. More...
 
 StringConstant (std::string value, SrcLocation loc={})
 
- Public Member Functions inherited from souffle::ast::Constant
const std::string & getConstant () const
 Get string representation of Constant. More...
 
- 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

void print (std::ostream &os) const override
 Output to a given output stream. More...
 
- Protected Member Functions inherited from souffle::ast::Constant
 Constant (std::string value, SrcLocation loc={})
 
bool equal (const Node &node) const override
 Abstract equality check for two AST nodes. More...
 

Detailed Description

String constant class.

Definition at line 37 of file StringConstant.h.

Constructor & Destructor Documentation

◆ StringConstant()

souffle::ast::StringConstant::StringConstant ( std::string  value,
SrcLocation  loc = {} 
)
inlineexplicit

Definition at line 39 of file StringConstant.h.

43  :
44  void print(std::ostream& os) const override {

Member Function Documentation

◆ clone()

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

Create clone.

Implements souffle::ast::Constant.

Definition at line 43 of file StringConstant.h.

43  :
44  void print(std::ostream& os) const override {
45  os << "\"" << getConstant() << "\"";
46  }
47 };

References souffle::ast::Constant::getConstant().

Here is the call graph for this function:

◆ print()

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

Output to a given output stream.

Reimplemented from souffle::ast::Constant.

Definition at line 50 of file StringConstant.h.


The documentation for this class was generated from the following file:
souffle::ast::Constant::getConstant
const std::string & getConstant() const
Get string representation of Constant.
Definition: Constant.h:43
souffle::ast::StringConstant::print
void print(std::ostream &os) const override
Output to a given output stream.
Definition: StringConstant.h:50