Antares Simulator
Power System Simulator
Antares::Expressions::Nodes::UnaryNode Class Reference

Represents a unary node in a syntax tree. More...

#include <UnaryNode.h>

Inheritance diagram for Antares::Expressions::Nodes::UnaryNode:
Antares::Expressions::Nodes::ParentNode Antares::Expressions::Nodes::Node Antares::Expressions::IName Antares::Expressions::Nodes::AllTimeSumNode Antares::Expressions::Nodes::NegationNode

Public Member Functions

 UnaryNode (Node *child)
 Constructs a unary node with the specified child. More...
 
Nodechild () const
 Retrieves a pointer to the child node. More...
 
- Public Member Functions inherited from Antares::Expressions::Nodes::ParentNode
template<typename... NodePtr>
 ParentNode (NodePtr... operands)
 
 ParentNode (const std::vector< Node * > &operands)
 Constructs a parent node with the specified operands. More...
 
 ParentNode (std::vector< Node * > &&operands)
 Constructs a parent node with the specified operands. Vector is moved. More...
 
const std::vector< Node * > & getOperands () const
 Retrieves the operands of the parent node. More...
 
const std::vector< const Node * > getConstOperands () const
 
Nodeoperator[] (std::size_t idx) const
 
size_t size () const
 
- Public Member Functions inherited from Antares::Expressions::IName
virtual std::string name () const =0
 
bool operator== (const IName &other) const =default
 

Detailed Description

Represents a unary node in a syntax tree.

Constructor & Destructor Documentation

◆ UnaryNode()

Antares::Expressions::Nodes::UnaryNode::UnaryNode ( Node child)
explicit

Constructs a unary node with the specified child.

Parameters
childThe child node.

Member Function Documentation

◆ child()

Node * Antares::Expressions::Nodes::UnaryNode::child ( ) const

Retrieves a pointer to the child node.

Returns
A pointer to the child node.

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