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

#include <NavigationDefaults.h>

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

Public Types

typedef ElementLink< CONT > 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 iter)
 
static DefaultWeight getChildPar (type_const_iterator)
 
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 DefaultWeight &, size_t sizeHint=0)
 
static void insert (type &cont, const CONT *aChildContainer, const external_index_type &anIndex, const DefaultWeight &, size_t sizeHint=0)
 
static void insert (type &cont, const ElementLink< CONT > *aLink, const DefaultWeight &, size_t sizeHint=0)
 
static void changeParm (type &, const_child_ptr, const DefaultWeight &)
 
static void changeParm (type &, const CONT *, const external_index_type &, const DefaultWeight &)
 
static void changeParm (type_iterator &, const DefaultWeight &)
 
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 > *anElement)
 
static bool replace (type &cont, const CONT &theNewContainer)
 
static bool contains (const type &cont, const_child_ptr aChild)
 

Detailed Description

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

Definition at line 328 of file NavigationDefaults.h.

Member Typedef Documentation

◆ child_ptr

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

Definition at line 336 of file NavigationDefaults.h.

◆ const_child_ptr

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

Definition at line 337 of file NavigationDefaults.h.

◆ external_index_type

Definition at line 341 of file NavigationDefaults.h.

◆ type

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

Definition at line 333 of file NavigationDefaults.h.

◆ type_const_iterator

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

Definition at line 335 of file NavigationDefaults.h.

◆ type_iterator

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

Definition at line 334 of file NavigationDefaults.h.

◆ value_type

template<typename CONT >
typedef ElementLink<CONT> NavigationDefaults::DefaultChildColl< CONT, DefaultWeight >::value_type

Definition at line 332 of file NavigationDefaults.h.

Member Function Documentation

◆ changeParm() [1/3]

template<typename CONT >
static void NavigationDefaults::DefaultChildColl< CONT, DefaultWeight >::changeParm ( type ,
const CONT *  ,
const external_index_type ,
const DefaultWeight  
)
inlinestatic

Definition at line 454 of file NavigationDefaults.h.

458  { }

◆ changeParm() [2/3]

template<typename CONT >
static void NavigationDefaults::DefaultChildColl< CONT, DefaultWeight >::changeParm ( type ,
const_child_ptr  ,
const DefaultWeight  
)
inlinestatic

Definition at line 448 of file NavigationDefaults.h.

451  { }

◆ changeParm() [3/3]

template<typename CONT >
static void NavigationDefaults::DefaultChildColl< CONT, DefaultWeight >::changeParm ( type_iterator ,
const DefaultWeight  
)
inlinestatic

Definition at line 461 of file NavigationDefaults.h.

463  { }

◆ contains()

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

Definition at line 551 of file NavigationDefaults.h.

552  {
553  return find(cont,aChild) != cont.end();
554  }

◆ find() [1/2]

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

Definition at line 466 of file NavigationDefaults.h.

468  {
469  type_const_iterator firstEntry = cont.begin();
470  type_const_iterator lastEntry = cont.end();
471  for ( ; firstEntry != lastEntry; ++firstEntry )
472  {
473  if ( *(*firstEntry) == aChild ) break;
474  }
475  return firstEntry;
476  }

◆ find() [2/2]

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

Definition at line 479 of file NavigationDefaults.h.

480  {
481  type_iterator firstEntry = cont.begin();
482  type_iterator lastEntry = cont.end();
483  for ( ; firstEntry != lastEntry; ++firstEntry )
484  {
485  if ( *(*firstEntry) == aChild ) break;
486  }
487  return firstEntry;
488  }

◆ getChildPar()

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

Definition at line 353 of file NavigationDefaults.h.

354  { return DefaultWeight(); }

◆ getChildPtr()

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

Definition at line 344 of file NavigationDefaults.h.

345  {
346  const_child_ptr ret = 0;
347  if ((*iter).isValid())
348  ret = *(*iter);
349  return ret;
350  }

◆ getContIndex() [1/2]

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

Definition at line 402 of file NavigationDefaults.h.

404  {
405  type_const_iterator found = find(cont,aChild);
406  if ( found != cont.end() )
407  {
408  return getContIndex(found,theIndex);
409  }
410  return false;
411  }

◆ getContIndex() [2/2]

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

Definition at line 392 of file NavigationDefaults.h.

394  {
395  theIndex = (*thisIter).index();
396  const CONT* cont = getContPtr(thisIter);
397  return cont ? theIndex < cont->size() : false;
398  }

◆ getContPtr() [1/2]

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

