MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
EE_Assign Class Reference

#include <evaluator_impl.h>

Inheritance diagram for EE_Assign:
Collaboration diagram for EE_Assign:

Public Member Functions

 EE_Assign (Var *var, MathParser::NameSpace *ns, ExpressionElement *pEE)
 
 ~EE_Assign (void)
 
TypedValue Eval (void) const
 
std::ostream & Output (std::ostream &out) const
 
- Public Member Functions inherited from ExpressionElement
virtual ~ExpressionElement (void)
 

Private Attributes

Varm_Var
 
MathParser::NameSpacem_ns
 
const ExpressionElementm_pEE
 

Additional Inherited Members

- Public Types inherited from ExpressionElement
enum  EEFlags { EE_NONE = 0x0U, EE_CONSTIFY = 0x1U, EE_OPTIMIZE = EE_CONSTIFY }
 
- Static Public Member Functions inherited from ExpressionElement
static unsigned GetFlags (void)
 
static void SetFlag (EEFlags f)
 
static void ClearFlag (EEFlags f)
 
static bool IsFlag (EEFlags f)
 
- Static Protected Attributes inherited from ExpressionElement
static unsigned m_uEEFlags
 

Detailed Description

Definition at line 537 of file evaluator_impl.h.

Constructor & Destructor Documentation

EE_Assign::EE_Assign ( Var var,
MathParser::NameSpace ns,
ExpressionElement pEE 
)
inline

Definition at line 544 of file evaluator_impl.h.

544 : m_Var(var), m_ns(ns), m_pEE(pEE) {};
MathParser::NameSpace * m_ns
const ExpressionElement * m_pEE
EE_Assign::~EE_Assign ( void  )
inline

Definition at line 545 of file evaluator_impl.h.

References m_pEE.

545 { delete m_pEE; };
const ExpressionElement * m_pEE

Member Function Documentation

TypedValue EE_Assign::Eval ( void  ) const
inlinevirtual

Implements ExpressionElement.

Definition at line 548 of file evaluator_impl.h.

References ExpressionElement::Eval(), m_pEE, m_Var, and Var::SetVal().

549  {
550  TypedValue v(m_pEE->Eval());
551  m_Var->SetVal(v);
552  return v;
553  };
virtual TypedValue Eval(void) const =0
const ExpressionElement * m_pEE
void SetVal(const bool &b)
Definition: mathp.cc:1829

Here is the call graph for this function:

std::ostream& EE_Assign::Output ( std::ostream &  out) const
inlinevirtual

Implements ExpressionElement.

Definition at line 556 of file evaluator_impl.h.

References NamedValue::GetName(), m_ns, m_pEE, m_Var, ExpressionElement::Output(), and MathParser::NameSpace::sGetName().

557  {
558  out << "(";
559  if (m_ns) {
560  out << m_ns->sGetName() << "::";
561  }
562 
563  return out << m_Var->GetName() << " = ", m_pEE->Output(out) << ")";
564  };
MathParser::NameSpace * m_ns
const ExpressionElement * m_pEE
virtual std::ostream & Output(std::ostream &out) const =0
virtual const std::string & sGetName(void) const
Definition: mathp.cc:2001
const char * GetName(void) const
Definition: mathp.cc:1751

Here is the call graph for this function:

Member Data Documentation

MathParser::NameSpace* EE_Assign::m_ns
private

Definition at line 540 of file evaluator_impl.h.

Referenced by Output().

const ExpressionElement* EE_Assign::m_pEE
private

Definition at line 541 of file evaluator_impl.h.

Referenced by Eval(), Output(), and ~EE_Assign().

Var* EE_Assign::m_Var
mutableprivate

Definition at line 539 of file evaluator_impl.h.

Referenced by Eval(), and Output().


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