Loading...
Searching...
No Matches
NodeList Class Reference

Ordered list of abstract syntax tree nodes. More...

#include <variableExpressionAST.h>

Public Member Functions

 NodeList (std::vector< std::unique_ptr< Node > > &&nodes)
 
SDF_API std::vector< Node * > GetNodes ()
 Return list of nodes in this collection.
 
SDF_API std::vector< const Node * > GetNodes () const
 Return list of nodes in this collection.
 
SDF_API void Append (const Node &node)
 Append a copy of node to the end of this collection.
 
SDF_API void Set (size_t i, const Node &node)
 Set the node at index i to a copy of node.
 
SDF_API void Insert (size_t i, const Node &node)
 Insert a copy of node at index i.
 
SDF_API void Remove (size_t i)
 Remove the node at index i.
 
SDF_API void Clear ()
 Clear all nodes.
 
SDF_API NodeList Clone () const
 Copy all nodes in this collection to a new collection.
 

Detailed Description

Ordered list of abstract syntax tree nodes.

Definition at line 78 of file variableExpressionAST.h.

Member Function Documentation

◆ Append()

SDF_API void Append ( const Node & node)

Append a copy of node to the end of this collection.

◆ Clear()

SDF_API void Clear ( )

Clear all nodes.

◆ Clone()

SDF_API NodeList Clone ( ) const

Copy all nodes in this collection to a new collection.

◆ GetNodes() [1/2]

SDF_API std::vector< Node * > GetNodes ( )

Return list of nodes in this collection.

◆ GetNodes() [2/2]

SDF_API std::vector< const Node * > GetNodes ( ) const

Return list of nodes in this collection.

◆ Insert()

SDF_API void Insert ( size_t i,
const Node & node )

Insert a copy of node at index i.

i must be in the range [0, GetNodes().size()]. Otherwise, a coding error will be emitted and no changes will be made to this list.

◆ Remove()

SDF_API void Remove ( size_t i)

Remove the node at index i.

If i is not the index of a node in this list, a coding error will be emitted and no changes will be made.

◆ Set()

SDF_API void Set ( size_t i,
const Node & node )

Set the node at index i to a copy of node.

If i is not the index of a node in this list, a coding error will be emitted and no changes will be made.


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