Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Expressions::Visitors::NodeVisitor< R, Args > Class Template Referenceabstract
Inheritance diagram for Antares::Expressions::Visitors::NodeVisitor< R, Args >:
Antares::Expressions::IName

Public Member Functions

dispatch (const Nodes::Node *node, Args... args)
 
virtual R visit (const Nodes::SumNode *, Args... args)=0
 Visits a SumNode and processes its children.
 
virtual R visit (const Nodes::SubtractionNode *, Args... args)=0
 Visits a SubtractionNode and processes its children.
 
virtual R visit (const Nodes::MultiplicationNode *, Args... args)=0
 Visits a MultiplicationNode and processes its children.
 
virtual R visit (const Nodes::DivisionNode *, Args... args)=0
 Visits a DivisionNode and processes its children.
 
virtual R visit (const Nodes::EqualNode *, Args... args)=0
 Visits an EqualNode and processes its children.
 
virtual R visit (const Nodes::LessThanOrEqualNode *, Args... args)=0
 Visits a LessThanOrEqualNode and processes its children.
 
virtual R visit (const Nodes::GreaterThanOrEqualNode *, Args... args)=0
 Visits a GreaterThanOrEqualNode and processes its children.
 
virtual R visit (const Nodes::NegationNode *, Args... args)=0
 Visits a NegationNode and processes its child.
 
virtual R visit (const Nodes::LiteralNode *, Args... args)=0
 Visits a LiteralNode.
 
virtual R visit (const Nodes::VariableNode *, Args... args)=0
 Visits a VariableNode.
 
virtual R visit (const Nodes::ParameterNode *, Args... args)=0
 Visits a ParameterNode.
 
virtual R visit (const Nodes::PortFieldNode *, Args... args)=0
 Visits a PortFieldNode.
 
virtual R visit (const Nodes::PortFieldSumNode *, Args... args)=0
 Visits a PortFieldSumNode.
 
virtual R visit (const Nodes::ComponentVariableNode *, Args... args)=0
 Visits a ComponentVariableNode.
 
virtual R visit (const Nodes::ComponentParameterNode *, Args... args)=0
 Visits a ComponentParameterNode.
 
- Public Member Functions inherited from Antares::Expressions::IName
virtual std::string name () const =0
 
bool operator== (const IName &other) const =default
 

Member Function Documentation

◆ dispatch()

template<class R , class... Args>
R Antares::Expressions::Visitors::NodeVisitor< R, Args >::dispatch ( const Nodes::Node * node,
Args... args )
inline

Dispatches a node to an appropriate visitor function based on its type.

This method uses a map that associates node types with their corresponding visitor functions. It attempts to find the visitor function for the provided node. If a match is found, the corresponding visitor function is called with the node, and any additional arguments (args...).

Parameters
nodeA pointer to the Node object to be visited.
argsVariadic template arguments to be passed to the visitor functions.
Returns
The return value of the visitor function.

◆ visit() [1/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::ComponentParameterNode * ,
Args... args )
pure virtual

Visits a ComponentParameterNode.

Parameters
nodeA pointer to the ComponentParameterNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the ComponentParameterNode.

◆ visit() [2/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::ComponentVariableNode * ,
Args... args )
pure virtual

Visits a ComponentVariableNode.

Parameters
nodeA pointer to the ComponentVariableNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the ComponentVariableNode.

◆ visit() [3/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::DivisionNode * ,
Args... args )
pure virtual

Visits a DivisionNode and processes its children.

Parameters
nodeA pointer to the DivisionNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the DivisionNode.

◆ visit() [4/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::EqualNode * ,
Args... args )
pure virtual

Visits an EqualNode and processes its children.

Parameters
nodeA pointer to the EqualNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the EqualNode.

◆ visit() [5/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::GreaterThanOrEqualNode * ,
Args... args )
pure virtual

Visits a GreaterThanOrEqualNode and processes its children.

Parameters
nodeA pointer to the GreaterThanOrEqualNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the GreaterThanOrEqualNode.

◆ visit() [6/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::LessThanOrEqualNode * ,
Args... args )
pure virtual

Visits a LessThanOrEqualNode and processes its children.

Parameters
nodeA pointer to the LessThanOrEqualNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the LessThanOrEqualNode.

◆ visit() [7/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::LiteralNode * ,
Args... args )
pure virtual

Visits a LiteralNode.

Parameters
nodeA pointer to the LiteralNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the LiteralNode.

◆ visit() [8/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::MultiplicationNode * ,
Args... args )
pure virtual

Visits a MultiplicationNode and processes its children.

Parameters
nodeA pointer to the MultiplicationNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the MultiplicationNode.

◆ visit() [9/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::NegationNode * ,
Args... args )
pure virtual

Visits a NegationNode and processes its child.

Parameters
nodeA pointer to the NegationNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the NegationNode.

◆ visit() [10/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::ParameterNode * ,
Args... args )
pure virtual

Visits a ParameterNode.

Parameters
nodeA pointer to the ParameterNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the ParameterNode.

◆ visit() [11/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::PortFieldNode * ,
Args... args )
pure virtual

Visits a PortFieldNode.

Parameters
nodeA pointer to the PortFieldNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the PortFieldNode.

◆ visit() [12/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::PortFieldSumNode * ,
Args... args )
pure virtual

Visits a PortFieldSumNode.

Parameters
nodeA pointer to the PortFieldSumNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the PortFieldSumNode.

◆ visit() [13/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::SubtractionNode * ,
Args... args )
pure virtual

Visits a SubtractionNode and processes its children.

Parameters
nodeA pointer to the SubtractionNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the SubtractionNode.

◆ visit() [14/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::SumNode * ,
Args... args )
pure virtual

Visits a SumNode and processes its children.

Parameters
nodeA pointer to the SumNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the SumNode.

◆ visit() [15/15]

template<class R , class... Args>
virtual R Antares::Expressions::Visitors::NodeVisitor< R, Args >::visit ( const Nodes::VariableNode * ,
Args... args )
pure virtual

Visits a VariableNode.

Parameters
nodeA pointer to the VariableNode to be visited.
argsAdditional arguments to be passed to the visitor's methods.
Returns
The result of processing the VariableNode.

The documentation for this class was generated from the following file: