|
amath
1.8.5
Simple command line calculator
|
A list of user defined functions. More...
#include <functionlist.h>

Public Member Functions | |
| FunctionList () | |
| ~FunctionList () | |
| void | Clear () |
| bool | Delete (const char *name, const char *argument) |
| UserFunction * | GetFirstFunction () const |
| UserFunction * | GetFunctionDef (const char *name) |
| UserFunction * | GetFunctionDef (const char *name, const char *argument) const |
| FunctionNode * | GetFunctionCall (const char *function, ExpressionNode *value) const |
| char * | List () const |
| char * | ListDefinitions () const |
Static Public Member Functions | |
| static bool | IsSystemFunction (const char *name) |
Private Member Functions | |
| char * | ListContent (bool cmdFormat) const |
Static Private Member Functions | |
| static functiondef * | GetSystemFunction (const char *ident) |
| static char * | FindAlias (const char *ident) |
Private Attributes | |
| CharBuffer * | buf |
| UserFunction * | first |
A list of user defined functions.
Definition at line 42 of file functionlist.h.
| FunctionList::FunctionList | ( | ) |
Definition at line 39 of file functionlist.cpp.
References buf, CharBuffer::CharBuffer(), and first.
Referenced by Program::Program().


| FunctionList::~FunctionList | ( | ) |
Definition at line 45 of file functionlist.cpp.
| void FunctionList::Clear | ( | ) |
Definition at line 55 of file functionlist.cpp.
References buf, CharBuffer::ClearBuffer(), and first.
Referenced by DeleteStatement::Execute().


| bool FunctionList::Delete | ( | const char * | name, |
| const char * | argument | ||
| ) |
Definition at line 66 of file functionlist.cpp.
References UserFunction::chainDelete, first, UserFunction::GetName(), Variable::GetName(), UserFunction::GetVariable(), UserFunction::Next, and StrIsEqual().
Referenced by DeleteStatement::Execute().


|
staticprivate |
Definition at line 258 of file functionlist.cpp.
References identalias::alias, identalias::ident, identaliases, and StrIsEqual().
Referenced by GetFunctionCall(), and GetSystemFunction().


| UserFunction * FunctionList::GetFirstFunction | ( | ) | const |
Definition at line 109 of file functionlist.cpp.
References first.
| FunctionNode * FunctionList::GetFunctionCall | ( | const char * | function, |
| ExpressionNode * | value | ||
| ) | const |
Definition at line 160 of file functionlist.cpp.
References functiondef::create, FindAlias(), first, UserFunction::GetName(), GetSystemFunction(), UserFunction::Next, StrIsEqual(), and UserFunctionNode::UserFunctionNode().
Referenced by Parser::ParseIdent().


| UserFunction * FunctionList::GetFunctionDef | ( | const char * | name | ) |
Definition at line 114 of file functionlist.cpp.
References first, UserFunction::GetName(), UserFunction::Next, StrIsEqual(), and UserFunction::UserFunction().
Referenced by Parser::ParseFunctionDef().


| UserFunction * FunctionList::GetFunctionDef | ( | const char * | name, |
| const char * | argument | ||
| ) | const |
Definition at line 143 of file functionlist.cpp.
References first, UserFunction::GetName(), Variable::GetName(), UserFunction::GetVariable(), UserFunction::Next, and StrIsEqual().
Referenced by PlotStatement::Execute().


|
staticprivate |
Definition at line 243 of file functionlist.cpp.
References FindAlias(), functiondefs, functiondef::name, and StrIsEqual().
Referenced by GetFunctionCall(), and IsSystemFunction().


|
static |
Definition at line 238 of file functionlist.cpp.
References GetSystemFunction().
Referenced by Parser::ParseFunctionDef().


| char * FunctionList::List | ( | ) | const |
Definition at line 183 of file functionlist.cpp.
References ListContent().
Referenced by ListFunctionsStatement::Execute().


|
private |
Definition at line 193 of file functionlist.cpp.
References CharBuffer::Append(), buf, CharBuffer::Empty(), CharBuffer::EnsureSize(), first, UserFunction::GetExpression(), UserFunction::GetName(), Variable::GetName(), CharBuffer::GetString(), ExpressionNode::GetText(), UserFunction::GetVariable(), UserFunction::Next, and StrLen().
Referenced by List(), and ListDefinitions().


| char * FunctionList::ListDefinitions | ( | ) | const |
Definition at line 188 of file functionlist.cpp.
References ListContent().
Referenced by SaveStatement::Execute().


|
private |
Definition at line 61 of file functionlist.h.
Referenced by Clear(), FunctionList(), ListContent(), and ~FunctionList().
|
private |
Definition at line 62 of file functionlist.h.
Referenced by Clear(), Delete(), FunctionList(), GetFirstFunction(), GetFunctionCall(), GetFunctionDef(), ListContent(), and ~FunctionList().