An iterator over results of a query. More...
#include <result_iterator.h>
Classes | |
| struct | QueryResultSubscriber |
Public Types | |
| typedef MessageWithMetadata< M > | Msg |
| typedef M::ConstPtr | Ptr |
Public Member Functions | |
| ResultIterator () | |
| Constructor for past_the_end iterator. Not to be called by outside code. | |
| ResultIterator (const ResultIterator &res_) | |
| Copy constructor; not to be called by outside code Only call when rhs is about to go out of scope. | |
| ResultIterator (const ros::NodeHandle nh, const InitiateQuery &srv, ros::ServiceClient &pull_client, bool metadata_only) | |
| Constructor; not to be called by outside code. | |
Private Member Functions | |
| MessageWithMetadata< M >::ConstPtr | dereference () const |
| bool | equal (const ResultIterator< M > &other) const |
| void | increment () |
| Member functions needed to be an iterator. | |
| void | maybeFetchFirst () const |
Private Attributes | |
| boost::shared_ptr < QueryResultSubscriber > | sub_ |
Friends | |
| class | boost::iterator_core_access |
An iterator over results of a query.
This type models Boost single pass iterator , over MessageWithMetadata<M> objects.
Note: none of the operations on this iterator are threadsafe due to the underlying ros calls
Definition at line 63 of file result_iterator.h.
| typedef MessageWithMetadata<M> warehouse::ResultIterator< M >::Msg |
Definition at line 72 of file result_iterator.h.
| typedef M::ConstPtr warehouse::ResultIterator< M >::Ptr |
Definition at line 73 of file result_iterator.h.
| warehouse::ResultIterator< M >::ResultIterator | ( | const ros::NodeHandle | nh, | |
| const InitiateQuery & | srv, | |||
| ros::ServiceClient & | pull_client, | |||
| bool | metadata_only | |||
| ) | [inline] |
Constructor; not to be called by outside code.
Main constructor.
Definition at line 51 of file result_iterator_impl.h.
| warehouse::ResultIterator< M >::ResultIterator | ( | const ResultIterator< M > & | res_ | ) | [inline] |
Copy constructor; not to be called by outside code Only call when rhs is about to go out of scope.
Copy constructor.
Definition at line 81 of file result_iterator_impl.h.
| warehouse::ResultIterator< M >::ResultIterator | ( | ) | [inline] |
Constructor for past_the_end iterator. Not to be called by outside code.
Represents a past-the-end iterator.
Definition at line 75 of file result_iterator_impl.h.
| MessageWithMetadata< M >::ConstPtr warehouse::ResultIterator< M >::dereference | ( | ) | const [inline, private] |
Definition at line 101 of file result_iterator_impl.h.
| bool warehouse::ResultIterator< M >::equal | ( | const ResultIterator< M > & | other | ) | const [inline, private] |
Incomplete; the only case we care about is whether we're at the end yet.
Definition at line 174 of file result_iterator_impl.h.
| void warehouse::ResultIterator< M >::increment | ( | ) | [inline, private] |
Member functions needed to be an iterator.
Definition at line 109 of file result_iterator_impl.h.
| void warehouse::ResultIterator< M >::maybeFetchFirst | ( | ) | const [inline, private] |
Definition at line 89 of file result_iterator_impl.h.
friend class boost::iterator_core_access [friend] |
Definition at line 89 of file result_iterator.h.
boost::shared_ptr<QueryResultSubscriber> warehouse::ResultIterator< M >::sub_ [mutable, private] |
Definition at line 120 of file result_iterator.h.