C3D Kernel  104598
Classes | Enumerations | Functions
Parser
Algorithm Objects
Collaboration diagram for Parser:

Classes

struct  DefRangeItem
 Element of the function definition domain. More...
struct  std::less< DefRangeItem >
 Comparison of elements of the definition domain. More...
class  DefRange
 The function domain. More...
struct  DerivesValues
 Value of the function and derivatives. More...
class  BTreeNode
 Base class for nodes of the expression tree. More...
class  TreeIntervalNode
 Node of interval expression tree. More...
class  IntervalConstNode
 Interval of simple expressions. More...
class  IntervalIdentNode
 Interval variable as a node of a binary tree. More...
class  BTreeConst
 Constant as a node of a binary tree. More...
class  BTreeIdent
 Variable as a node of a binary tree. More...
class  BTreeFunction
 Function as node of a binary tree. More...
class  BTreeOperation
 Operation with two arguments as node of binary tree. More...
class  BTreeOperation1Arg
 Operation with one argument as a node of a binary tree. More...
class  BTreeOperation3Args
 Operation with three arguments as node of syntax tree. More...
class  BTreeUserFunc
 User-defined function as a node of a binary tree. More...
class  MbListVars
 List of variables. More...
struct  ItCoord
 Interface of coordinate. More...
struct  ItTreeVariable
 Interface of variable. More...
struct  ItIntervalTreeVariable
 Interface of interval variable. More...
struct  ItUserFunc
 Interface of function. More...
class  MbUserFunc
 User-defined function. More...
class  MbVar
 Variable. More...
class  MbCoord
 Coordinate. More...
class  MbTreeVariable
 Variable. More...

Enumerations

enum  TeIntervalNodeType { tei_Const, tei_Ident }
 Types of nodes of the binary tree. More...
enum  BteNodeType {
  bt_Const, bt_Ident, bt_Function, bt_Operation2Args,
  bt_Operation1Arg, bt_Operation3Args
}
 Types nodes of binary tree. More...
enum  PceOperationType {
  oprt_TernaryOperation = 0, oprt_BinaryOperation = 8, oprt_Addition = oprt_BinaryOperation, oprt_Subtraction = 9,
  oprt_Division = 10, oprt_Multiplication = 11, oprt_IntDivision = 12, oprt_OR = 13,
  oprt_AND = 14, oprt_NEQU = 15, oprt_EQU = 16, oprt_GT = 17,
  oprt_GE = 18, oprt_LT = 19, oprt_LE = 20, oprt_Involution = 21,
  oprt_UnaryOperation = 22, oprt_NOT = oprt_UnaryOperation, oprt_UnaryMinus = 23, oprt_UnaryPlus = 24,
  oprt_Parentheses = 25
}
 Operations types. More...
enum  EquTreeResCode {
  equTreeResCode_Ok = 0, equTreeResCode_First = 1, equTreeResCode_SyntaxError = equTreeResCode_First, equTreeResCode_TooComplex,
  equTreeResCode_InvalidAssignment, equTreeResCode_NoVariables, equTreeResCode_TooLargeIdent, equTreeResCode_TangentsDomain,
  equTreeResCode_SqrtDomain, equTreeResCode_LogarithmDomain, equTreeResCode_ZeroDivide, equTreeResCode_TrigonometricDomain,
  equTreeResCode_CyclicRelation, equTreeResCode_PowDomain, equTreeResCode_WrongFuncFormat, equTreeResCode_Last
}
 Result codes of string parsing. More...

Functions

uint GetCountOfParams (PceOperationType operationType)
 Parameters count.
BTreeFunction::EquFnCode GetFunCodeByName (const c3d::string_t &name)
 Get type of function.
void GetFunNameByCode (BTreeFunction::EquFnCode code, c3d::string_t &name)
 Get name of function.
 BTreeOperation::BTreeOperation (PceOperationType code, BTreeNode &op1, BTreeNode &op2)
 Constructor.
EquTreeResCode CreateBTreeForEquation (const c3d::string_t &equstr, ItEquVarCreator &varsCreator, std_unique_ptr< BTreeNode > &dRoot)
 Create a tree of equations (a = b + c) by parametric calculator.
EquTreeResCode CreateBTreeForExpression (const c3d::string_t &equstr, ItEquVarCreator *varsCreator, std_unique_ptr< BTreeNode > &root, std_unique_ptr< TreeIntervalNode > &iRoot)
 Create a tree of equations (b + c + d) by parametric calculator.
EquTreeResCode CreateVariable (const c3d::string_t &expression, ItEquVarCreator &)
 Create variable.
bool IsInequality (const c3d::string_t &equstr)
 Whether expression is inequation.
EquTreeResCode CreateBTreeForEquation (const TCHAR *equstr, ItEquVarCreator &varsCreator, std_unique_ptr< BTreeNode > &dRoot)
 Create a tree of equations (a = b + c) by parametric calculator.
EquTreeResCode CreateBTreeForExpression (const TCHAR *equstr, ItEquVarCreator *varsCreator, std_unique_ptr< BTreeNode > &root, std_unique_ptr< TreeIntervalNode > &iRoot)
 Create a tree of equations (b + c + d) by parametric calculator.
EquTreeResCode CreateVariable (const TCHAR *expression, ItEquVarCreator &)
 Create variable.
