SeExprFuncNode Class Reference

Node that calls a function. More...

#include <SeExprNode.h>

Inheritance diagram for SeExprFuncNode:
SeExprNode

List of all members.

Classes

struct  Data
 base class for custom instance data More...

Public Member Functions

 SeExprFuncNode (const SeExpression *expr, const char *name)
virtual ~SeExprFuncNode ()
virtual bool prep (bool wantVec)
virtual void eval (SeVec3d &result) const
 Evaluation method. Note: v[1] and v[2] are undefined if !isVec.
void setIsVec (bool isVec)
const char * name () const
int nargs () const
 return the number of arguments
double * scalarArgs () const
SeVec3dvecArgs () const
SeVec3devalArgs () const
 eval all arguments (use in eval())
SeVec3d evalArg (int n) const
 eval an argument (use in eval())
bool isStrArg (int n) const
 returns whether the nth argument is a string (use in prep)
std::string getStrArg (int n) const
 get nth string argument (use in prep)
void setData (Data *data) const
 associate blind data with this node (subsequently owned by this object)
DatagetData () const
 get associated blind data (returns 0 if none)

Private Attributes

std::string _name
const SeExprFunc_func
int _nargs
std::vector< double > _scalarArgs
std::vector< SeVec3d_vecArgs
Data_data

Detailed Description

Node that calls a function.

Definition at line 431 of file SeExprNode.h.


Constructor & Destructor Documentation

SeExprFuncNode::SeExprFuncNode ( const SeExpression expr,
const char *  name 
) [inline]

Definition at line 434 of file SeExprNode.h.

References SeExpression::addFunc().

virtual SeExprFuncNode::~SeExprFuncNode (  )  [inline, virtual]

Definition at line 439 of file SeExprNode.h.

References _data.


Member Function Documentation

void SeExprFuncNode::eval ( SeVec3d v  )  const [virtual]
SeVec3d SeExprFuncNode::evalArg ( int  n  )  const

eval an argument (use in eval())

Definition at line 738 of file SeExprNode.cpp.

References SeExprNode::child(), SeExprNode::eval(), and SeExprNode::isVec().

SeVec3d * SeExprFuncNode::evalArgs (  )  const

eval all arguments (use in eval())

Definition at line 725 of file SeExprNode.cpp.

References _nargs, a, SeExprNode::child(), SeExprNode::eval(), SeExprNode::isVec(), and vecArgs().

Referenced by eval().

Data* SeExprFuncNode::getData (  )  const [inline]

get associated blind data (returns 0 if none)

Definition at line 483 of file SeExprNode.h.

References _data.

Referenced by SeExpr::PrintFuncX::eval(), SeExpr::CCurveFuncX::eval(), SeExpr::CurveFuncX::eval(), and SeExpr::CachedVoronoiFunc::eval().

std::string SeExprFuncNode::getStrArg ( int  n  )  const

get nth string argument (use in prep)

Definition at line 754 of file SeExprNode.cpp.

References _nargs, and SeExprNode::child().

Referenced by SeExpr::PrintFuncX::prep().

bool SeExprFuncNode::isStrArg ( int  n  )  const

returns whether the nth argument is a string (use in prep)

Definition at line 748 of file SeExprNode.cpp.

References SeExprNode::child().

Referenced by SeExprEdExpression::DummyFuncX::prep(), and SeExpr::PrintFuncX::prep().

const char* SeExprFuncNode::name (  )  const [inline]

Definition at line 444 of file SeExprNode.h.

References _name.

int SeExprFuncNode::nargs (  )  const [inline]

return the number of arguments

Definition at line 448 of file SeExprNode.h.

References _nargs.

Referenced by SeExpr::PrintFuncX::prep(), SeExpr::CCurveFuncX::prep(), and SeExpr::CurveFuncX::prep().

bool SeExprFuncNode::prep ( bool  wantVec  )  [virtual]
double* SeExprFuncNode::scalarArgs (  )  const [inline]

Definition at line 450 of file SeExprNode.h.

References _scalarArgs.

Referenced by eval().

void SeExprFuncNode::setData ( Data data  )  const [inline]

associate blind data with this node (subsequently owned by this object)

Definition at line 476 of file SeExprNode.h.

References _data.

Referenced by SeExpr::PrintFuncX::prep(), SeExpr::CCurveFuncX::prep(), SeExpr::CurveFuncX::prep(), and SeExpr::CachedVoronoiFunc::prep().

void SeExprFuncNode::setIsVec ( bool  isVec  )  [inline]

Definition at line 443 of file SeExprNode.h.

References SeExprNode::_isVec.

SeVec3d* SeExprFuncNode::vecArgs (  )  const [inline]

Definition at line 451 of file SeExprNode.h.

References _vecArgs.

Referenced by evalArgs().


Member Data Documentation

Data* SeExprFuncNode::_data [mutable, private]

Definition at line 491 of file SeExprNode.h.

Referenced by getData(), setData(), and ~SeExprFuncNode().

Definition at line 487 of file SeExprNode.h.

Referenced by eval(), and prep().

std::string SeExprFuncNode::_name [private]

Definition at line 486 of file SeExprNode.h.

Referenced by name(), and prep().

int SeExprFuncNode::_nargs [private]

Definition at line 488 of file SeExprNode.h.

Referenced by eval(), evalArgs(), getStrArg(), nargs(), and prep().

std::vector<double> SeExprFuncNode::_scalarArgs [mutable, private]

Definition at line 489 of file SeExprNode.h.

Referenced by prep(), and scalarArgs().

std::vector<SeVec3d> SeExprFuncNode::_vecArgs [mutable, private]

Definition at line 490 of file SeExprNode.h.

Referenced by prep(), and vecArgs().


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

Generated on 25 Jul 2013 for SeExpr by  doxygen 1.6.1