ATLAS Offline Software
Public Types | Static Public Member Functions | List of all members
NavigationDefaults::DefaultChildColl< CONT, RPAR > Struct Template Reference

#include <NavigationDefaults.h>

Collaboration diagram for NavigationDefaults::DefaultChildColl< CONT, RPAR >:

Public Types

typedef std::pair< ElementLink< CONT >, RPAR > value_type
 
typedef std::vector< value_typetype
 
typedef type::iterator type_iterator
 
typedef type::const_iterator type_const_iterator
 
typedef CONT::base_value_type * child_ptr
 
typedef const CONT::base_value_type * const_child_ptr
 
typedef SG::GenerateIndexingPolicy< CONT >::type::index_type external_index_type
 

Static Public Member Functions

static const_child_ptr getChildPtr (type_const_iterator thisIter)
 
static RPAR getChildPar (type_const_iterator thisIter)
 
static const ElementLink< CONT > * getElementPtr (type_const_iterator thisIter)
 
static const CONT & getContRef (type_const_iterator thisIter)
 
static const CONT & getContRef (const type &cont, const_child_ptr aChild)
 
static const CONT * getContPtr (type_const_iterator thisIter)
 
static const CONT * getContPtr (const type &cont, const_child_ptr aChild)
 
static bool getContIndex (type_const_iterator thisIter, external_index_type &theIndex)
 
static bool getContIndex (const type &cont, const_child_ptr aChild, external_index_type &theIndex)
 
static void insert (type &cont, const CONT *aChildContainer, const_child_ptr aChild, const RPAR &aPar=RPAR(), size_t sizeHint=0)
 
static void insert (type &cont, const CONT *aChildContainer, const external_index_type &anIndex, const RPAR &aPar=RPAR(), size_t sizeHint=0)
 
static void insert (type &cont, const CONT *aChildContainer, const external_index_type &anIndex, IProxyDict *sg, const RPAR &aPar=RPAR(), size_t sizeHint=0)
 
static void insert (type &cont, const ElementLink< CONT > *aLink, const RPAR &aPar=RPAR(), size_t sizeHint=0)
 
static void changeParm (type &cont, const_child_ptr pChild, const RPAR &aPar=RPAR())
 
static void changeParm (type &cont, const CONT *pContainer, const external_index_type &refIndex, const RPAR &aPar=RPAR())
 
static type_const_iterator find (const type &cont, const_child_ptr aChild)
 
static type_iterator find (type &cont, const_child_ptr aChild)
 
static bool remove (type &cont, const_child_ptr aChild)
 
static bool remove (type &cont, const ElementLink< CONT > *theElement)
 
static bool replace (type &cont, const CONT &theNewContainer)
 
static bool contains (const type &cont, const_child_ptr aChild)
 

Detailed Description

template<typename CONT, typename RPAR>
struct NavigationDefaults::DefaultChildColl< CONT, RPAR >

Definition at line 68 of file NavigationDefaults.h.

Member Typedef Documentation

◆ child_ptr

template<typename CONT , typename RPAR >
typedef CONT::base_value_type* NavigationDefaults::DefaultChildColl< CONT, RPAR >::child_ptr

Definition at line 76 of file NavigationDefaults.h.

◆ const_child_ptr

template<typename CONT , typename RPAR >
typedef const CONT::base_value_type* NavigationDefaults::DefaultChildColl< CONT, RPAR >::const_child_ptr

Definition at line 77 of file NavigationDefaults.h.

◆ external_index_type

template<typename CONT , typename RPAR >
typedef SG::GenerateIndexingPolicy<CONT>::type::index_type NavigationDefaults::DefaultChildColl< CONT, RPAR >::external_index_type

Definition at line 79 of file NavigationDefaults.h.

◆ type

template<typename CONT , typename RPAR >
typedef std::vector< value_type > NavigationDefaults::DefaultChildColl< CONT, RPAR >::type

Definition at line 73 of file NavigationDefaults.h.

◆ type_const_iterator

template<typename CONT , typename RPAR >
typedef type::const_iterator NavigationDefaults::DefaultChildColl< CONT, RPAR >::type_const_iterator

Definition at line 75 of file NavigationDefaults.h.

