32 #include <boost/foreach.hpp> 36 #define foreach BOOST_FOREACH 56 if (view != NULL && !end)
76 assert(
view_ != NULL);
88 assert(
view_ != NULL);
93 if (start != range->
end)
98 while (iter !=
iters_.back().iter)
110 return other.
iters_.empty();
118 assert(
view_ != NULL);
137 std::multiset<IndexEntry>::const_iterator last_iter =
iters_.back().iter;
139 while (!
iters_.empty() &&
iters_.back().iter == last_iter)
172 addQuery(bag, start_time, end_time);
176 addQuery(bag, query, start_time, end_time);
195 if (range->
begin->time < begin)
196 begin = range->
begin->time;
210 std::multiset<IndexEntry>::const_iterator e = range->
end;
252 boost::function<bool(ConnectionInfo const*)> query =
TrueQuery();
281 multiset<IndexEntry>
const& index = j->second;
286 std::multiset<IndexEntry>::const_iterator
begin = index.lower_bound(start_time_lookup_entry);
287 std::multiset<IndexEntry>::const_iterator
end = index.upper_bound(end_time_lookup_entry);
304 for (vector<MessageRange*>::iterator k =
ranges_.begin(); k !=
ranges_.end(); k++) {
334 std::vector<const ConnectionInfo*> connections;
BagMode getMode() const
Get the mode the bag is in.
boost::function< bool(ConnectionInfo const *)> const & getQuery() const
Get the query functor.
std::vector< const ConnectionInfo * > getConnections()
bool equal(iterator const &other) const
std::map< uint32_t, ConnectionInfo * > connections_
The actual iterator data structure.
MessageInstance * newMessageInstance(ConnectionInfo const *connection_info, IndexEntry const &index, Bag const &bag)
Base class for rosbag exceptions.
An iterator that points to a MessageInstance from a bag.
iterator & operator=(iterator const &i)
MessageInstance * message_instance_
void updateQueries(BagQuery *q)
void addQuery(Bag const &bag, ros::Time const &start_time=ros::TIME_MIN, ros::Time const &end_time=ros::TIME_MAX)
Add a query to a view.
A class pointing into a bag file.
std::multiset< IndexEntry >::const_iterator iter
ConnectionInfo const * connection_info
ros::Time const & getStartTime() const
Get the start-time.
BagQuery const * bag_query
pointer to vector of queries in View
ROSTIME_DECL const Time TIME_MAX
std::map< uint32_t, std::multiset< IndexEntry > > connection_indexes_
std::vector< ViewIterHelper > iters_
MessageRange const * range
pointer to vector of ranges in View
std::multiset< IndexEntry >::const_iterator begin
Pairs of queries and the bags they come from (used internally by View)
ros::Time const & getEndTime() const
Get the end-time.
std::vector< MessageRange * > ranges_
ROSTIME_DECL const Time TIME_MIN
void populateSeek(std::multiset< IndexEntry >::const_iterator iter)
iterator end()
Default constructed iterator signifies end.
iterator begin()
Simply copy the merge_queue state into the iterator.
std::vector< BagQuery * > queries_
View(bool const &reduce_overlap=false)
Create a view on a bag.
std::multiset< IndexEntry >::const_iterator end
MessageInstance & dereference() const