#include <tvu_calculate.h>
Inheritance diagram for CTExpression::
Public Methods | |
CTExpression () | |
Contructors/Destructors. More... | |
CTExpression (CTObject *Object) | |
~CTExpression () | |
DEFINE_ID_FUNCTIONS (CTExpression, CTItemList, CLASSNAME_EXPRESSION_ID, CLASSNAME_EXPRESSION) virtual CTItemList *CreateNewItem() | |
virtual CTItemList* | CreateNewItem (LPCTObject Object) |
virtual TBOOL | Save (LPCTFile pFile, TINT Marge) |
Save the object. More... | |
virtual TBOOL | SaveExpression (LPCTFile pFile, TINT Marge) |
Save the expression. More... | |
virtual TBOOL | Load (LPTBYTE *lpBuffers) |
Load the object from buffers. More... | |
virtual TBOOL | Build (CTList Objects, TLPCSTR lpCreateClass=TNULL, TBOOL bBuildFunctions=TTRUE, CTList pExpression=TNULL) |
Build the expression using a object list. More... | |
virtual TBOOL | IsWellBuilt (TBOOL bTestOnly=TFALSE, CTList pExpression=TNULL) |
verify if the object if well built. More... | |
virtual TBOOL | IsContains (TLPCSTR ObjectName, CTList pExpression=TNULL) |
virtual CTObject* | GetValue () |
Get the value of the expression. More... | |
virtual CTObject* | Calculate (TINT iOperator, CTObject *Object) |
Calculate the mathematical operators: +, -, *, / and the comparing operators: =, <, <=, >, >=. In this case, the returned value is an object of CTInt. More... | |
CTExpression& | operator= (CTExpression &Object) |
Operations. More... | |
Static Public Methods | |
CTExpression* | CreateExpression (CTObject *Object1, CTInt *OP, CTObject *Object2) |
Create a list expressing a mathematical expression. More... | |
CTExpression* | CreateExpression (CTObject *Object1, TLPCSTR OP, CTObject *Object2) |
CTExpression* | CreateAttributeExpression (CTObject *Object, CTInt *idAttribute) |
Create an expression for getting an attribute of an object. More... | |
CTExpression* | CreateAttributeExpression (CTObject *Object, TLPCSTR strAttribute) |
CTObject* | CF_Debug (CTList Objects) |
=== CODED FUNCTIONS ===. More... | |
Static Public Attributes | |
CTBool | m_Debug |
TINT | m_Level |
Protected Methods | |
CTObject* | Analyse (LPTBYTE lpBuffers, TINT Len) |
Analyse the mathematical expression. More... | |
CTObject* | Analyse (LPTBYTE lpBuffers, TINT Left, TINT Right, LPOPDESCRIPTOR *OPs, TBOOL bFirstTime=TFALSE) |
TINT | FindBreakingPos (LPTBYTE lpBuffers, TINT Left, TINT Right, LPOPDESCRIPTOR *OPs, TINT *Pos, TBOOL *bContainsPoint, TBOOL *bContainsParentheses) |
Find the positions to "break" the expression Pos: will contain the postions where we can break the expression bContainsPoint: if the broken part of the expression contains a "." bContainsParentheses: if the expression contains the arentheses Returned value: the number of positions, 9999 - we need do with Left+1 and Right-1, < 0 - error. More... | |
CTObject* | AnalyseFunctionCall (LPTBYTE lpBuffers, TINT Left, TINT Right, LPOPDESCRIPTOR *OPs) |
Analyse a function call expression: f(O1, O2,..., On). More... | |
CTObject* | AnalyseAtom (LPTBYTE lpBuffers, TINT Left, TINT Right, LPOPDESCRIPTOR *OPs, TBOOL bContainsPoint) |
Analyse an atomic expression: number, string, var, reference returned value: a corresponding object. More... | |
CTObject* | AnalyseComplexExpresion (LPTBYTE lpBuffers, TINT Left, TINT Right, LPOPDESCRIPTOR *OPs, TINT nPos, TINT *Pos, TBOOL bFirstTime=TFALSE) |
Analyse a complex expression: contains at least one OP returned value: a created expression. More... | |
TINT | FindOP (LPTBYTE lpBuffers, TINT Left, TINT Right, LPOPDESCRIPTOR *OPs) |
Find every OP Return: number of OP found. More... | |
TINT | FirstPos (LPTBYTE lpBuffers, TINT StartPos, TINT Inc=1) |
Find the first position. More... | |
TINT | Priority (TINT op) |
Priority of an operator. More... | |
TBOOL | IsValidCharacter (char c) |
Verify if a character is valid. More... |
|
Contructors/Destructors.
|
|
Analyse the mathematical expression.
|
|
Analyse an atomic expression: number, string, var, reference returned value: a corresponding object.
|
|
Analyse a complex expression: contains at least one OP returned value: a created expression.
|
|
Analyse a function call expression: f(O1, O2,..., On).
|
|
Build the expression using a object list.
|
|
=== CODED FUNCTIONS ===.
|
|
Calculate the mathematical operators: +, -, *, / and the comparing operators: =, <, <=, >, >=. In this case, the returned value is an object of CTInt.
Reimplemented from CTItemList. |
|
Create an expression for getting an attribute of an object.
|
|
Create a list expressing a mathematical expression.
|
|
Find the positions to "break" the expression Pos: will contain the postions where we can break the expression bContainsPoint: if the broken part of the expression contains a "." bContainsParentheses: if the expression contains the arentheses Returned value: the number of positions, 9999 - we need do with Left+1 and Right-1, < 0 - error.
|
|
Find every OP Return: number of OP found.
|
|
Find the first position.
|
|
Get the value of the expression.
Reimplemented from CTItemList. |
|
Verify if a character is valid.
|
|
verify if the object if well built.
|
|
Load the object from buffers.
Reimplemented from CTObject. |
|
Priority of an operator.
|
|
Save the object.
Reimplemented from CTObject. |
|
Save the expression.
Reimplemented from CTItemList. |
|
Operations.
|