|
amath
1.8.5
Simple command line calculator
|
A user defined function. More...
#include <userfunction.h>

Public Member Functions | |
| UserFunction (const char *name, const char *variable, ExpressionNode *expression) | |
| UserFunction (const char *name) | |
| ~UserFunction () | |
| char * | GetName () const |
| char * | GetDefinitionName () const |
| char * | GetDefinitionText () const |
| Variable * | GetVariable () const |
| Variable * | CreateVariable (const char *name) |
| ExpressionNode * | GetExpression () const |
| void | SetExpression (ExpressionNode *expression) |
Public Attributes | |
| UserFunction * | Next |
Private Member Functions | |
| void | InitializeTexts () const |
Private Attributes | |
| char * | name |
| Variable * | variable |
| ExpressionNode * | expression |
| bool | chainDelete |
| CharBuffer * | defname |
| CharBuffer * | definition |
Friends | |
| bool | FunctionList::Delete (const char *name, const char *argument) |
A user defined function.
Definition at line 44 of file userfunction.h.
| UserFunction::UserFunction | ( | const char * | name, |
| const char * | variable, | ||
| ExpressionNode * | expression | ||
| ) |
Definition at line 34 of file userfunction.cpp.
References AllocAndCopy(), chainDelete, CharBuffer::CharBuffer(), definition, defname, expression, InitializeTexts(), name, Next, variable, and Variable::Variable().

|
explicit |
Definition at line 48 of file userfunction.cpp.
References AllocAndCopy(), chainDelete, CharBuffer::CharBuffer(), definition, defname, expression, name, Next, and variable.
Referenced by FunctionList::GetFunctionDef().


| UserFunction::~UserFunction | ( | ) |
Definition at line 61 of file userfunction.cpp.
References chainDelete, definition, defname, expression, name, Next, and variable.
| Variable * UserFunction::CreateVariable | ( | const char * | name | ) |
Definition at line 117 of file userfunction.cpp.
References InitializeTexts(), variable, and Variable::Variable().
Referenced by Parser::ParseFunctionDef().


| char * UserFunction::GetDefinitionName | ( | ) | const |
Definition at line 102 of file userfunction.cpp.
References defname, and CharBuffer::GetString().

| char * UserFunction::GetDefinitionText | ( | ) | const |
Definition at line 107 of file userfunction.cpp.
References definition, and CharBuffer::GetString().

| ExpressionNode * UserFunction::GetExpression | ( | ) | const |
Definition at line 130 of file userfunction.cpp.
References expression.
Referenced by UserFunctionNode::Evaluate(), Grid::FunctionValue(), UserFunctionNode::GetNext(), and FunctionList::ListContent().

| char * UserFunction::GetName | ( | ) | const |
Definition at line 97 of file userfunction.cpp.
References name.
Referenced by FunctionList::Delete(), FunctionList::GetFunctionCall(), FunctionList::GetFunctionDef(), UserFunctionNode::GetNodeText(), and FunctionList::ListContent().

| Variable * UserFunction::GetVariable | ( | ) | const |
Definition at line 112 of file userfunction.cpp.
References variable.
Referenced by FunctionList::Delete(), UserFunctionNode::Evaluate(), Grid::FunctionValue(), FunctionList::GetFunctionDef(), and FunctionList::ListContent().

|
private |
Definition at line 83 of file userfunction.cpp.
References CharBuffer::Append(), definition, defname, CharBuffer::Empty(), expression, Variable::GetName(), CharBuffer::GetString(), ExpressionNode::GetText(), name, and variable.
Referenced by CreateVariable(), SetExpression(), and UserFunction().


| void UserFunction::SetExpression | ( | ExpressionNode * | expression | ) |
Definition at line 135 of file userfunction.cpp.
References expression, and InitializeTexts().
Referenced by Parser::ParseFunctionDef().


|
friend |
|
private |
Definition at line 65 of file userfunction.h.
Referenced by FunctionList::Delete(), UserFunction(), and ~UserFunction().
|
private |
Definition at line 70 of file userfunction.h.
Referenced by GetDefinitionText(), InitializeTexts(), UserFunction(), and ~UserFunction().
|
private |
Definition at line 69 of file userfunction.h.
Referenced by GetDefinitionName(), InitializeTexts(), UserFunction(), and ~UserFunction().
|
private |
Definition at line 64 of file userfunction.h.
Referenced by GetExpression(), InitializeTexts(), SetExpression(), UserFunction(), and ~UserFunction().
|
private |
Definition at line 62 of file userfunction.h.
Referenced by GetName(), InitializeTexts(), UserFunction(), and ~UserFunction().
| UserFunction* UserFunction::Next |
Definition at line 51 of file userfunction.h.
Referenced by FunctionList::Delete(), FunctionList::GetFunctionCall(), FunctionList::GetFunctionDef(), FunctionList::ListContent(), UserFunction(), and ~UserFunction().
|
private |
Definition at line 63 of file userfunction.h.
Referenced by CreateVariable(), GetVariable(), InitializeTexts(), UserFunction(), and ~UserFunction().