ATLAS Offline Software
Public Types | Public Member Functions | Protected Attributes | List of all members
NavigableVector< CONT, OBJCT > Class Template Reference

#include <NavigableVector.h>

Collaboration diagram for NavigableVector< CONT, OBJCT >:

Public Types

typedef SG::GenerateIndexingPolicy< CONT >::type::index_type external_index_type
 
typedef ElementLink< CONT > data_type
 
typedef std::vector< data_typestore_type
 
typedef store_type::iterator store_iter
 
typedef store_type::const_iterator store_const_iter
 
typedef NavigableVectorIterator< OBJCT, store_typeconst_iterator
 
typedef OBJCT * object_ptr
 
typedef const OBJCT * object_const_ptr
 

Public Member Functions

 NavigableVector ()
 
virtual ~NavigableVector ()=default
 
void addElement (const CONT *aContainer, const OBJCT *anObject)
 
void addElement (const CONT *aContainer, external_index_type anIndex)
 
void addElement (const data_type &aLink)
 
unsigned int size () const
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator find (const OBJCT *anObject) const
 
const OBJCT * operator[] (int i) const
 
const OBJCT * operator[] (size_t i) const
 
const data_typelinkAt (size_t i) const
 
void push_back (data_type &theData)
 

Protected Attributes

store_type m_store
 

Detailed Description

template<typename CONT, typename OBJCT = typename CONT::base_value_type>
class NavigableVector< CONT, OBJCT >

Definition at line 19 of file NavigableVector.h.

Member Typedef Documentation

◆ const_iterator

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
typedef NavigableVectorIterator<OBJCT,store_type> NavigableVector< CONT, OBJCT >::const_iterator

Definition at line 32 of file NavigableVector.h.

◆ data_type

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
typedef ElementLink<CONT> NavigableVector< CONT, OBJCT >::data_type

Definition at line 28 of file NavigableVector.h.

◆ external_index_type

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
typedef SG::GenerateIndexingPolicy<CONT>::type::index_type NavigableVector< CONT, OBJCT >::external_index_type

Definition at line 25 of file NavigableVector.h.

◆ object_const_ptr

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
typedef const OBJCT* NavigableVector< CONT, OBJCT >::object_const_ptr

Definition at line 34 of file NavigableVector.h.

◆ object_ptr

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
typedef OBJCT* NavigableVector< CONT, OBJCT >::object_ptr

Definition at line 33 of file NavigableVector.h.

◆ store_const_iter

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
typedef store_type::const_iterator NavigableVector< CONT, OBJCT >::store_const_iter

Definition at line 31 of file NavigableVector.h.

◆ store_iter

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
typedef store_type::iterator NavigableVector< CONT, OBJCT >::store_iter

Definition at line 30 of file NavigableVector.h.

◆ store_type

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
typedef std::vector<data_type> NavigableVector< CONT, OBJCT >::store_type

Definition at line 29 of file NavigableVector.h.

Constructor & Destructor Documentation

◆ NavigableVector()

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
NavigableVector< CONT, OBJCT >::NavigableVector ( )
inline

Definition at line 36 of file NavigableVector.h.

37  { }

◆ ~NavigableVector()

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
virtual NavigableVector< CONT, OBJCT >::~NavigableVector ( )
virtualdefault

Member Function Documentation

◆ addElement() [1/3]

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
void NavigableVector< CONT, OBJCT >::addElement ( const CONT *  aContainer,
const OBJCT *  anObject 
)
inline

Definition at line 42 of file NavigableVector.h.

43  {
44  data_type aLink;
45  aLink.toContainedElement(*aContainer,(object_ptr)anObject);
46  m_store.push_back(aLink);
47  }

◆ addElement() [2/3]

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
void NavigableVector< CONT, OBJCT >::addElement ( const CONT *  aContainer,
external_index_type  anIndex 
)
inline

Definition at line 49 of file NavigableVector.h.

50  {
51  data_type aLink;
52  aLink.toIndexedElement(*aContainer,anIndex);
53  m_store.push_back(aLink);
54  }

◆ addElement() [3/3]

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
void NavigableVector< CONT, OBJCT >::addElement ( const data_type aLink)
inline

Definition at line 56 of file NavigableVector.h.

57  {
58  m_store.push_back(aLink);
59  }

◆ begin()

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
const_iterator NavigableVector< CONT, OBJCT >::begin ( ) const
inline

Definition at line 64 of file NavigableVector.h.

65  {
66  return const_iterator(m_store).begin();
67  }

◆ end()

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
const_iterator NavigableVector< CONT, OBJCT >::end ( ) const
inline

Definition at line 68 of file NavigableVector.h.

69  {
70  return const_iterator(m_store).end();
71  }

◆ find()

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
const_iterator NavigableVector< CONT, OBJCT >::find ( const OBJCT *  anObject) const
inline

Definition at line 72 of file NavigableVector.h.

73  {
74  return const_iterator(m_store).find(anObject);
75  }

◆ linkAt()

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
const data_type& NavigableVector< CONT, OBJCT >::linkAt ( size_t  i) const
inline

Definition at line 92 of file NavigableVector.h.

93  {
94  if (i < m_store.size())
95  return m_store[i];
96  static const data_type null;
97  return null;
98  }

◆ operator[]() [1/2]

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
const OBJCT* NavigableVector< CONT, OBJCT >::operator[] ( int  i) const
inline

Definition at line 78 of file NavigableVector.h.

79  {
80  return i >= 0 && i < (int)m_store.size()
81  ? *(m_store[i])
82  : 0;
83  }

◆ operator[]() [2/2]

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
const OBJCT* NavigableVector< CONT, OBJCT >::operator[] ( size_t  i) const
inline

Definition at line 84 of file NavigableVector.h.

85  {
86  return i < m_store.size()
87  ? *(m_store[i])
88  : 0;
89  }

◆ push_back()

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
void NavigableVector< CONT, OBJCT >::push_back ( data_type theData)
inline

Definition at line 100 of file NavigableVector.h.

101  {
102  m_store.push_back(theData);
103  }

◆ size()

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
unsigned int NavigableVector< CONT, OBJCT >::size ( ) const
inline

Definition at line 61 of file NavigableVector.h.

61 { return m_store.size(); }

Member Data Documentation

◆ m_store

template<typename CONT , typename OBJCT = typename CONT::base_value_type>
store_type NavigableVector< CONT, OBJCT >::m_store
protected

Definition at line 107 of file NavigableVector.h.


The documentation for this class was generated from the following file:
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
NavigableVector::data_type
ElementLink< CONT > data_type
Definition: NavigableVector.h:28
NavigableVector::object_ptr
OBJCT * object_ptr
Definition: NavigableVector.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
NavigableVector::m_store
store_type m_store
Definition: NavigableVector.h:107
NavigableVector::const_iterator
NavigableVectorIterator< OBJCT, store_type > const_iterator
Definition: NavigableVector.h:32