◆ type_iterator

template<typename CONT , typename RPAR >
typedef type::iterator NavigationDefaults::DefaultChildColl< CONT, RPAR >::type_iterator

Definition at line 74 of file NavigationDefaults.h.

◆ value_type

template<typename CONT , typename RPAR >
typedef std::pair< ElementLink<CONT>, RPAR > NavigationDefaults::DefaultChildColl< CONT, RPAR >::value_type

Definition at line 72 of file NavigationDefaults.h.

Member Function Documentation

◆ changeParm() [1/2]

template<typename CONT , typename RPAR >
static void NavigationDefaults::DefaultChildColl< CONT, RPAR >::changeParm ( type cont,
const CONT *  pContainer,
const external_index_type refIndex,
const RPAR &  aPar = RPAR() 
)
inlinestatic

Definition at line 211 of file NavigationDefaults.h.

215  {
216  changeParm(cont,(pContainer->operator[])(refIndex),aPar);
217  }

◆ changeParm() [2/2]

template<typename CONT , typename RPAR >
static void NavigationDefaults::DefaultChildColl< CONT, RPAR >::changeParm ( type cont,
const_child_ptr  pChild,
const RPAR &  aPar = RPAR() 
)
inlinestatic

Definition at line 202 of file NavigationDefaults.h.

205  {
206  type_iterator iObj = find(cont,pChild);
207  if ( iObj != cont.end() ) (*iObj).second = aPar;
208  }

◆ contains()

template<typename CONT , typename RPAR >
static bool NavigationDefaults::DefaultChildColl< CONT, RPAR >::contains ( const type cont,
const_child_ptr  aChild 
)
inlinestatic

Definition at line 316 of file NavigationDefaults.h.

317  {
318  return find(cont,aChild) != cont.end();
319  }

◆ find() [1/2]

template<typename CONT , typename RPAR >
static type_const_iterator NavigationDefaults::DefaultChildColl< CONT, RPAR >::find ( const type cont,
const_child_ptr  aChild 
)
inlinestatic

Definition at line 230 of file NavigationDefaults.h.

231  {
232  type_const_iterator iEntry = cont.begin();
233  type_const_iterator lastEntry = cont.end();
234  while (iEntry != lastEntry && aChild != *((*iEntry).first)) ++iEntry;
235  return iEntry;
236  }

◆ find() [2/2]

template<typename CONT , typename RPAR >
static type_iterator NavigationDefaults::DefaultChildColl< CONT, RPAR >::find ( type cont,
const_child_ptr  aChild 
)
inlinestatic

Definition at line 240 of file NavigationDefaults.h.

241  {
242  type_iterator iEntry = cont.begin();
243  type_iterator lastEntry = cont.end();
244  while (iEntry != lastEntry && aChild != *((*iEntry).first)) ++iEntry;
245  return iEntry;
246  }

◆ getChildPar()

template<typename CONT , typename RPAR >
static RPAR NavigationDefaults::DefaultChildColl< CONT, RPAR >::getChildPar ( type_const_iterator  thisIter)
inlinestatic

Definition at line 91 of file NavigationDefaults.h.

92  { return (*thisIter).second; }

◆ getChildPtr()

template<typename CONT , typename RPAR >
static const_child_ptr NavigationDefaults::DefaultChildColl< CONT, RPAR >::getChildPtr ( type_const_iterator  thisIter)
inlinestatic

Definition at line 82 of file NavigationDefaults.h.

83  {
84  const_child_ptr thePointer = 0;
85  if ((*thisIter).first.isValid() )
86  thePointer = *((*thisIter).first);
87  return thePointer;
88  }

◆ getContIndex() [1/2]

template<typename CONT , typename RPAR >
static bool NavigationDefaults::DefaultChildColl< CONT, RPAR >::getContIndex ( const type cont,
const_child_ptr  aChild,
external_index_type theIndex 
)
inlinestatic

Definition at line 140 of file NavigationDefaults.h.

142  {
143  type_const_iterator found = find(cont,aChild);
144  if ( found != cont.end() )
145  {
146  return getContIndex(found,theIndex);
147  }
148  return false;
149  }

◆ getContIndex() [2/2]

