www.mooseframework.org
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
ExpressionBuilder::EBUnaryFuncTermNode Class Reference

Node representing a function with two arguments. More...

#include <ExpressionBuilder.h>

Inheritance diagram for ExpressionBuilder::EBUnaryFuncTermNode:
[legend]

Public Types

enum  NodeType {
  SIN, COS, TAN, ABS,
  LOG, LOG2, LOG10, EXP,
  SINH, COSH
}
 

Public Member Functions

 EBUnaryFuncTermNode (EBTermNode *subnode, NodeType type)
 
virtual EBUnaryFuncTermNodeclone () const
 
virtual std::string stringify () const
 
virtual int precedence () const
 
virtual unsigned int substitute (const EBSubstitutionRuleList &rule)
 
const EBTermNodegetSubnode () const
 

Public Attributes

enum ExpressionBuilder::EBUnaryFuncTermNode::NodeType _type
 

Protected Attributes

EBTermNode_subnode
 

Detailed Description

Node representing a function with two arguments.

Definition at line 133 of file ExpressionBuilder.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

ExpressionBuilder::EBUnaryFuncTermNode::EBUnaryFuncTermNode ( EBTermNode subnode,
NodeType  type 
)
inline

Definition at line 150 of file ExpressionBuilder.h.

151  : EBUnaryTermNode(subnode), _type(type){};
enum ExpressionBuilder::EBUnaryFuncTermNode::NodeType _type

Member Function Documentation

virtual EBUnaryFuncTermNode* ExpressionBuilder::EBUnaryFuncTermNode::clone ( ) const
inlinevirtual

Implements ExpressionBuilder::EBTermNode.

Definition at line 152 of file ExpressionBuilder.h.

153  {
154  return new EBUnaryFuncTermNode(_subnode->clone(), _type);
155  };
virtual EBTermNode * clone() const =0
EBUnaryFuncTermNode(EBTermNode *subnode, NodeType type)
enum ExpressionBuilder::EBUnaryFuncTermNode::NodeType _type
const EBTermNode* ExpressionBuilder::EBUnaryTermNode::getSubnode ( ) const
inlineinherited
virtual int ExpressionBuilder::EBUnaryFuncTermNode::precedence ( ) const
inlinevirtual

Implements ExpressionBuilder::EBTermNode.

Definition at line 158 of file ExpressionBuilder.h.

158 { return 2; }
std::string ExpressionBuilder::EBUnaryFuncTermNode::stringify ( ) const
virtual

Implements ExpressionBuilder::EBTermNode.

Definition at line 55 of file ExpressionBuilder.C.

56 {
57  const char * name[] = {"sin", "cos", "tan", "abs", "log", "log2", "log10", "exp", "sinh", "cosh"};
58  std::ostringstream s;
59  s << name[_type] << '(' << *_subnode << ')';
60  return s.str();
61 }
enum ExpressionBuilder::EBUnaryFuncTermNode::NodeType _type
virtual unsigned int ExpressionBuilder::EBUnaryTermNode::substitute ( const EBSubstitutionRuleList rule)
virtualinherited

Reimplemented from ExpressionBuilder::EBTermNode.

Member Data Documentation

EBTermNode* ExpressionBuilder::EBUnaryTermNode::_subnode
protectedinherited

Definition at line 129 of file ExpressionBuilder.h.

enum ExpressionBuilder::EBUnaryFuncTermNode::NodeType ExpressionBuilder::EBUnaryFuncTermNode::_type

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