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

Defines the argument class for subrountines. More...

#include <SubroutineArgument.h>

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

Public Member Functions

SubroutineArgumentclone () const override
 Create clone. More...
 
size_t getNumber () const
 Return argument index. More...
 
 SubroutineArgument (size_t index, 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...
 

Private Attributes

size_t index
 Index of subroutine argument. More...
 

Detailed Description

Defines the argument class for subrountines.

Definition at line 39 of file SubroutineArgument.h.

Constructor & Destructor Documentation

◆ SubroutineArgument()

souffle::ast::SubroutineArgument::SubroutineArgument ( size_t  index,
SrcLocation  loc = {} 
)
inline

Definition at line 41 of file SubroutineArgument.h.

42 {

References souffle::ast::Node::getSrcLoc(), and index.

Here is the call graph for this function:

Member Function Documentation

◆ clone()

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

Create clone.

Implements souffle::ast::Argument.

Definition at line 48 of file SubroutineArgument.h.

51  {

◆ equal()

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

Abstract equality check for two AST nodes.

Reimplemented from souffle::ast::Node.

Definition at line 57 of file SubroutineArgument.h.

◆ getNumber()

size_t souffle::ast::SubroutineArgument::getNumber ( ) const
inline

Return argument index.

Definition at line 44 of file SubroutineArgument.h.

46  :
47  void print(std::ostream& os) const override {

◆ print()

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

Output to a given output stream.

Implements souffle::ast::Node.

Definition at line 53 of file SubroutineArgument.h.

56  :
57  /** Index of subroutine argument */

Field Documentation

◆ index

size_t souffle::ast::SubroutineArgument::index
private

Index of subroutine argument.

Definition at line 64 of file SubroutineArgument.h.

Referenced by SubroutineArgument().


The documentation for this class was generated from the following file:
souffle::ast::SubroutineArgument::print
void print(std::ostream &os) const override
Output to a given output stream.
Definition: SubroutineArgument.h:53