class ExpOperation

A single operation in an expression. More...

Full nameTelEngine::ExpOperation
Definition#include <libs/yscript/yatescript.h>
InheritsTelEngine::NamedString [public ]
Inherited byExpFunction, ExpWrapper
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods


Detailed Description

This class describes a single operation in an expression evaluator

inline int64_t  nonInteger ()

nonInteger

[static]

Special value that is not recognized as an integer value

Returns: A value that indicates a non-integer value

inline  ExpOperation (const ExpOperation& original)

ExpOperation

Copy constructor

Parameters:
originalOperation to copy

inline  ExpOperation (const ExpOperation& original, const char* name)

ExpOperation

Copy constructor with renaming, to be used for named results

Parameters:
originalOperation to copy
nameName of the newly created operation

inline explicit  ExpOperation (const String& value, const char* name = 0, bool autoNum = false)

ExpOperation

Push String constructor

Parameters:
valueString constant to push on stack on execution
nameOptional of the newly created constant
autoNumAutomatically convert to number if possible

inline explicit  ExpOperation (const char* value, const char* name = 0)

ExpOperation

Push literal string constructor

Parameters:
valueString constant to push on stack on execution
nameOptional of the newly created constant

inline explicit  ExpOperation (int64_t value, const char* name = 0)

ExpOperation

Push 64 bit Number constructor

Parameters:
valueInteger constant to push on stack on execution
nameOptional of the newly created constant

inline explicit  ExpOperation (bool value, const char* name = 0)

ExpOperation

Push Boolean constructor

Parameters:
valueBoolean constant to push on stack on execution
nameOptional of the newly created constant

inline  ExpOperation (ExpEvaluator::Opcode oper, const char* name = 0, int64_t value = nonInteger(), bool barrier = false)

ExpOperation

Constructor from components

Parameters:
operOperation code
nameOptional name of the operation or result
valueOptional integer constant used as function parameter count
barrierTrue if the operation is an expression barrier on the stack

inline  ExpOperation (ExpEvaluator::Opcode oper, const char* name, const char* value, bool barrier = false)

ExpOperation

Constructor of non-integer operation from components

Parameters:
operOperation code
nameName of the operation or result
valueString value of operation
barrierTrue if the operation is an expression barrier on the stack

inline  ExpOperation (ExpEvaluator::Opcode oper, const char* name, const char* value, int64_t number, bool barrier)

ExpOperation

Constructor from components

Parameters:
operOperation code
nameOptional name of the operation or result
valueString value of operation
numberInteger value
barrierTrue if the operation is an expression barrier on the stack

inline ExpEvaluator::Opcode  opcode ()

opcode

[const]

Retrieve the code of this operation

Returns: Operation code as declared in the expression evaluator

inline bool  isInteger ()

isInteger

[const]

Check if an integer value is stored

Returns: True if an integer value is stored

inline int64_t  number ()

number

[const]

Retrieve the number stored in this operation

Returns: Stored number

inline bool  barrier ()

barrier

[const]

Check if this operation acts as an evaluator barrier on the stack

Returns: True if an expression should not pop this operation off the stack

inline unsigned int  lineNumber ()

lineNumber

[const]

Retrieve the line number where the operation was compiled from

Returns: Line number, zero if unknown

inline void  lineNumber (unsigned int line)

lineNumber

Set the line number where the operation was compiled from

Parameters:
lineNumber of the compiled line

inline int64_t  operator= (int64_t num)

operator=

Number assignment operator

Parameters:
numNumeric value to assign to the operation

Returns: Assigned number

Reimplemented from NamedString.

int64_t  valInteger ()

valInteger

[const virtual]

Retrieve the numeric value of the operation

Returns: Number contained in operation, zero if not a number

bool  valBoolean ()

valBoolean

[const virtual]

Retrieve the boolean value of the operation

Returns: True if the operation is to be interpreted as true value

const char*  typeOf ()

typeOf

[const virtual]

Retrieve the name of the type of the value of this operation

Returns: Name of the type of the value

ExpOperation*  clone (const char* name)

clone

[const virtual]

Clone and rename method

Parameters:
nameName of the cloned operation

Returns: New operation instance

inline ExpOperation*  clone ()

clone

[const]

Clone method

Returns: New operation instance, may keep a reference to the old instance

ExpOperation*  copy (Mutex* mtx)

copy

[const virtual]

Deep copy method

Parameters:
mtxPointer to the mutex that serializes the copied object

Returns: New operation instance


Generated by: paulc on bussard on Sun Oct 20 21:06:06 2013, using kdoc 2.0a54.