31 #include <boost/foreach.hpp> 33 #define foreach BOOST_FOREACH 45 : query_(query), start_time_(start_time), end_time_(end_time)
59 topics_.push_back(topic);
65 foreach(
string const& topic,
topics_)
66 if (topic == info->
topic)
75 types_.push_back(type);
81 foreach(
string const& type,
types_)
90 BagQuery::BagQuery(
Bag const* _bag,
Query const& _query, uint32_t _bag_revision) : bag(_bag), query(_query), bag_revision(_bag_revision) {
96 std::multiset<IndexEntry>::const_iterator
const& _end,
99 : begin(_begin), end(_end), connection_info(_connection_info), bag_query(_bag_query)
106 : iter(_iter), range(_range)
111 return (a.
iter)->time > (b.
iter)->time;
boost::function< bool(ConnectionInfo const *)> const & getQuery() const
Get the query functor.
bool operator()(ConnectionInfo const *) const
TypeQuery(std::string const &type)
bool operator()(ViewIterHelper const &a, ViewIterHelper const &b)
boost::function< bool(ConnectionInfo const *)> query_
The actual iterator data structure.
std::vector< std::string > topics_
ViewIterHelper(std::multiset< IndexEntry >::const_iterator _iter, MessageRange const *_range)
std::vector< std::string > types_
bool operator()(ConnectionInfo const *) const
MessageRange(std::multiset< IndexEntry >::const_iterator const &_begin, std::multiset< IndexEntry >::const_iterator const &_end, ConnectionInfo const *_connection_info, BagQuery const *_bag_query)
BagQuery(Bag const *_bag, Query const &_query, uint32_t _bag_revision)
std::multiset< IndexEntry >::const_iterator iter
ros::Time const & getStartTime() const
Get the start-time.
Pairs of queries and the bags they come from (used internally by View)
ros::Time const & getEndTime() const
Get the end-time.
Query(boost::function< bool(ConnectionInfo const *)> &query, ros::Time const &start_time=ros::TIME_MIN, ros::Time const &end_time=ros::TIME_MAX)
The base query takes an optional time-range.
TopicQuery(std::string const &topic)