warehouse::ResultIterator< M > Class Template Reference

An iterator over results of a query. More...

#include <result_iterator.h>

List of all members.

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

Detailed Description

template<class M>
class warehouse::ResultIterator< M >

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.


Member Typedef Documentation

template<class M>
typedef MessageWithMetadata<M> warehouse::ResultIterator< M >::Msg

Definition at line 72 of file result_iterator.h.

template<class M>
typedef M::ConstPtr warehouse::ResultIterator< M >::Ptr

Definition at line 73 of file result_iterator.h.


Constructor & Destructor Documentation

template<class M >
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.

template<class M >
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.

template<class M >
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.


Member Function Documentation

template<class M >
MessageWithMetadata< M >::ConstPtr warehouse::ResultIterator< M >::dereference (  )  const [inline, private]

Definition at line 101 of file result_iterator_impl.h.

template<class M >
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.

template<class M >
void warehouse::ResultIterator< M >::increment (  )  [inline, private]

Member functions needed to be an iterator.

Definition at line 109 of file result_iterator_impl.h.

template<class M >
void warehouse::ResultIterator< M >::maybeFetchFirst (  )  const [inline, private]

Definition at line 89 of file result_iterator_impl.h.


Friends And Related Function Documentation

template<class M>
friend class boost::iterator_core_access [friend]

Definition at line 89 of file result_iterator.h.


Member Data Documentation

template<class M>
boost::shared_ptr<QueryResultSubscriber> warehouse::ResultIterator< M >::sub_ [mutable, private]

Definition at line 120 of file result_iterator.h.


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


warehouse
Author(s): Nate Koenig, Bhaskara Marthi
autogenerated on Fri Jan 11 10:09:02 2013