bool IsInequality (const TCHAR *equstr)
 Whether expression is inequation.

Enumeration Type Documentation

Types of nodes of the binary tree.

Enumerator:
tei_Const 

Constant.

tei_Ident 

Identifier.

Types nodes of binary tree.

Enumerator:
bt_Const 

Constant.

bt_Ident 

Identifier.

bt_Function 

A function.

bt_Operation2Args 

Operation with two arguments.

bt_Operation1Arg 

Operation with one argument.

bt_Operation3Args 

Operation with three arguments.

Operations types.

Attention:
Values are written in file.
Enumerator:
oprt_TernaryOperation 

Ternary operation.

oprt_BinaryOperation 

Binary operation.

oprt_Addition 

Addition.

oprt_Subtraction 

Subtraction.

oprt_Division 

Division.

oprt_Multiplication 

Multiplication.

oprt_IntDivision 

Integer division.

oprt_OR 

Or.

oprt_AND 

And.

oprt_NEQU 

Not equal.

oprt_EQU 

Equal.

oprt_GT 

More.

oprt_GE 

More or equal.

oprt_LT 

Less.

oprt_LE 

Less or equal.

oprt_Involution 

Involution.

oprt_UnaryOperation 

Unary operation.

oprt_NOT 

Not.

oprt_UnaryMinus 

Unary minus.

oprt_UnaryPlus 

Unary plus.

oprt_Parentheses 

Brackets.

Result codes of string parsing.

Enumerator:
equTreeResCode_Ok 

Everything is OK.

equTreeResCode_First 

Start of errors range.

equTreeResCode_SyntaxError 

Error: Syntax error in expression.

equTreeResCode_TooComplex 

Error: Expression is too complex.

equTreeResCode_InvalidAssignment 

Error: Variable is assigned by itself.

equTreeResCode_NoVariables 

Error: There should be at least one variable in expression.

equTreeResCode_TooLargeIdent 

Error: The number of symbols in a name of variable is exceeded.

equTreeResCode_TangentsDomain 

Error: An argument of tangent is out of domain.

equTreeResCode_SqrtDomain 

Error: Invalid argument value for sqrt.

equTreeResCode_LogarithmDomain 

Error: Invalid argument value for logarithmic function.

equTreeResCode_ZeroDivide 

Error: Division by zero.

equTreeResCode_TrigonometricDomain 

Error: An argument of trigonometric function is out of domain.

equTreeResCode_CyclicRelation 

Error: There is found a closed dependence.

equTreeResCode_PowDomain 

Error: Invalid argument value for power function.

equTreeResCode_WrongFuncFormat 

Error: Expression contains a function which does not correspond to its format.

equTreeResCode_Last 

End of errors range.


Function Documentation

uint GetCountOfParams ( PceOperationType  operationType) [inline]

Get the count of parameters for type of operation.

Parameters:
[in]operationType- An operation type.
Returns:
Operation parameters count.
BTreeFunction::EquFnCode GetFunCodeByName ( const c3d::string_t name)

Get type of function by name.

Parameters:
[in]name- Name of function.
Returns:
Type of a function.
void GetFunNameByCode ( BTreeFunction::EquFnCode  code,
c3d::string_t name 
)

Get name of function by type.

Parameters:
[in]code- Type of a function.
[out]name- Name of function.
BTreeOperation::BTreeOperation ( PceOperationType  code,
BTreeNode op1,
BTreeNode op2 
)

Constructor.

Parameters:
[in]code- Code of operation.
[in]op1- The first operand.
[in]op2- The second operand.
EquTreeResCode CreateBTreeForEquation ( const c3d::string_t equstr,
ItEquVarCreator &  varsCreator,
std_unique_ptr< BTreeNode > &  dRoot 
)

Create a tree of equations (a = b + c) by parametric calculator.

Returns:
Operation result code.
EquTreeResCode CreateBTreeForExpression ( const c3d::string_t equstr,
ItEquVarCreator *  varsCreator,
std_unique_ptr< BTreeNode > &  root,
std_unique_ptr< TreeIntervalNode > &  iRoot 
)

Create a tree of equations (b + c + d) by parametric calculator.

Returns:
Operation result code.
EquTreeResCode CreateVariable ( const c3d::string_t expression,
ItEquVarCreator &   
)

Create variable by string.

Returns:
Operation result code.
bool IsInequality ( const c3d::string_t equstr)

Whether expression is inequation.

EquTreeResCode CreateBTreeForEquation ( const TCHAR *  equstr,
ItEquVarCreator &  varsCreator,
std_unique_ptr< BTreeNode > &  dRoot 
)

Create a tree of equations (a = b + c) by parametric calculator.

Returns:
Operation result code.
EquTreeResCode CreateBTreeForExpression ( const TCHAR *  equstr,
ItEquVarCreator *  varsCreator,
std_unique_ptr< BTreeNode > &  root,
std_unique_ptr< TreeIntervalNode > &  iRoot 
)

Create a tree of equations (b + c + d) by parametric calculator.

Returns:
Operation result code.
EquTreeResCode CreateVariable ( const TCHAR *  expression,
ItEquVarCreator &   
)

Create variable by string.

Returns:
Operation result code.
bool IsInequality ( const TCHAR *  equstr)

Whether expression is inequation.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines