# class ExpOperation | A single operation in an expression. More...
Full name | `TelEngine::ExpOperation`
Definition | `#include <libs/yscript/yatescript.h>`
Inherits | TelEngine::NamedString [public ]
Inherited by | ExpFunction, ExpWrapper
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- inline ExpOperation (const ExpOperation& original)
- inline ExpOperation (const ExpOperation& original, const char* name)
- inline explicit ExpOperation (const String& value, const char* name = 0, bool autoNum = false)
- inline explicit ExpOperation (const char* value, const char* name = 0)
- inline explicit ExpOperation (int64_t value, const char* name = 0)
- inline explicit ExpOperation (bool value, const char* name = 0)
- inline ExpOperation (ExpEvaluator::Opcode oper, const char* name = 0, int64_t value = nonInteger(), bool barrier = false)
- inline ExpOperation (ExpEvaluator::Opcode oper, const char* name, const char* value, bool barrier = false)
- inline ExpOperation (ExpEvaluator::Opcode oper, const char* name, const char* value, int64_t number, bool barrier)
- inline ExpEvaluator::Opcode opcode () const
- inline bool isInteger () const
- inline int64_t number () const
- inline bool barrier () const
- inline unsigned int lineNumber () const
- inline void lineNumber (unsigned int line)
- inline int64_t operator= (int64_t num)
- virtual int64_t valInteger () const
- virtual bool valBoolean () const
- virtual const char* typeOf () const
- virtual ExpOperation* clone (const char* name) const
- inline ExpOperation* clone () const
- virtual ExpOperation* copy (Mutex* mtx) const

#### Public Static Methods

- static inline int64_t nonInteger ()

## 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:

original | Operation to copy

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

Copy constructor with renaming, to be used for named results

Parameters:

original | Operation to copy
name | Name of the newly created operation

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

Push String constructor

Parameters:

value | String constant to push on stack on execution
name | Optional of the newly created constant
autoNum | Automatically convert to number if possible

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

Push literal string constructor

Parameters:

value | String constant to push on stack on execution
name | Optional of the newly created constant

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

Push 64 bit Number constructor

Parameters:

value | Integer constant to push on stack on execution
name | Optional of the newly created constant

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

Push Boolean constructor

Parameters:

value | Boolean constant to push on stack on execution
name | Optional 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:

oper | Operation code
name | Optional name of the operation or result
value | Optional integer constant used as function parameter count
barrier | True 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:

oper | Operation code
name | Name of the operation or result
value | String value of operation
barrier | True 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:

oper | Operation code
name | Optional name of the operation or result
value | String value of operation
number | Integer value
barrier | True 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:

line | Number of the compiled line

inline int64_t operator= (int64_t num) | ### operator=

Number assignment operator

Parameters:

num | Numeric 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:

name | Name 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:

mtx | Pointer to the mutex that serializes the copied object

Returns: New operation instance

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.