Definition at line 382 of file NavigationDefaults.h.

383  {
384  type_const_iterator found = find(cont,aChild);
385  return found != cont.end()
386  ? getContPtr(found)
387  : 0;
388  }

◆ getContPtr() [2/2]

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

Definition at line 376 of file NavigationDefaults.h.

377  {
378  return (*thisIter).getStorableObjectPointer();
379  }

◆ getContRef() [1/2]

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

Definition at line 370 of file NavigationDefaults.h.

371  {
372  return getContRef(find(cont,aChild));
373  }

◆ getContRef() [2/2]

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

Definition at line 364 of file NavigationDefaults.h.

365  {
366  return (*thisIter).getStorableObjectRef();
367  }

◆ getElementPtr()

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

Definition at line 357 of file NavigationDefaults.h.

359  {
360  return &(*thisIter);
361  }

◆ insert() [1/3]

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

Definition at line 427 of file NavigationDefaults.h.

431  {
432  if (sizeHint && cont.capacity() < sizeHint)
433  cont.reserve(sizeHint);
434  cont.push_back(ElementLink<CONT>(*aChildContainer,anIndex));
435  }

◆ insert() [2/3]

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

Definition at line 414 of file NavigationDefaults.h.

418  {
419  if (sizeHint && cont.capacity() < sizeHint)
420  cont.reserve(sizeHint);
421  // cast is an ugly fix!
422  cont.push_back(ElementLink<CONT>(const_cast<child_ptr>(aChild),
423  *aChildContainer));
424  }

◆ insert() [3/3]

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

Definition at line 438 of file NavigationDefaults.h.

441  {
442  if (sizeHint && cont.capacity() < sizeHint)
443  cont.reserve(sizeHint);
444  cont.push_back(*aLink);
445  }

◆ remove() [1/2]

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

Definition at line 522 of file NavigationDefaults.h.

523  {
524  type_iterator found = find(cont,*anElement);
525  if ( found != cont.end() )
526  {
527  // delete *found;
528  cont.erase(anElement);
529  return true;
530  }
531  else
532  {
533  return false;
534  }
535  }

◆ remove() [2/2]

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

Definition at line 505 of file NavigationDefaults.h.

506  {
507  type_iterator found = find(cont,aChild);
508  if ( found != cont.end() )
509  {
510  // ownership of ElementLink!! FIXME
511  // delete *found;
512  cont.erase(found);
513  return true;
514  }
515  else
516  {
517  return false;
518  }
519  }

◆ replace()

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

Definition at line 539 of file NavigationDefaults.h.

539  {
540  type_iterator firstEntry = cont.begin();
541  type_iterator lastEntry = cont.end();
542  for ( ; firstEntry != lastEntry ; ++firstEntry ) {
543  // Must force replacement with second arg true
544  (*firstEntry).setStorableObject(theNewContainer, true);
545  }
546  return true;
547  }

The documentation for this struct was generated from the following file:
NavigationDefaults::DefaultChildColl< CONT, DefaultWeight >::const_child_ptr
const CONT::base_value_type * const_child_ptr
Definition: NavigationDefaults.h:337
NavigationDefaults::DefaultChildColl< CONT, DefaultWeight >::type_const_iterator
type::const_iterator type_const_iterator
Definition: NavigationDefaults.h:335
NavigationDefaults::DefaultChildColl< CONT, DefaultWeight >::child_ptr
CONT::base_value_type * child_ptr
Definition: NavigationDefaults.h:336
NavigationDefaults::DefaultChildColl< CONT, DefaultWeight >::getContIndex
static bool getContIndex(type_const_iterator thisIter, external_index_type &theIndex)
Definition: NavigationDefaults.h:392
NavigationDefaults::DefaultChildColl< CONT, DefaultWeight >::getContPtr
static const CONT * getContPtr(type_const_iterator thisIter)
Definition: NavigationDefaults.h:376
ret
T ret(T t)
Definition: rootspy.cxx:260
NavigationDefaults::DefaultChildColl< CONT, DefaultWeight >::type_iterator
type::iterator type_iterator
Definition: NavigationDefaults.h:334
NavigationDefaults::DefaultChildColl< CONT, DefaultWeight >::find
static type_const_iterator find(const type &cont, const_child_ptr aChild)
Definition: NavigationDefaults.h:466
NavigationDefaults::DefaultChildColl< CONT, DefaultWeight >::getContRef
static const CONT & getContRef(type_const_iterator thisIter)
Definition: NavigationDefaults.h:364
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101