RTT::ProgramLoader Class Reference

This class loads and unloads Orocos Program Script and Orocos State Description files to a TaskContext's Processor. More...

#include <rtt/scripting/ProgramLoader.hpp>

List of all members.

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.

Detailed Description

This class loads and unloads Orocos Program Script and Orocos State Description files to a TaskContext's Processor.

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.


Constructor & Destructor Documentation

RTT::ProgramLoader::ProgramLoader ( bool  rethrow = false  ) 

Create a ProgramLoader which by default does not throw any exceptions.

Parameters:
rethrow If set to true, rethrow the parse and load exceptions in addition to logging the error.
See also:
program_load_exception, program_unload_exception, parse_exception

Member Function Documentation

Functions RTT::ProgramLoader::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.

Returns:
All functions being executed.
Functions RTT::ProgramLoader::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.

Returns:
All functions being executed.
bool RTT::ProgramLoader::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.

Returns:
true if all programs and functions could be loaded.
bool RTT::ProgramLoader::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.

Returns:
true if all programs and functions could be loaded.
bool RTT::ProgramLoader::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.

Returns:
true if all state machines could be loaded.
bool RTT::ProgramLoader::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.

Returns:
true if all state machines could be loaded.
bool RTT::ProgramLoader::unloadProgram ( const std::string &  name,
TaskContext target 
)

Unload a Program from a TaskContext.

Parameters:
name the name of the program.
bool RTT::ProgramLoader::unloadStateMachine ( const std::string &  name,
TaskContext target 
)

Unload a root (parent) StateMachine from a TaskContext.

Parameters:
name the name of the StateMachine.

The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:44 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3