#include <rtt/scripting/ProgramLoader.hpp>
It wraps around Parser and can process both files and C++ streams. Parse exceptions are directed to the Logger class or rethrown if requested by the user.
Definition at line 55 of file ProgramLoader.hpp.
Public Types | |
|
typedef std::vector < ProgramInterfacePtr > | Functions |
| List of executed functions. | |
Public Member Functions | |
| ProgramLoader (bool rethrow=false) | |
| Create a ProgramLoader which by default does not throw any exceptions. | |
| Functions | loadFunction (const std::string &s, TaskContext *target, const std::string &filename) |
| Executes all not exported functions in target's Processor or loads exported functions in target's Command Interface. | |
| Functions | loadFunction (const std::string &filename, TaskContext *target) |
| Executes all not exported functions in target's Processor or loads exported functions in target's Command Interface. | |
| bool | loadProgram (const std::string &s, TaskContext *target, const std::string &filename) |
| Load Programs and/or exported Functions from an Orocos Program Script into a TaskContext. | |
| bool | loadProgram (const std::string &filename, TaskContext *target) |
| Load Programs and/or exported Functions from an Orocos Program Script into a TaskContext. | |
| bool | unloadProgram (const std::string &name, TaskContext *target) |
| Unload a Program from a TaskContext. | |
| bool | loadStateMachine (const std::string &s, TaskContext *target, const std::string &filename) |
| Load StateMachines from an Orocos State Description into a TaskContext. | |
| bool | loadStateMachine (const std::string &filename, TaskContext *target) |
| Load StateMachines from an Orocos State Description into a TaskContext. | |
| bool | unloadStateMachine (const std::string &name, TaskContext *target) |
| Unload a root (parent) StateMachine from a TaskContext. | |
| ProgramLoader | ( | bool | rethrow = false |
) |
Create a ProgramLoader which by default does not throw any exceptions.
| rethrow | If set to true, rethrow the parse and load exceptions in addition to logging the error. |
Definition at line 54 of file ProgramLoader.cpp.
| ProgramLoader::Functions loadFunction | ( | const std::string & | s, | |
| TaskContext * | target, | |||
| const std::string & | filename | |||
| ) |
Executes all not exported functions in target's Processor or loads exported functions in target's Command Interface.
Definition at line 64 of file ProgramLoader.cpp.
References TaskContext::scripting().
| ProgramLoader::Functions loadFunction | ( | const std::string & | filename, | |
| TaskContext * | target | |||
| ) |
Executes all not exported functions in target's Processor or loads exported functions in target's Command Interface.
Definition at line 59 of file ProgramLoader.cpp.
References TaskContext::scripting().
| bool loadProgram | ( | const std::string & | s, | |
| TaskContext * | target, | |||
| const std::string & | filename | |||
| ) |
Load Programs and/or exported Functions from an Orocos Program Script into a TaskContext.
Reads out the stream s , parses it, and loads it in target's Processor.
Definition at line 74 of file ProgramLoader.cpp.
References ScriptingAccess::loadStateMachines(), and TaskContext::scripting().
| bool loadProgram | ( | const std::string & | filename, | |
| TaskContext * | target | |||
| ) |
Load Programs and/or exported Functions from an Orocos Program Script into a TaskContext.
Reads out the local file filename , parses it, and loads it in target's Processor.
Definition at line 69 of file ProgramLoader.cpp.
References ScriptingAccess::loadPrograms(), and TaskContext::scripting().
| bool unloadProgram | ( | const std::string & | name, | |
| TaskContext * | target | |||
| ) |
Unload a Program from a TaskContext.
| name | the name of the program. |
Definition at line 79 of file ProgramLoader.cpp.
References TaskContext::scripting(), and ScriptingAccess::unloadProgram().
| bool loadStateMachine | ( | const std::string & | s, | |
| TaskContext * | target, | |||
| const std::string & | filename | |||
| ) |
Load StateMachines from an Orocos State Description into a TaskContext.
Reads out the stream s , parses it, and loads it in target's Processor.
Definition at line 94 of file ProgramLoader.cpp.
References ScriptingAccess::loadStateMachines(), and TaskContext::scripting().
| bool loadStateMachine | ( | const std::string & | filename, | |
| TaskContext * | target | |||
| ) |
Load StateMachines from an Orocos State Description into a TaskContext.
Reads out the local file filename , parses it, and loads it in target's Processor.
Definition at line 89 of file ProgramLoader.cpp.
References ScriptingAccess::loadStateMachines(), and TaskContext::scripting().
| bool unloadStateMachine | ( | const std::string & | name, | |
| TaskContext * | target | |||
| ) |
Unload a root (parent) StateMachine from a TaskContext.
| name | the name of the StateMachine. |
Definition at line 84 of file ProgramLoader.cpp.
References TaskContext::scripting(), and ScriptingAccess::unloadStateMachine().
1.5.3