Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

CTExpression Class Reference

The expression Implemented in: tvu_calculate.cpp. More...

#include <tvu_calculate.h>

Inheritance diagram for CTExpression::

CTItemList CTObject

Public Methods

 CTExpression ()
 Contructors/Destructors. More...

 CTExpression (CTObject *Object)
 ~CTExpression ()
 DEFINE_ID_FUNCTIONS (CTExpression, CTItemList, CLASSNAME_EXPRESSION_ID, CLASSNAME_EXPRESSION) virtual CTItemList *CreateNewItem()
virtual CTItemListCreateNewItem (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 CTObjectGetValue ()
 Get the value of the expression. More...

virtual CTObjectCalculate (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)
CTObjectCF_Debug (CTList Objects)
 === CODED FUNCTIONS ===. More...


Static Public Attributes

CTBool m_Debug
TINT m_Level

Protected Methods

CTObjectAnalyse (LPTBYTE lpBuffers, TINT Len)
 Analyse the mathematical expression. More...

CTObjectAnalyse (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...

CTObjectAnalyseFunctionCall (LPTBYTE lpBuffers, TINT Left, TINT Right, LPOPDESCRIPTOR *OPs)
 Analyse a function call expression: f(O1, O2,..., On). More...

CTObjectAnalyseAtom (LPTBYTE lpBuffers, TINT Left, TINT Right, LPOPDESCRIPTOR *OPs, TBOOL bContainsPoint)
 Analyse an atomic expression: number, string, var, reference returned value: a corresponding object. More...

CTObjectAnalyseComplexExpresion (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...


Detailed Description

The expression Implemented in: tvu_calculate.cpp.


Constructor & Destructor Documentation

CTExpression::CTExpression ( )
 

Contructors/Destructors.


Member Function Documentation

CTObject * CTExpression::Analyse ( LPTBYTE lpBuffers,
TINT Len ) [protected]
 

Analyse the mathematical expression.

CTObject * CTExpression::AnalyseAtom ( LPTBYTE lpBuffers,
TINT Left,
TINT Right,
LPOPDESCRIPTOR * OPs,
TBOOL bContainsPoint ) [protected]
 

Analyse an atomic expression: number, string, var, reference returned value: a corresponding object.

CTObject * CTExpression::AnalyseComplexExpresion ( LPTBYTE lpBuffers,
TINT Left,
TINT Right,
LPOPDESCRIPTOR * OPs,
TINT nPos,
TINT * Pos,
TBOOL bFirstTime = TFALSE ) [protected]
 

Analyse a complex expression: contains at least one OP returned value: a created expression.

CTObject * CTExpression::AnalyseFunctionCall ( LPTBYTE lpBuffers,
TINT Left,
TINT Right,
LPOPDESCRIPTOR * OPs ) [protected]
 

Analyse a function call expression: f(O1, O2,..., On).

TBOOL CTExpression::Build ( CTList Objects,
TLPCSTR lpCreateClass = TNULL,
TBOOL bBuildFunctions = TTRUE,
CTList pExpression = TNULL ) [virtual]
 

Build the expression using a object list.

CTObject * CTExpression::CF_Debug ( CTList Objects ) [static]
 

=== CODED FUNCTIONS ===.

CTObject * CTExpression::Calculate ( TINT iOperator,
CTObject * Object ) [virtual]
 

Calculate the mathematical operators: +, -, *, / and the comparing operators: =, <, <=, >, >=. In this case, the returned value is an object of CTInt.

Reimplemented from CTItemList.

CTExpression * CTExpression::CreateAttributeExpression ( CTObject * Object,
CTInt * idAttribute ) [static]
 

Create an expression for getting an attribute of an object.

CTExpression * CTExpression::CreateExpression ( CTObject * Object1,
CTInt * OP,
CTObject * Object2 ) [static]
 

Create a list expressing a mathematical expression.

TINT CTExpression::FindBreakingPos ( LPTBYTE lpBuffers,
TINT Left,
TINT Right,
LPOPDESCRIPTOR * OPs,
TINT * Pos,
TBOOL * bContainsPoint,
TBOOL * bContainsParentheses ) [protected]
 

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.

TINT CTExpression::FindOP ( LPTBYTE lpBuffers,
TINT Left,
TINT Right,
LPOPDESCRIPTOR * OPs ) [protected]
 

Find every OP Return: number of OP found.

TINT CTExpression::FirstPos ( LPTBYTE lpBuffers,
TINT StartPos,
TINT Inc = 1 ) [protected]
 

Find the first position.

CTObject * CTExpression::GetValue ( ) [virtual]
 

Get the value of the expression.

Reimplemented from CTItemList.

TBOOL CTExpression::IsValidCharacter ( char c ) [protected]
 

Verify if a character is valid.

TBOOL CTExpression::IsWellBuilt ( TBOOL bTestOnly = TFALSE,
CTList pExpression = TNULL ) [virtual]
 

verify if the object if well built.

TBOOL CTExpression::Load ( LPTBYTE * lpBuffers ) [virtual]
 

Load the object from buffers.

Reimplemented from CTObject.

TINT CTExpression::Priority ( TINT op ) [protected]
 

Priority of an operator.

TBOOL CTExpression::Save ( LPCTFile pFile,
TINT Marge ) [virtual]
 

Save the object.

Reimplemented from CTObject.

TBOOL CTExpression::SaveExpression ( LPCTFile pFile,
TINT Marge ) [virtual]
 

Save the expression.

Reimplemented from CTItemList.

CTExpression & CTExpression::operator= ( CTExpression & Object )
 

Operations.


The documentation for this class was generated from the following file:
Generated at Wed Aug 6 15:59:00 2003 for TVU's libraries for video surveillance: by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001