template<typename CONT , typename RPAR >
static bool NavigationDefaults::DefaultChildColl< CONT, RPAR >::getContIndex ( type_const_iterator  thisIter,
external_index_type theIndex 
)
inlinestatic

Definition at line 130 of file NavigationDefaults.h.

132  {
133  theIndex = ((*thisIter).first).index();
134  const CONT* cont = getContPtr(thisIter);
135  return cont ? theIndex < cont->size() : false;
136  }

◆ getContPtr() [1/2]

template<typename CONT , typename RPAR >
static const CONT* NavigationDefaults::DefaultChildColl< CONT, RPAR >::getContPtr ( const type cont,
const_child_ptr  aChild 
)
inlinestatic

Definition at line 120 of file NavigationDefaults.h.

121  {
122  type_const_iterator found = find(cont,aChild);
123  return found != cont.end()
124  ? getContPtr(found)
125  : 0;
126  }

◆ getContPtr() [2/2]

template<typename CONT , typename RPAR >
static const CONT* NavigationDefaults::DefaultChildColl< CONT, RPAR >::getContPtr ( type_const_iterator  thisIter)
inlinestatic

Definition at line 114 of file NavigationDefaults.h.

115  {
116  return ((*thisIter).first).getStorableObjectPointer();
117  }

◆ getContRef() [1/2]

template<typename CONT , typename RPAR >
static const CONT& NavigationDefaults::DefaultChildColl< CONT, RPAR >::getContRef ( const type cont,
const_child_ptr  aChild 
)
inlinestatic

Definition at line 108 of file NavigationDefaults.h.

109  {
110  return getContRef(find(cont,aChild));
111  }

◆ getContRef() [2/2]

template<typename CONT , typename RPAR >
static const CONT& NavigationDefaults::DefaultChildColl< CONT, RPAR >::getContRef ( type_const_iterator  thisIter)
inlinestatic

Definition at line 102 of file NavigationDefaults.h.

103  {
104  return ((*thisIter).first).getStorableObjectRef();
105  }

◆ getElementPtr()

template<typename CONT , typename RPAR >
static const ElementLink<CONT>* NavigationDefaults::DefaultChildColl< CONT, RPAR >::getElementPtr ( type_const_iterator  thisIter)
inlinestatic

Definition at line 95 of file NavigationDefaults.h.

97  {
98  return &((*thisIter).first);
99  }

◆ insert() [1/4]

template<typename CONT , typename RPAR >
static void NavigationDefaults::DefaultChildColl< CONT, RPAR >::insert ( type cont,
const CONT *  aChildContainer,
const external_index_type anIndex,
const RPAR &  aPar = RPAR(),
size_t  sizeHint = 0 
)
inlinestatic

Definition at line 168 of file NavigationDefaults.h.

172  {
173  if (sizeHint && cont.capacity() < sizeHint)
174  cont.reserve(sizeHint);
175  cont.emplace_back (*aChildContainer,anIndex, aPar);
176  }

◆ insert() [2/4]

template<typename CONT , typename RPAR >
static void NavigationDefaults::DefaultChildColl< CONT, RPAR >::insert ( type cont,
const CONT *  aChildContainer,
const external_index_type anIndex,
IProxyDict sg,
const RPAR &  aPar = RPAR(),
size_t  sizeHint = 0 
)
inlinestatic

Definition at line 179 of file NavigationDefaults.h.

184  {
185  if (sizeHint && cont.capacity() < sizeHint)
186  cont.reserve(sizeHint);
187  cont.emplace_back (*aChildContainer,anIndex, sg, aPar);
188  }

◆ insert() [3/4]

template<typename CONT , typename RPAR >
static void NavigationDefaults::DefaultChildColl< CONT, RPAR >::insert ( type cont,
const CONT *  aChildContainer,
const_child_ptr  aChild,
const RPAR &  aPar = RPAR(),
size_t  sizeHint = 0 
)
inlinestatic

Definition at line 154 of file NavigationDefaults.h.

159  {
160  if (sizeHint && cont.capacity() < sizeHint)
161  cont.reserve(sizeHint);
162  cont.push_back(value_type(ElementLink<CONT>(const_cast<child_ptr>(aChild),
163  *aChildContainer),
164  aPar));
165  }

