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 136 of file ExpressionBuilder.h.

Member Enumeration Documentation

◆ NodeType

Constructor & Destructor Documentation

◆ EBUnaryFuncTermNode()

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

Definition at line 153 of file ExpressionBuilder.h.

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

Member Function Documentation

◆ clone()

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

Implements ExpressionBuilder::EBTermNode.

Definition at line 155 of file ExpressionBuilder.h.

156  {
157  return new EBUnaryFuncTermNode(_subnode->clone(), _type);
158  };
virtual EBTermNode * clone() const =0
EBUnaryFuncTermNode(EBTermNode *subnode, NodeType type)
enum ExpressionBuilder::EBUnaryFuncTermNode::NodeType _type

◆ getSubnode()

const EBTermNode* ExpressionBuilder::EBUnaryTermNode::getSubnode ( ) const
inlineinherited

◆ precedence()

virtual int ExpressionBuilder::EBUnaryFuncTermNode::precedence ( ) const
inlinevirtual

Implements ExpressionBuilder::EBTermNode.

Definition at line 161 of file ExpressionBuilder.h.

161 { return 2; }

◆ stringify()

std::string ExpressionBuilder::EBUnaryFuncTermNode::stringify ( ) const
virtual

Implements ExpressionBuilder::EBTermNode.

Definition at line 58 of file ExpressionBuilder.C.

59 {
60  const char * name[] = {"sin", "cos", "tan", "abs", "log", "log2", "log10", "exp", "sinh", "cosh"};
61  std::ostringstream s;
62  s << name[_type] << '(' << *_subnode << ')';
63  return s.str();
64 }
const std::string name
Definition: Setup.h:22
enum ExpressionBuilder::EBUnaryFuncTermNode::NodeType _type

◆ substitute()

virtual unsigned int ExpressionBuilder::EBUnaryTermNode::substitute ( const EBSubstitutionRuleList rule)
virtualinherited

Reimplemented from ExpressionBuilder::EBTermNode.

Member Data Documentation

◆ _subnode

EBTermNode* ExpressionBuilder::EBUnaryTermNode::_subnode
protectedinherited

Definition at line 132 of file ExpressionBuilder.h.

◆ _type

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

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