|
IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
JavaScript Evaluator with command-line interpreter. More...
Inheritance diagram for IG::Lib::ExpressionEvaluatorJs:
Collaboration diagram for IG::Lib::ExpressionEvaluatorJs: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() |
JavaScript Evaluator with command-line interpreter.
$A Igor Aug10;
| IG::Lib::ExpressionEvaluatorJs::ExpressionEvaluatorJs | ( | ) | [inline] |
Initializes a new JavaScript evaluator. This includes compiling the JavaScript code where evaluation is plugged in.
| 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.
| command | Command 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.
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.
string IG::Lib::ExpressionEvaluatorJs::_baseDefinitionsJs [protected] |
ObjectRegister<ExpressionEvaluatorJs> IG::Lib::ExpressionEvaluatorJs::_register [static, private] |
new ObjectRegister<ExpressionEvaluatorJs>(1 )
Static object that providees object register and generates IDs for this class:
ExpressionEvaluatorJs IG::Lib::ExpressionEvaluatorJs::_evaluatorGlobal = null [static, protected] |
object IG::Lib::ExpressionEvaluatorJs::_globalLock = new object() [static, private] |
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.