bcParserCPP 2.8
Math Parser for C++
Public Member Functions | Public Attributes
COneParamNode< _CharT, _ValueT > Class Template Reference

Special case to improve performance. More...

Inheritance diagram for COneParamNode< _CharT, _ValueT >:
CNode< _ValueT >

List of all members.

Public Member Functions

 COneParamNode (CMathParser< _CharT, _ValueT > *pParentParser, CNode< _ValueT > *ChildNode, typename CMathParser< _CharT, _ValueT >::PParserFunction FuncAddr)
virtual _ValueT GetValue ()
 Invoke the underlying function with the proper parameter and return the result.
virtual BOOL IsUsed (void *Addr)
 Is the function or the variable whose address is given used in this node tree?
virtual void Optimize ()
 Optimize the node tree by evaluating constant sub-branches at expression compile time.
virtual CNode< _ValueT >::NODE_TYPE GetType ()
 Return CNode::ONEPARAM as the node type.

Public Attributes

CMathParser< _CharT, _ValueT > * pParentParser
 Parent parser instance.
CNode< _ValueT > * Child
 The only parameter of this function.
CMathParser< _CharT, _ValueT >
::PParserFunction 
fPtr
 User defined function to call.

Detailed Description

template<typename _CharT, typename _ValueT>
class COneParamNode< _CharT, _ValueT >

Special case to improve performance.

COneParamNode one parameter functions such as SIN(X).


Member Function Documentation

template<typename _CharT , typename _ValueT >
virtual _ValueT COneParamNode< _CharT, _ValueT >::GetValue ( ) [inline, virtual]

Invoke the underlying function with the proper parameter and return the result.

When the parameter's value is requested, this can trigger a series of GetValue() calls across the expression sub-tree.

Implements CNode< _ValueT >.


Member Data Documentation

template<typename _CharT , typename _ValueT >
CNode<_ValueT>* COneParamNode< _CharT, _ValueT >::Child

The only parameter of this function.

For example X in SIN(X).

template<typename _CharT , typename _ValueT >
CMathParser<_CharT,_ValueT>* COneParamNode< _CharT, _ValueT >::pParentParser

Parent parser instance.

Used to call the user defined function implementation. In some cases, a user defined function can make use of the parser instance to solve domain specific problems.

 All Classes Functions Variables Typedefs Enumerations