Beispiel #1
0
//取出当前的跟踪信息,这个函数会将m_bUpdate设置为false
void ProcTracker::getTrackerInfo(std::list<CString>& trackInfo)
{
	EnterCriticalSection(&m_TrackInfoListCS);
	trackInfo.assign(m_TrackInfoList.begin(), m_TrackInfoList.end());
	m_bUpdate = false;
	LeaveCriticalSection(&m_TrackInfoListCS);
}
	void matching_traveled_edges(std::unordered_set<HGVertex*> &mv, GraphListEntry &g,
				     std::unordered_set<HGEdge*> &edge_set, std::list<TravelerList*> &traveler_lists)
	{	// return a set of edges for the traveled graph format,
		// optionally restricted by region or system or placeradius
		std::unordered_set<TravelerList*> trav_set;
		for (HGVertex *v : mv)
		{	if (v->visibility < 1) continue;
			for (HGEdge *e : v->incident_t_edges)
			  if (!g.placeradius || g.placeradius->contains_edge(e))
			  {	bool rg_in_rg = 0;
				if (g.regions) for (Region *r : *g.regions)
				  if (r == e->segment->route->region)
				  {	rg_in_rg = 1;
					break;
				  }
				if (!g.regions || rg_in_rg)
				{	bool system_match = !g.systems;
					if (!system_match)
					  for (std::pair<std::string, HighwaySystem*> &rs : e->route_names_and_systems)
					  {	bool sys_in_sys = 0;
						if (g.systems) for (HighwaySystem *s : *g.systems)
						  if (s == rs.second)
						  {	sys_in_sys = 1;
							break;
						  }
						if (sys_in_sys) system_match = 1;
					  }
					if (system_match)
					{	edge_set.insert(e);
						for (TravelerList *t : e->segment->clinched_by) trav_set.insert(t);
					}
				}
			  }
		}
		traveler_lists.assign(trav_set.begin(), trav_set.end());
		traveler_lists.sort(sort_travelers_by_name);
	}
void bad_assign_list1(std::list<int> &L, int n) {
  auto i0 = L.cbegin();
  L.assign(10, n);
  *i0; // expected-warning{{Invalidated iterator accessed}}
}
Beispiel #4
0
bool nuiTreeBase::GetChildren(std::list<nuiTreePtr>& rChildren)
{
  rChildren.clear();
  rChildren.assign(mpChildren.begin(), mpChildren.end());
  return false;
}
Beispiel #5
0
 static void list_assign(std::list<T>& l, bp::object o)
 {
   // Turn a Python sequence into an STL input range
   bp::stl_input_iterator<T> begin(o), end;
   l.assign(begin, end);
 }
/*Construct frame pointers for each frame in the pool*/
void TrackAssociation::ConstructFramePoolPointer(std::list<ImageRepresentation*> &frame_p_list)
{
	frame_p_list.clear();
	frame_p_list.assign(frame_pool.cbegin(),frame_pool.cend());
}