Public Types | Public Member Functions | Private Attributes | List of all members
boost::python::detail::proxy_links< Proxy, Container > Class Template Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/geant4/v4_10_4_p02ba/source/geant4.10.04.p02/environments/g4py/source/boost/detail/indexing_suite_detail.hpp"

Public Types

typedef std::map< Container *, proxy_group< Proxy > > links_t
 
typedef Proxy::index_type index_type
 
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)
 
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 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.

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  }
::xsd::cxx::tree::type container
Definition: Database.h:112
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  }
::xsd::cxx::tree::type container
Definition: Database.h:112
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.

References r().

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  }
TRandom3 r(0)
::xsd::cxx::tree::type container
Definition: Database.h:112
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.

References r().

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  }
TRandom3 r(0)
::xsd::cxx::tree::type container
Definition: Database.h:112
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.

References r().

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  }
TRandom3 r(0)
::xsd::cxx::tree::type container
Definition: Database.h:112
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.

References r().

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  }
TRandom3 r(0)
::xsd::cxx::tree::type container
Definition: Database.h:112
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.

References r().

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  }
TRandom3 r(0)
::xsd::cxx::tree::type container
Definition: Database.h:112
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.

References r().

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  }
TRandom3 r(0)
::xsd::cxx::tree::type container
Definition: Database.h:112
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.

References r().

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  }
TRandom3 r(0)
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.

References r().

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  }
TRandom3 r(0)
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.

References r().

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  }
const XML_Char int len
Definition: expat.h:262
TRandom3 r(0)
::xsd::cxx::tree::type container
Definition: Database.h:112
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.

References r().

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  }
const XML_Char int len
Definition: expat.h:262
TRandom3 r(0)
::xsd::cxx::tree::type container
Definition: Database.h:112

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: