44 #include "../TaskContext.hpp" 45 #include "../types/TypeStream.hpp" 46 #include "../Logger.hpp" 49 #include <boost/tuple/tuple.hpp> 53 using namespace boost;
56 {
namespace scripting {
58 using namespace detail;
66 std::string prompt(
" = ");
69 doPrint( ds, recurse );
85 Logger::log() << dsb->
get();
90 Logger::log() << dsi->
get() ;
97 Logger::log() << dsl->
get() ;
103 Logger::log() << dsui->
get() ;
108 Logger::log() <<
'"'<< dss->
get() <<
'"' ;
114 Logger::log() << dsvval->
get() ;
119 Logger::log() << ds6d->
get() ;
125 Logger::log() << dsd->
get() ;
130 Logger::log() <<
'\''<< dsc->
get()<<
'\'' ;
139 Logger::log() << siz <<
" Properties";
141 if ( ! bag.empty() ) {
142 Logger::log() <<Logger::nl;
144 Logger::log() <<(*it)->getType()<<
" "<< (*it)->getName();
146 this->printResult( propds.get(), false );
147 Logger::log() <<
" ("<<(*it)->getDescription()<<
')' << Logger::nl;
150 Logger::log() <<
"(empty PropertyBag)";
160 Logger::log() <<
"(void)" ;
166 Logger::log() <<
"( result type '"+ds->
getType()+
"' not known to TaskBrowser )" ;
193 if ( taskcontext->
provides()->getValue( comm ) ) {
205 if ( ds.get() != 0 ) {
237 if ( ds.get() != 0 ) {
virtual std::string getType() const =0
Return useful type info in a human readable format.
virtual result_t get() const =0
Return the data as type T.
Service::shared_ptr provides()
Returns this Service.
virtual const std::string what() const =0
void printResult(DataSourceBase *ds, bool recurse)
The base class for all internal data representations.
static std::ostream & nl(std::ostream &__os)
Insert a newline ' ' in the ostream.
void doPrint(DataSourceBase *ds, bool recurse)
A container for holding references to properties.
virtual void reset()
Reset the data to initial values.
basic_ostreams & endl(basic_ostreams &s)
Flush and newline.
virtual bool evaluate() const =0
Force an evaluation of the DataSourceBase.
static std::ostream & endl(std::ostream &__os)
This is the uppermost exception class in the parser system.
const std::string what() const
This class is the public interface to the Orocos Program Parser Framework.
Properties & getProperties()
Returns a list of all the property objects in this bag.
A normal syntactic parse exception means the parser recognised the input, but got stuck later due to ...
base::DataSourceBase::shared_ptr parseExpression(const std::string &s, TaskContext *)
Parses the expression in s.
Notify the Logger in which 'module' the message occured.
An exception which a parser may throw to indicate that it failed to understand the input...
static Logger & log()
As Instance(), but more userfriendly.
The TaskContext is the C++ representation of an Orocos component.
Properties::iterator iterator
An iterator over the Properties.
boost::intrusive_ptr< DataSourceBase > shared_ptr
Use this type to store a pointer to a DataSourceBase.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
int execute(const std::string &code)
Execute a script statement.
A Fatal Semantic parse exception means the parser knows that the parsing failed dramatically and shou...
base::DataSourceBase::shared_ptr parseValueChange(const std::string &s, TaskContext *)
Parses a change of a value in s.