53 if (view != NULL && !end)
73 assert(
view_ != NULL);
85 assert(
view_ != NULL);
90 if (start != range->
end)
95 while (iter !=
iters_.back().iter)
107 return other.
iters_.empty();
115 assert(
view_ != NULL);
134 std::multiset<IndexEntry>::const_iterator last_iter =
iters_.back().iter;
136 while (!
iters_.empty() &&
iters_.back().iter == last_iter)
169 addQuery(bag, start_time, end_time);
173 addQuery(bag, query, start_time, end_time);
192 if (range->begin->time < begin)
193 begin = range->begin->time;
207 std::multiset<IndexEntry>::const_iterator e = range->end;
236 size_cache_ += std::distance(range->begin, range->end);
249 boost::function<bool(ConnectionInfo const*)> query =
TrueQuery();
278 multiset<IndexEntry>
const& index = j->second;
283 std::multiset<IndexEntry>::const_iterator
begin = index.lower_bound(start_time_lookup_entry);
284 std::multiset<IndexEntry>::const_iterator
end = index.upper_bound(end_time_lookup_entry);
301 for (vector<MessageRange*>::iterator k =
ranges_.begin(); k !=
ranges_.end(); k++) {
322 if (query->bag->bag_revision_ != query->bag_revision) {
324 query->bag_revision = query->bag->bag_revision_;
331 std::vector<const ConnectionInfo*> connections;
332 connections.reserve(
ranges_.size());
336 connections.push_back(range->connection_info);
BagMode getMode() const
Get the mode the bag is in.
std::vector< const ConnectionInfo * > getConnections()
std::map< uint32_t, ConnectionInfo * > connections_
const Time TIME_MIN(0, 1)
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)
ros::Time const & getEndTime() const
Get the end-time.
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
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)
std::vector< MessageRange * > ranges_
ros::Time const & getStartTime() const
Get the start-time.
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_
MessageInstance & dereference() const
View(bool const &reduce_overlap=false)
Create a view on a bag.
std::multiset< IndexEntry >::const_iterator end
bool equal(iterator const &other) const
boost::function< bool(ConnectionInfo const *)> const & getQuery() const
Get the query functor.