LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
boost::python::detail::proxy_links< Proxy, Container > Class Template Reference

#include "indexing_suite_detail.hpp"

Public Types

typedef std::map< Container *, proxy_group< Proxy > > links_t
 
typedef Proxy::index_type index_type
 

Public Member Functions

void remove (Proxy &proxy)
 
void add (PyObject *prox, Container &container)
 
template<class NoSlice >
void erase (Container &container, index_type i, NoSlice no_slice)
 
void erase (Container &container, index_type from, index_type to)
 
void replace (Container &container, index_type from, index_type to, index_type len)
 
PyObject * find (Container &container, index_type i)
 

Private Attributes

links_t links
 

Detailed Description

template<class Proxy, class Container>
class boost::python::detail::proxy_links< Proxy, Container >

Definition at line 249 of file indexing_suite_detail.hpp.

Member Typedef Documentation

template<class Proxy, class Container>
typedef Proxy::index_type boost::python::detail::proxy_links< Proxy, Container >::index_type

Definition at line 254 of file indexing_suite_detail.hpp.

template<class Proxy, class Container>
typedef std::map<Container*, proxy_group<Proxy> > boost::python::detail::proxy_links< Proxy, Container >::links_t

Definition at line 253 of file indexing_suite_detail.hpp.

Member Function Documentation

template<class Proxy, class Container>
void boost::python::detail::proxy_links< Proxy, Container >::add ( PyObject *  prox,
Container &  container 
)
inline

Definition at line 270 of file indexing_suite_detail.hpp.

271  {
272  // Add a proxy
273  links[&container].add(prox);
274  }
template<class Proxy, class Container>
template<class NoSlice >
void boost::python::detail::proxy_links< Proxy, Container >::erase ( Container &  container,
index_type  i,
NoSlice  no_slice 
)
inline

Definition at line 277 of file indexing_suite_detail.hpp.

278  {
279  // Erase the proxy with index i
280  typename links_t::iterator r = links.find(&container);
281  if (r != links.end())
282  {
283  r->second.erase(i, no_slice);
284  if (r->second.size() == 0)
285  links.erase(r);
286  }
287  }
intermediate_table::iterator iterator
template<class Proxy, class Container>
void boost::python::detail::proxy_links< Proxy, Container >::erase ( Container &  container,
index_type  from,
index_type  to 
)
inline

Definition at line 290 of file indexing_suite_detail.hpp.

291  {
292  // Erase all proxies with indexes from..to
293  typename links_t::iterator r = links.find(&container);
294  if (r != links.end())
295  {
296  r->second.erase(from, to);
297  if (r->second.size() == 0)
298  links.erase(r);
299  }
300  }
intermediate_table::iterator iterator
template<class Proxy, class Container>
PyObject* boost::python::detail::proxy_links< Proxy, Container >::find ( Container &  container,
index_type  i 
)
inline

Definition at line 324 of file indexing_suite_detail.hpp.

325  {
326  // Find the proxy with *exact* index i.
327  // Return 0 (null) if no proxy with the given
328  // index is found.
329  typename links_t::iterator r = links.find(&container);
330  if (r != links.end())
331  return r->second.find(i);
332  return 0;
333  }
intermediate_table::iterator iterator
template<class Proxy, class Container>
void boost::python::detail::proxy_links< Proxy, Container >::remove ( Proxy &  proxy)
inline

Definition at line 257 of file indexing_suite_detail.hpp.

258  {
259  // Remove a proxy.
260  typename links_t::iterator r = links.find(&proxy.get_container());
261  if (r != links.end())
262  {
263  r->second.remove(proxy);
264  if (r->second.size() == 0)
265  links.erase(r);
266  }
267  }
intermediate_table::iterator iterator
Encloses LArSoft data product proxy objects and utilities.See this doxygen module for an introduction...
template<class Proxy, class Container>
void boost::python::detail::proxy_links< Proxy, Container >::replace ( Container &  container,
index_type  from,
index_type  to,
index_type  len 
)
inline

Definition at line 303 of file indexing_suite_detail.hpp.

306  {
307  // Erase all proxies with indexes from..to.
308  // Adjust the displaced indexes such that the
309  // final effect is that we have inserted *len*
310  // number of proxies in the vacated region. This
311  // procedure involves adjusting the indexes of
312  // the proxies.
313 
314  typename links_t::iterator r = links.find(&container);
315  if (r != links.end())
316  {
317  r->second.replace(from, to, len);
318  if (r->second.size() == 0)
319  links.erase(r);
320  }
321  }
intermediate_table::iterator iterator

Member Data Documentation

template<class Proxy, class Container>
links_t boost::python::detail::proxy_links< Proxy, Container >::links
private

Definition at line 337 of file indexing_suite_detail.hpp.


The documentation for this class was generated from the following file: