$search

RTT::scripting::PeerParser Class Reference

#include <PeerParser.hpp>

List of all members.

Public Member Functions

rule_tlocator ()
std::string object ()
rule_tparser ()
TaskContextpeer ()
 PeerParser (TaskContext *c, CommonParser &cp, bool fullpath=false)
void reset ()
ServicePtr taskObject ()

Private Types

enum  PeerErrors { peer_not_found }

Private Member Functions

RTT_HIDE void done ()
RTT_HIDE error_status handle_no_peer (scanner_t const &scan, parser_error< PeerErrors, iter_t > &e)
RTT_HIDE void locatepeer (iter_t begin, iter_t end)
RTT_HIDE void seenobjectname (iter_t begin, iter_t end)

Private Attributes

TaskContext_peer
boost::iterator_difference
< iter_t >::type 
advance_on_error
std::queue< std::string > callqueue
CommonParsercommonparser
TaskContextcontext
ServicePtr mcurobject
bool mfullpath
std::string mlastobject
guard< PeerErrorsmy_guard
rule_t peerlocator
rule_t peerpath

Detailed Description

Get the peer and object from an invocation path like a.b.c.d() .

Definition at line 58 of file PeerParser.hpp.


Member Enumeration Documentation

Enumerator:
peer_not_found 

Definition at line 73 of file PeerParser.hpp.


Constructor & Destructor Documentation

RTT::PeerParser::PeerParser ( TaskContext c,
CommonParser cp,
bool  fullpath = false 
)

Create a PeerParser which starts looking for peers from a task.

Parameters:
c The task to start searching from.
fullpath Set to true if the parser() must resolve the full path.

Definition at line 134 of file PeerParser.cpp.


Member Function Documentation

void RTT::PeerParser::done (  )  [private]

Definition at line 70 of file PeerParser.cpp.

error_status RTT::PeerParser::handle_no_peer ( scanner_t const &  scan,
parser_error< PeerErrors, iter_t > &  e 
) [private]

Definition at line 57 of file PeerParser.cpp.

void RTT::PeerParser::locatepeer ( iter_t  begin,
iter_t  end 
) [private]

Definition at line 169 of file PeerParser.cpp.

rule_t & RTT::PeerParser::locator (  ) 

The locator tries to go as far as possible in the peer-to-object path and will never throw. peer() and object() will contain the last valid peer found and its supposed object, attribute or value.

Definition at line 216 of file PeerParser.cpp.

std::string RTT::PeerParser::object (  ) 

Returns the last matching object name.

Definition at line 231 of file PeerParser.cpp.

rule_t & RTT::PeerParser::parser (  ) 

The parser tries to traverse a full peer-to-object path and throws if it got stuck in the middle. peer() will return the target peer and object() is this or the supposed object of the peer. The parser does not check if this object exists.

Definition at line 211 of file PeerParser.cpp.

TaskContext * RTT::PeerParser::peer (  ) 

Returns the last matching peer.

Definition at line 221 of file PeerParser.cpp.

void RTT::PeerParser::reset ( void   ) 

After reset, peer() == current context and object() == "this".

Definition at line 151 of file PeerParser.cpp.

void RTT::PeerParser::seenobjectname ( iter_t  begin,
iter_t  end 
) [private]

Definition at line 161 of file PeerParser.cpp.

Service::shared_ptr RTT::PeerParser::taskObject (  ) 

Returns the last matching Service or zero if not found.

Definition at line 226 of file PeerParser.cpp.


Member Data Documentation

Definition at line 66 of file PeerParser.hpp.

boost::iterator_difference<iter_t>::type RTT::scripting::PeerParser::advance_on_error [private]

set by locatepeer, read by handle_no_peer

Definition at line 79 of file PeerParser.hpp.

std::queue<std::string> RTT::scripting::PeerParser::callqueue [private]

Definition at line 62 of file PeerParser.hpp.

Definition at line 60 of file PeerParser.hpp.

Definition at line 65 of file PeerParser.hpp.

Definition at line 63 of file PeerParser.hpp.

Definition at line 67 of file PeerParser.hpp.

Definition at line 64 of file PeerParser.hpp.

Definition at line 74 of file PeerParser.hpp.

Definition at line 61 of file PeerParser.hpp.

Definition at line 61 of file PeerParser.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Mar 1 16:27:54 2013