IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

IG::Lib::ExpressionEvaluatorJs Class Reference

JavaScript Evaluator with command-line interpreter. More...

Inheritance diagram for IG::Lib::ExpressionEvaluatorJs:
Collaboration diagram for IG::Lib::ExpressionEvaluatorJs:

List of all members.

Public Member Functions

 ExpressionEvaluatorJs ()
 Initializes a new JavaScript evaluator. This includes compiling the JavaScript code where evaluation is plugged in.
override void RepairCommand (ref string command)
 Repairs the specified command and returns the repaired command string. Reparations serve for easier insertion of commands and for addition of syntactic cookies.
void Register ()
 Registers the current object. Subsequent calls (after the first one) have no effect.
bool IsRegistered ()
 Returns true if the current object is registered, false if not.
void Unregister ()
 Unregisters the current object if it is currently registered. Can be performed several times, in this case only the first call may have effect.

Static Public Member Functions

static void ExampleCommandLine ()
 Launches command-line JavaScript interpreter.

Protected Member Functions

override void InitExpressionEvaluator ()
 Contains initializations for the particular class.

Protected Attributes

string _baseDefinitionsJs

Static Protected Attributes

static ExpressionEvaluatorJs _evaluatorGlobal = null

Properties

override string ScriptBase [get]
 Container for compiled code that evaluates JavaScript expressions.
ObjectRegister
< ExpressionEvaluatorJs
ObjectRegister [get]
 Gets object register where the current object is registered.
static ExpressionEvaluatorJs Global [get, set]
 Global JavaScript expression evaluator. Initialized on first use.

Static Private Attributes

static ObjectRegister
< ExpressionEvaluatorJs
_register
 Static object that providees object register and generates IDs for this class:
static object _globalLock = new object()

Detailed Description

JavaScript Evaluator with command-line interpreter.

$A Igor Aug10;


Constructor & Destructor Documentation

IG::Lib::ExpressionEvaluatorJs::ExpressionEvaluatorJs ( ) [inline]

Initializes a new JavaScript evaluator. This includes compiling the JavaScript code where evaluation is plugged in.


Member Function Documentation

override void IG::Lib::ExpressionEvaluatorJs::InitExpressionEvaluator ( ) [inline, protected, virtual]

Contains initializations for the particular class.

This method is called form base class' constructor.

Implements IG::Lib::ExpressionEvaluatorCompiled.

override void IG::Lib::ExpressionEvaluatorJs::RepairCommand ( ref string  command) [inline, virtual]

Repairs the specified command and returns the repaired command string. Reparations serve for easier insertion of commands and for addition of syntactic cookies.

Parameters:
commandCommand to be repaired.

Reimplemented from IG::Lib::ExpressionEvaluatorCompiled.

void IG::Lib::ExpressionEvaluatorJs::Register ( ) [inline]

Registers the current object. Subsequent calls (after the first one) have no effect.

Implements IG::Lib::IRegisterable< T >.

bool IG::Lib::ExpressionEvaluatorJs::IsRegistered ( ) [inline]

Returns true if the current object is registered, false if not.

Returns:

Implements IG::Lib::IRegisterable< T >.

void IG::Lib::ExpressionEvaluatorJs::Unregister ( ) [inline]

Unregisters the current object if it is currently registered. Can be performed several times, in this case only the first call may have effect.

Implements IG::Lib::IRegisterable< T >.

static void IG::Lib::ExpressionEvaluatorJs::ExampleCommandLine ( ) [inline, static]

Launches command-line JavaScript interpreter.


Member Data Documentation

Initial value:
            new ObjectRegister<ExpressionEvaluatorJs>(1 )

Static object that providees object register and generates IDs for this class:

object IG::Lib::ExpressionEvaluatorJs::_globalLock = new object() [static, private]

Property Documentation

override string IG::Lib::ExpressionEvaluatorJs::ScriptBase [get, protected]

Container for compiled code that evaluates JavaScript expressions.

Reimplemented from IG::Lib::ExpressionEvaluatorCompiled.

ObjectRegister<ExpressionEvaluatorJs> IG::Lib::ExpressionEvaluatorJs::ObjectRegister [get]

Gets object register where the current object is registered.

Implements IG::Lib::IRegisterable< T >.

ExpressionEvaluatorJs IG::Lib::ExpressionEvaluatorJs::Global [static, get, set]

Global JavaScript expression evaluator. Initialized on first use.

In many applications you will not need more than one evaluator and you can just use this instance.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events