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

Component initialization class. More...

#include <ComponentInit.h>

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

Public Member Functions

void apply (const NodeMapper &mapper) override
 Apply the mapper to all child nodes. More...
 
ComponentInitclone () const override
 Create a clone (i.e. More...
 
 ComponentInit (std::string name, Own< ComponentType > type, SrcLocation loc={})
 
std::vector< const Node * > getChildNodes () const override
 Obtain a list of all embedded AST child nodes. More...
 
const ComponentTypegetComponentType () const
 Return component type. More...
 
const std::string & getInstanceName () const
 Return instance name. More...
 
void setComponentType (Own< ComponentType > type)
 Set component type. More...
 
void setInstanceName (std::string name)
 Set instance name. More...
 
- Public Member Functions inherited from souffle::ast::Node
std::string extloc () const
 Return source location of the syntactic element. 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

Own< ComponentTypecomponentType
 Actual component arguments for instantiation. More...
 
std::string instanceName
 Instance name. More...
 

Detailed Description

Component initialization class.

Example: .init X=B<T1,T2>

Intialization of a component with type parameters

Definition at line 47 of file ComponentInit.h.

Constructor & Destructor Documentation

◆ ComponentInit()

souffle::ast::ComponentInit::ComponentInit ( std::string  name,
Own< ComponentType type,
SrcLocation  loc = {} 
)
inline

Definition at line 49 of file ComponentInit.h.

Member Function Documentation

◆ apply()

void souffle::ast::ComponentInit::apply ( const NodeMapper )
inlineoverridevirtual

Apply the mapper to all child nodes.

Reimplemented from souffle::ast::Node.

Definition at line 76 of file ComponentInit.h.

78  :
79  void print(std::ostream& os) const override {

◆ clone()

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

Create a clone (i.e.

deep copy) of this node

Implements souffle::ast::Node.

Definition at line 72 of file ComponentInit.h.

74  {

◆ equal()

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

Abstract equality check for two AST nodes.

Reimplemented from souffle::ast::Node.

Definition at line 89 of file ComponentInit.h.

◆ getChildNodes()

std::vector<const Node*> souffle::ast::ComponentInit::getChildNodes ( ) const
inlineoverridevirtual

Obtain a list of all embedded AST child nodes.

Reimplemented from souffle::ast::Node.

Definition at line 80 of file ComponentInit.h.

83  {

◆ getComponentType()

const ComponentType* souffle::ast::ComponentInit::getComponentType ( ) const
inline

Return component type.

Definition at line 63 of file ComponentInit.h.

66  {

◆ getInstanceName()

const std::string& souffle::ast::ComponentInit::getInstanceName ( ) const
inline

Return instance name.

Definition at line 53 of file ComponentInit.h.

57  {

◆ print()

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

Output to a given output stream.

Implements souffle::ast::Node.

Definition at line 85 of file ComponentInit.h.

◆ setComponentType()

void souffle::ast::ComponentInit::setComponentType ( Own< ComponentType type)
inline

Set component type.

Definition at line 68 of file ComponentInit.h.

70  {

◆ setInstanceName()

void souffle::ast::ComponentInit::setInstanceName ( std::string  name)
inline

Set instance name.

Definition at line 58 of file ComponentInit.h.

62  {

Field Documentation

◆ componentType

Own<ComponentType> souffle::ast::ComponentInit::componentType
protected

Actual component arguments for instantiation.

Definition at line 98 of file ComponentInit.h.

◆ instanceName

std::string souffle::ast::ComponentInit::instanceName
protected

Instance name.

Definition at line 95 of file ComponentInit.h.


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