RTT::Parser Class Reference

This class is the public interface to the Orocos Program Parser Framework. More...

#include <rtt/scripting/Parser.hpp>

List of all members.

Public Types

typedef std::vector
< ProgramInterfacePtr > 
ParsedFunctions
 List of parsed functions.
typedef std::vector
< ProgramInterfacePtr > 
ParsedPrograms
 List of parsed programs.
typedef std::vector
< ParsedStateMachinePtr > 
ParsedStateMachines
 List of parsed State Machines.

Public Member Functions

ParsedFunctions parseFunction (const std::string &s, TaskContext *, const std::string &filename="stream")
 Reads out the string, parses it, and returns a new FunctionGraph.
ParsedPrograms parseProgram (const std::string &s, TaskContext *, const std::string &filename="stream")
 Reads out the string, parses it, and returns a new ProgramGraph.
ParsedStateMachines parseStateMachine (const std::string &s, TaskContext *, const std::string &filename="stream")
 Reads out the string, parses it, and returns a new ParsedStateMachine.
ConditionInterfaceparseCondition (const std::string &s, TaskContext *)
 Parses the string as a condition, and returns a new ConditionInterface.
std::pair< CommandInterface
*, ConditionInterface * > 
parseCommand (const std::string &s, TaskContext *t, bool dispatch)
 Parses the command in s.
DataSourceBase::shared_ptr parseExpression (const std::string &s, TaskContext *)
 Parses the expression in s.
DataSourceBase::shared_ptr parseValueChange (const std::string &s, TaskContext *)
 Parses a change of a value in s.

Detailed Description

This class is the public interface to the Orocos Program Parser Framework.

It parsers Orocos program scripts, Orocos State Contexts and allows to parse a text Command, Condition or Expression to the respective objects.

See also:
ProgramLoader. Use the ProgramLoader for a more user friendly loading of scripts into TaskContexts.

Definition at line 76 of file Parser.hpp.


Member Function Documentation

std::pair<CommandInterface*,ConditionInterface*> RTT::Parser::parseCommand ( const std::string &  s,
TaskContext t,
bool  dispatch 
)

Parses the command in s.

Exceptions:
parse_exception Throws exceptions of type parse_exception.
ConditionInterface* RTT::Parser::parseCondition ( const std::string &  s,
TaskContext  
)

Parses the string as a condition, and returns a new ConditionInterface.

Will throw parse_exception on failure. Use ext to get the data from the components.

Exceptions:
parse_exception 
DataSourceBase::shared_ptr RTT::Parser::parseExpression ( const std::string &  s,
TaskContext  
)

Parses the expression in s.

Returns:
A DataSourceBase which contains the expression.
Exceptions:
parse_exception Throws exceptions of type parse_exception.
ParsedFunctions RTT::Parser::parseFunction ( const std::string &  s,
TaskContext ,
const std::string &  filename = "stream" 
)

Reads out the string, parses it, and returns a new FunctionGraph.

Exceptions:
parse_exception Throws exceptions of type parse_exception.
ParsedPrograms RTT::Parser::parseProgram ( const std::string &  s,
TaskContext ,
const std::string &  filename = "stream" 
)

Reads out the string, parses it, and returns a new ProgramGraph.

Exceptions:
parse_exception Throws exceptions of type parse_exception.
ParsedStateMachines RTT::Parser::parseStateMachine ( const std::string &  s,
TaskContext ,
const std::string &  filename = "stream" 
)

Reads out the string, parses it, and returns a new ParsedStateMachine.

Exceptions:
file_parse_exception Throws exceptions of type file_parse_exception.
DataSourceBase::shared_ptr RTT::Parser::parseValueChange ( const std::string &  s,
TaskContext  
)

Parses a change of a value in s.

Returns:
A DataSourceBase which contains the command to change the value.
Exceptions:
parse_exception Throws exceptions of type parse_exception.

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