#include <RuntimeEnvironmentHandler.h>
Public Member Functions | |
| RuntimeEnvironmentHandler (RuntimeEnvironment *env) | |
| ~RuntimeEnvironmentHandler (void) | |
| VirtualMachine * | get_vm () const |
| RuntimeEnvironment * | get_global_env () const |
| RuntimeEnvironment * | get_local_env () const |
| unsigned | get_num_o_locals () const |
| bool | push_env_stack (bool cascading) |
| bool | pop_env_stack () |
| Value * | find_value (const Symbol symbol) const |
| void | join_value (const Symbol symbol, Value *value) |
| void | clear_value (const Symbol symbol) |
| void | clear_values () |
| el7::scripting::RuntimeEnvironmentHandler::RuntimeEnvironmentHandler | ( | RuntimeEnvironment * | env | ) |
Explicit constructor.
| el7::scripting::RuntimeEnvironmentHandler::~RuntimeEnvironmentHandler | ( | void | ) |
Destructor.
| void el7::scripting::RuntimeEnvironmentHandler::clear_value | ( | const Symbol | symbol | ) |
Removes the given symbol and its corresponding value object from the current local runtime environment.
| void el7::scripting::RuntimeEnvironmentHandler::clear_values | ( | ) |
Removes all symbols and value objects from the current local runtime environment.
Searches for the value object of a given symbol within the current local runtime environment. If the symbol is not found and the current local runtime environment is cascading, the superior runtime environment is asked for the symbol's value object. If the current local runtime environment is not cascading or the symbel is not found within it or one of the superior runtime environments, the global runtime environment is asked for the symbol's value object. If the symbol can not be found at all, the function returns null, a pointer to the value object otherwise.
| RuntimeEnvironment* el7::scripting::RuntimeEnvironmentHandler::get_global_env | ( | ) | const [inline] |
Returns the global runtime environment.
| RuntimeEnvironment* el7::scripting::RuntimeEnvironmentHandler::get_local_env | ( | ) | const [inline] |
Returns the current local runtime environment.
| unsigned el7::scripting::RuntimeEnvironmentHandler::get_num_o_locals | ( | ) | const [inline] |
Returns the number of local runtime environments this object is responsible for.
| VirtualMachine * el7::scripting::RuntimeEnvironmentHandler::get_vm | ( | ) | const |
Returns the all managing virtual machine.
Adds a given symbol and its desired value object to the current local runtime environment. If the symbol is already present, its current value object will be replaced.
| bool el7::scripting::RuntimeEnvironmentHandler::pop_env_stack | ( | ) |
Pops the runtime environment stack.
| bool el7::scripting::RuntimeEnvironmentHandler::push_env_stack | ( | bool | cascading | ) |
Pushes the runtime environment stack.
1.7.1