KiCad PCB EDA Suite
LIBEVAL::TREE_NODE Class Reference

#include <libeval_compiler.h>

Public Member Functions

void SetUop (int aOp, double aValue)
 
void SetUop (int aOp, const wxString &aValue, bool aStringIsWildcard)
 
void SetUop (int aOp, std::unique_ptr< VAR_REF > aRef=nullptr)
 
void SetUop (int aOp, FUNC_CALL_REF aFunc, std::unique_ptr< VAR_REF > aRef=nullptr)
 

Public Attributes

T_TOKEN_VALUE value
 
int op
 
TREE_NODEleaf [2]
 
UOPuop
 
bool valid
 
bool isTerminal
 
bool isVisited
 
int srcPos
 

Detailed Description

Definition at line 131 of file libeval_compiler.h.

Member Function Documentation

◆ SetUop() [1/4]

void LIBEVAL::TREE_NODE::SetUop ( int  aOp,
double  aValue 
)

Definition at line 699 of file libeval_compiler.cpp.

700 {
701  delete uop;
702 
703  std::unique_ptr<VALUE> val = std::make_unique<VALUE>( aValue );
704  uop = new UOP( aOp, std::move( val ) );
705 }

References uop.

Referenced by LIBEVAL::COMPILER::generateUCode().

◆ SetUop() [2/4]

void LIBEVAL::TREE_NODE::SetUop ( int  aOp,
const wxString &  aValue,
bool  aStringIsWildcard 
)

Definition at line 708 of file libeval_compiler.cpp.

709 {
710  delete uop;
711 
712  std::unique_ptr<VALUE> val = std::make_unique<VALUE>( aValue, aStringIsWildcard );
713  uop = new UOP( aOp, std::move( val ) );
714 }

References uop.

◆ SetUop() [3/4]

void LIBEVAL::TREE_NODE::SetUop ( int  aOp,
std::unique_ptr< VAR_REF aRef = nullptr 
)

Definition at line 717 of file libeval_compiler.cpp.

718 {
719  delete uop;
720 
721  uop = new UOP( aOp, std::move( aRef ) );
722 }

References uop.

◆ SetUop() [4/4]

void LIBEVAL::TREE_NODE::SetUop ( int  aOp,
FUNC_CALL_REF  aFunc,
std::unique_ptr< VAR_REF aRef = nullptr 
)

Definition at line 725 of file libeval_compiler.cpp.

726 {
727  delete uop;
728 
729  uop = new UOP( aOp, std::move( aFunc ), std::move( aRef ) );
730 }

References uop.

Member Data Documentation

◆ isTerminal

bool LIBEVAL::TREE_NODE::isTerminal

Definition at line 140 of file libeval_compiler.h.

Referenced by LIBEVAL::COMPILER::generateUCode().

◆ isVisited

bool LIBEVAL::TREE_NODE::isVisited

Definition at line 141 of file libeval_compiler.h.

Referenced by LIBEVAL::COMPILER::generateUCode(), and LIBEVAL::prepareTree().

◆ leaf

◆ op

int LIBEVAL::TREE_NODE::op

◆ srcPos

int LIBEVAL::TREE_NODE::srcPos

Definition at line 142 of file libeval_compiler.h.

Referenced by LIBEVAL::COMPILER::generateUCode().

◆ uop

UOP* LIBEVAL::TREE_NODE::uop

◆ valid

bool LIBEVAL::TREE_NODE::valid

Definition at line 139 of file libeval_compiler.h.

◆ value

T_TOKEN_VALUE LIBEVAL::TREE_NODE::value

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