#include <PeerParser.hpp>
Public Member Functions | |
bool | foundPath () |
rule_t & | locator () |
std::string | object () |
rule_t & | parser () |
TaskContext * | peer () |
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 |
CommonParser & | commonparser |
TaskContext * | context |
ServicePtr | mcurobject |
bool | mfoundpath |
bool | mfullpath |
std::string | mlastobject |
guard< PeerErrors > | my_guard |
rule_t | peerlocator |
rule_t | peerpath |
Get the peer and object from an invocation path like a.b.c.d() .
Definition at line 58 of file PeerParser.hpp.
|
private |
Enumerator | |
---|---|
peer_not_found |
Definition at line 73 of file PeerParser.hpp.
RTT::PeerParser::PeerParser | ( | TaskContext * | c, |
CommonParser & | cp, | ||
bool | fullpath = false |
||
) |
Create a PeerParser which starts looking for peers from a task.
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.
|
private |
Definition at line 70 of file PeerParser.cpp.
bool RTT::PeerParser::foundPath | ( | ) |
Returns true if the PeerParser found a valid path. Will also return true if fullpath was set to false in the constructor and a partial match was made.
Definition at line 240 of file PeerParser.cpp.
|
private |
Definition at line 57 of file PeerParser.cpp.
Definition at line 170 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 220 of file PeerParser.cpp.
std::string RTT::PeerParser::object | ( | ) |
Returns the last matching object name.
Definition at line 235 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 215 of file PeerParser.cpp.
TaskContext * RTT::PeerParser::peer | ( | ) |
Returns the last matching peer.
Definition at line 225 of file PeerParser.cpp.
void RTT::PeerParser::reset | ( | ) |
After reset, peer() == current context and object() == "this".
Definition at line 151 of file PeerParser.cpp.
Definition at line 162 of file PeerParser.cpp.
Service::shared_ptr RTT::PeerParser::taskObject | ( | ) |
Returns the last matching Service or zero if not found.
Definition at line 230 of file PeerParser.cpp.
|
private |
Definition at line 66 of file PeerParser.hpp.
|
private |
set by locatepeer, read by handle_no_peer
Definition at line 79 of file PeerParser.hpp.
|
private |
Definition at line 62 of file PeerParser.hpp.
|
private |
Definition at line 60 of file PeerParser.hpp.
|
private |
Definition at line 65 of file PeerParser.hpp.
|
private |
Definition at line 63 of file PeerParser.hpp.
|
private |
Definition at line 67 of file PeerParser.hpp.
|
private |
Definition at line 67 of file PeerParser.hpp.
|
private |
Definition at line 64 of file PeerParser.hpp.
|
private |
Definition at line 74 of file PeerParser.hpp.
|
private |
Definition at line 61 of file PeerParser.hpp.
|
private |
Definition at line 61 of file PeerParser.hpp.