ATLAS Offline Software
Loading...
Searching...
No Matches
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_type > type
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>
void NavigationDefaults::DefaultChildColl< CONT, RPAR >::changeParm ( type & cont,
const CONT * pContainer,
const external_index_type & refIndex,
const RPAR & aPar = RPAR() )
inlinestatic

Definition at line 215 of file NavigationDefaults.h.

219 {
220 changeParm(cont,(pContainer->operator[])(refIndex),aPar);
221 }
static void changeParm(type &cont, const_child_ptr pChild, const RPAR &aPar=RPAR())

◆ changeParm() [2/2]

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

Definition at line 206 of file NavigationDefaults.h.

209 {
211 if ( iObj != cont.end() ) (*iObj).second = aPar;
212 }
static type_const_iterator find(const type &cont, const_child_ptr aChild)

◆ contains()

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

Definition at line 320 of file NavigationDefaults.h.

321 {
322 return find(cont,aChild) != cont.end();
323 }

◆ find() [1/2]

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

Definition at line 234 of file NavigationDefaults.h.

235 {
238 while (iEntry != lastEntry && aChild != *((*iEntry).first)) ++iEntry;
239 return iEntry;
240 }

◆ find() [2/2]

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

Definition at line 244 of file NavigationDefaults.h.

245 {
246 type_iterator iEntry = cont.begin();
248 while (iEntry != lastEntry && aChild != *((*iEntry).first)) ++iEntry;
249 return iEntry;
250 }

◆ getChildPar()

template<typename CONT, typename RPAR>
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>
const_child_ptr NavigationDefaults::DefaultChildColl< CONT, RPAR >::getChildPtr ( type_const_iterator thisIter)
inlinestatic

Definition at line 82 of file NavigationDefaults.h.

83 {
85 if ((*thisIter).first.isValid() )
86 thePointer = *((*thisIter).first);
87 return thePointer;
88 }
const CONT::base_value_type * const_child_ptr

◆ getContIndex() [1/2]

template<typename CONT, typename RPAR>
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 {
144 if ( found != cont.end() )
145 {
147 }
148 return false;
149 }
static bool getContIndex(type_const_iterator thisIter, external_index_type &theIndex)

◆ getContIndex() [2/2]

template<typename CONT, typename RPAR>
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 }
static const CONT * getContPtr(type_const_iterator thisIter)

◆ getContPtr() [1/2]

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

Definition at line 120 of file NavigationDefaults.h.

121 {
123 return found != cont.end()
125 : 0;
126 }

◆ getContPtr() [2/2]

template<typename CONT, typename RPAR>
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>
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 }
static const CONT & getContRef(type_const_iterator thisIter)

◆ getContRef() [2/2]

template<typename CONT, typename RPAR>
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>
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>
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 (std::piecewise_construct,
178 }

◆ insert() [2/4]

template<typename CONT, typename RPAR>
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 181 of file NavigationDefaults.h.

186 {
187 if (sizeHint && cont.capacity() < sizeHint)
188 cont.reserve(sizeHint);
189 cont.emplace_back (std::piecewise_construct,
192 }

◆ insert() [3/4]

template<typename CONT, typename RPAR>
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),
164 aPar));
165 }
std::pair< ElementLink< CONT >, RPAR > value_type

◆ insert() [4/4]

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

Definition at line 195 of file NavigationDefaults.h.

199 {
200 if (sizeHint && cont.capacity() < sizeHint)
201 cont.reserve(sizeHint);
202 cont.push_back(value_type(*aLink, aPar));
203 }

◆ remove() [1/2]

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

Definition at line 291 of file NavigationDefaults.h.

292 {
294 if ( found != cont.end() )
295 {
296 // delete (*found).first;
297 cont.erase(found);
298 return true;
299 }
300 else
301 {
302 return false;
303 }
304 }

◆ remove() [2/2]

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

Definition at line 272 of file NavigationDefaults.h.

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

◆ replace()

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

Definition at line 308 of file NavigationDefaults.h.

308 {
309 type_iterator firstEntry = cont.begin();
311 for ( ; firstEntry != lastEntry ; ++firstEntry ) {
312 // Must force replacement with second arg true
313 ((*firstEntry).first).setStorableObject(theNewContainer, true);
314 }
315 return true;
316 }

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