◆ insert() [4/4]

template<typename CONT , typename RPAR >
static void NavigationDefaults::DefaultChildColl< CONT, RPAR >::insert ( type cont,
const ElementLink< CONT > *  aLink,
const RPAR &  aPar = RPAR(),
size_t  sizeHint = 0 
)
inlinestatic

Definition at line 191 of file NavigationDefaults.h.

195  {
196  if (sizeHint && cont.capacity() < sizeHint)
197  cont.reserve(sizeHint);
198  cont.push_back(value_type(*aLink, aPar));
199  }

◆ remove() [1/2]

template<typename CONT , typename RPAR >
static bool NavigationDefaults::DefaultChildColl< CONT, RPAR >::remove ( type cont,
const ElementLink< CONT > *  theElement 
)
inlinestatic

Definition at line 287 of file NavigationDefaults.h.

288  {
289  type_iterator found = find(cont,theElement);
290  if ( found != cont.end() )
291  {
292  // delete (*found).first;
293  cont.erase(found);
294  return true;
295  }
296  else
297  {
298  return false;
299  }
300  }

◆ remove() [2/2]

template<typename CONT , typename RPAR >
static bool NavigationDefaults::DefaultChildColl< CONT, RPAR >::remove ( type cont,
const_child_ptr  aChild 
)
inlinestatic

Definition at line 268 of file NavigationDefaults.h.

269  {
270  type_iterator found = find(cont,aChild);
271  if ( found != cont.end() )
272  {
273  // we assume the container owns the ElementLink/parameter pair,
274  // but not the object linked by ElementLink --- FIXME ??
275  // delete (*found).first;
276  cont.erase(found);
277  return true;
278  }
279  else
280  {
281  return false;
282  }
283  }

◆ replace()

template<typename CONT , typename RPAR >
static bool NavigationDefaults::DefaultChildColl< CONT, RPAR >::replace ( type cont,
const CONT &  theNewContainer 
)
inlinestatic

Definition at line 304 of file NavigationDefaults.h.

304  {
305  type_iterator firstEntry = cont.begin();
306  type_iterator lastEntry = cont.end();
307  for ( ; firstEntry != lastEntry ; ++firstEntry ) {
308  // Must force replacement with second arg true
309  ((*firstEntry).first).setStorableObject(theNewContainer, true);
310  }
311  return true;
312  }

The documentation for this struct was generated from the following file:
NavigationDefaults::DefaultChildColl::changeParm
static void changeParm(type &cont, const_child_ptr pChild, const RPAR &aPar=RPAR())
Definition: NavigationDefaults.h:202
NavigationDefaults::DefaultChildColl::type_const_iterator
type::const_iterator type_const_iterator
Definition: NavigationDefaults.h:75
NavigationDefaults::DefaultChildColl::const_child_ptr
const CONT::base_value_type * const_child_ptr
Definition: NavigationDefaults.h:77
NavigationDefaults::DefaultChildColl::find
static type_const_iterator find(const type &cont, const_child_ptr aChild)
Definition: NavigationDefaults.h:230
NavigationDefaults::DefaultChildColl::getContPtr
static const CONT * getContPtr(type_const_iterator thisIter)
Definition: NavigationDefaults.h:114
NavigationDefaults::DefaultChildColl::child_ptr
CONT::base_value_type * child_ptr
Definition: NavigationDefaults.h:76
NavigationDefaults::DefaultChildColl::getContRef
static const CONT & getContRef(type_const_iterator thisIter)
Definition: NavigationDefaults.h:102
NavigationDefaults::DefaultChildColl::type_iterator
type::iterator type_iterator
Definition: NavigationDefaults.h:74
NavigationDefaults::DefaultChildColl::getContIndex
static bool getContIndex(type_const_iterator thisIter, external_index_type &theIndex)
Definition: NavigationDefaults.h:130
NavigationDefaults::DefaultChildColl::value_type
std::pair< ElementLink< CONT >, RPAR > value_type
Definition: NavigationDefaults.h:72
DeMoScan.index
string index
Definition: DeMoScan.py:362
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101