ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
NavigationToken< CHILD, CHILDPAR, HASH > Class Template Reference

#include <NavigationToken.h>

Inheritance diagram for NavigationToken< CHILD, CHILDPAR, HASH >:
Collaboration diagram for NavigationToken< CHILD, CHILDPAR, HASH >:

Classes

class  NavigationTokenIterator
 

Public Types

typedef const CHILD * const_child_ptr
 
typedef std::unordered_map< const_child_ptr, CHILDPAR, HASH, std::equal_to< const_child_ptr >, SG::ArenaPoolSTLAllocator< std::pair< const const_child_ptr, CHILDPAR > > > tokenStore
 
typedef tokenStore::iterator tokenIterator
 
typedef tokenStore::const_iterator tokenConstIterator
 
typedef CHILDPAR tokenParameter
 
typedef NavigationTokenIterator const_iterator
 

Public Member Functions

 NavigationToken (size_t size_hint=10)
 
 NavigationToken (INavigationSelector< CHILD, CHILDPAR > *thisSelector, size_t size_hint=10, const HASH &hf=HASH())
 
 NavigationToken (INavigationCondition *thisCondition, size_t size_hint=0, const HASH &hf=HASH())
 
 NavigationToken (INavigationSelector< CHILD, CHILDPAR > *thisSelector, INavigationCondition *thisCondition, size_t size_hint=0, const HASH &hf=HASH())
 
virtual ~NavigationToken ()
 
virtual bool pushQuery (const INavigable &parent, const INavigable &child)
 
const tokenStoreobjectMap ()
 
tokenConstIterator firstMappedObject ()
 
tokenConstIterator lastMappedObject ()
 
const_iterator begin () const
 
const_iterator end () const
 
unsigned int size ()
 
CHILDPAR getParameter (const_child_ptr data) const
 
CHILDPAR getParameter (const_iterator &anIter) const
 
void clear ()
 
void reset ()
 
bool contains (const_child_ptr data)
 
void setObject (const_child_ptr data)
 
void setObject (const CHILD &)
 
void setObject (const CHILD &, const CHILDPAR &)
 
void setObject (const_child_ptr data, CHILDPAR weight)
 
virtual bool trySetObject (const INavigable *theObject)
 
virtual bool trySetObject (const INavigable *theObject, const std::any &theWeight)
 
NavigationTokenoperator= (const NavigationToken &anotherToken)
 
NavigationTokenoperator= (NavigationToken &&anotherToken)
 
void dumpStore ()
 

Private Attributes

tokenStore m_data
 
INavigationConditionm_navCondition
 
INavigationSelector< CHILD, CHILDPAR > * m_navSelector
 
const std::type_info * m_lastReject
 

Detailed Description

template<typename CHILD, typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
class NavigationToken< CHILD, CHILDPAR, HASH >

Definition at line 49 of file NavigationToken.h.

Member Typedef Documentation

◆ const_child_ptr

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
typedef const CHILD* NavigationToken< CHILD, CHILDPAR, HASH >::const_child_ptr

Definition at line 54 of file NavigationToken.h.

◆ const_iterator

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
typedef NavigationTokenIterator NavigationToken< CHILD, CHILDPAR, HASH >::const_iterator

Definition at line 153 of file NavigationToken.h.

◆ tokenConstIterator

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
typedef tokenStore::const_iterator NavigationToken< CHILD, CHILDPAR, HASH >::tokenConstIterator

Definition at line 64 of file NavigationToken.h.

◆ tokenIterator

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
typedef tokenStore::iterator NavigationToken< CHILD, CHILDPAR, HASH >::tokenIterator

Definition at line 63 of file NavigationToken.h.

◆ tokenParameter

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
typedef CHILDPAR NavigationToken< CHILD, CHILDPAR, HASH >::tokenParameter

Definition at line 65 of file NavigationToken.h.

◆ tokenStore

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
typedef std::unordered_map<const_child_ptr, CHILDPAR, HASH, std::equal_to<const_child_ptr>, SG::ArenaPoolSTLAllocator< std::pair<const const_child_ptr, CHILDPAR> > > NavigationToken< CHILD, CHILDPAR, HASH >::tokenStore

Definition at line 62 of file NavigationToken.h.

Constructor & Destructor Documentation

◆ NavigationToken() [1/4]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
NavigationToken< CHILD, CHILDPAR, HASH >::NavigationToken ( size_t  size_hint = 10)
inline

Definition at line 160 of file NavigationToken.h.

160  :
161  m_data (size_hint),
162  m_navCondition(0),
163  m_navSelector(0),
164  m_lastReject(0)
165  { };

◆ NavigationToken() [2/4]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
NavigationToken< CHILD, CHILDPAR, HASH >::NavigationToken ( INavigationSelector< CHILD, CHILDPAR > *  thisSelector,
size_t  size_hint = 10,
const HASH hf = HASH() 
)
inline

Definition at line 168 of file NavigationToken.h.

170  :
171  m_data (size_hint, hf),
172  m_navCondition(0),
173  m_navSelector(thisSelector),
174  m_lastReject(0)
175  { };

◆ NavigationToken() [3/4]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
NavigationToken< CHILD, CHILDPAR, HASH >::NavigationToken ( INavigationCondition thisCondition,
size_t  size_hint = 0,
const HASH hf = HASH() 
)
inline

Definition at line 178 of file NavigationToken.h.

180  :
181  m_data (size_hint, hf),
182  m_navCondition(thisCondition),
183  m_navSelector(0),
184  m_lastReject(0)
185  { };

◆ NavigationToken() [4/4]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
NavigationToken< CHILD, CHILDPAR, HASH >::NavigationToken ( INavigationSelector< CHILD, CHILDPAR > *  thisSelector,
INavigationCondition thisCondition,
size_t  size_hint = 0,
const HASH hf = HASH() 
)
inline

Definition at line 188 of file NavigationToken.h.

191  :
192  m_data (size_hint, hf),
193  m_navCondition(thisCondition),
194  m_navSelector(thisSelector),
195  m_lastReject(0)
196  { };

◆ ~NavigationToken()

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
virtual NavigationToken< CHILD, CHILDPAR, HASH >::~NavigationToken ( )
inlinevirtual

Definition at line 199 of file NavigationToken.h.

200  { };

Member Function Documentation

◆ begin()

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
const_iterator NavigationToken< CHILD, CHILDPAR, HASH >::begin ( ) const
inline

Definition at line 229 of file NavigationToken.h.

229 { return NavigationTokenIterator(m_data).begin(); }

◆ clear()

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
void NavigationToken< CHILD, CHILDPAR, HASH >::clear ( )

◆ contains()

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
bool NavigationToken< CHILD, CHILDPAR, HASH >::contains ( const_child_ptr  data)
inline

Definition at line 242 of file NavigationToken.h.

243  {
244  return ( m_data.find(data) != m_data.end() );
245  }

◆ dumpStore()

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
void NavigationToken< CHILD, CHILDPAR, HASH >::dumpStore ( )

◆ end()

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
const_iterator NavigationToken< CHILD, CHILDPAR, HASH >::end ( ) const
inline

Definition at line 230 of file NavigationToken.h.

230 { return NavigationTokenIterator(m_data).end(); }

◆ firstMappedObject()

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
tokenConstIterator NavigationToken< CHILD, CHILDPAR, HASH >::firstMappedObject ( )
inline

Definition at line 225 of file NavigationToken.h.

225 { return m_data.begin(); };

◆ getParameter() [1/2]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
CHILDPAR NavigationToken< CHILD, CHILDPAR, HASH >::getParameter ( const_child_ptr  data) const

◆ getParameter() [2/2]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
CHILDPAR NavigationToken< CHILD, CHILDPAR, HASH >::getParameter ( const_iterator anIter) const

◆ lastMappedObject()

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
tokenConstIterator NavigationToken< CHILD, CHILDPAR, HASH >::lastMappedObject ( )
inline

Definition at line 226 of file NavigationToken.h.

226 { return m_data.end(); };

◆ objectMap()

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
const tokenStore& NavigationToken< CHILD, CHILDPAR, HASH >::objectMap ( )
inline

Definition at line 215 of file NavigationToken.h.

215 { return m_data; };

◆ operator=() [1/2]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
NavigationToken& NavigationToken< CHILD, CHILDPAR, HASH >::operator= ( const NavigationToken< CHILD, CHILDPAR, HASH > &  anotherToken)
inline

Definition at line 275 of file NavigationToken.h.

276  {
277  if ( this != &anotherToken && anotherToken.m_data != 0 )
278  {
279  m_data = anotherToken.m_data;
280  m_navCondition = anotherToken.m_navCondition;
281  m_navSelector = anotherToken.m_navSelector;
282  m_lastReject = anotherToken.m_lastReject;
283  }
284  return *this;
285  }

◆ operator=() [2/2]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
NavigationToken& NavigationToken< CHILD, CHILDPAR, HASH >::operator= ( NavigationToken< CHILD, CHILDPAR, HASH > &&  anotherToken)
inline

Definition at line 288 of file NavigationToken.h.

289  {
290  if ( this != &anotherToken && anotherToken.m_data != 0 )
291  {
292  m_data = std::move (anotherToken.m_data);
293  m_navCondition = anotherToken.m_navCondition;
294  m_navSelector = anotherToken.m_navSelector;
295  m_lastReject = anotherToken.m_lastReject;
296  }
297  return *this;
298  }

◆ pushQuery()

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
virtual bool NavigationToken< CHILD, CHILDPAR, HASH >::pushQuery ( const INavigable parent,
const INavigable child 
)
virtual

Implements INavigationToken.

◆ reset()

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
void NavigationToken< CHILD, CHILDPAR, HASH >::reset ( )
inline

Definition at line 239 of file NavigationToken.h.

239 { this->clear(); }

◆ setObject() [1/4]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
void NavigationToken< CHILD, CHILDPAR, HASH >::setObject ( const CHILD &  )
inline

Definition at line 257 of file NavigationToken.h.

257 { };

◆ setObject() [2/4]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
void NavigationToken< CHILD, CHILDPAR, HASH >::setObject ( const CHILD &  ,
const CHILDPAR &   
)
inline

Definition at line 258 of file NavigationToken.h.

258 { };

◆ setObject() [3/4]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
void NavigationToken< CHILD, CHILDPAR, HASH >::setObject ( const_child_ptr  data)
inline

Definition at line 252 of file NavigationToken.h.

253  {
254  this->setObject( data, CHILDPAR() );
255  }

◆ setObject() [4/4]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
void NavigationToken< CHILD, CHILDPAR, HASH >::setObject ( const_child_ptr  data,
CHILDPAR  weight 
)

◆ size()

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
unsigned int NavigationToken< CHILD, CHILDPAR, HASH >::size ( )
inline

Definition at line 231 of file NavigationToken.h.

231 { return m_data.size(); }

◆ trySetObject() [1/2]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
virtual bool NavigationToken< CHILD, CHILDPAR, HASH >::trySetObject ( const INavigable theObject)
virtual

Implements INavigationToken.

◆ trySetObject() [2/2]

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
virtual bool NavigationToken< CHILD, CHILDPAR, HASH >::trySetObject ( const INavigable theObject,
const std::any &  theWeight 
)
virtual

Implements INavigationToken.

Member Data Documentation

◆ m_data

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
tokenStore NavigationToken< CHILD, CHILDPAR, HASH >::m_data
private

Definition at line 305 of file NavigationToken.h.

◆ m_lastReject

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
const std::type_info* NavigationToken< CHILD, CHILDPAR, HASH >::m_lastReject
private

Definition at line 312 of file NavigationToken.h.

◆ m_navCondition

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
INavigationCondition* NavigationToken< CHILD, CHILDPAR, HASH >::m_navCondition
private

Definition at line 308 of file NavigationToken.h.

◆ m_navSelector

template<typename CHILD , typename CHILDPAR = NavigationDefaults::DefaultWeight, typename HASH = NavigationTokenHash<CHILD>>
INavigationSelector<CHILD,CHILDPAR>* NavigationToken< CHILD, CHILDPAR, HASH >::m_navSelector
private

Definition at line 309 of file NavigationToken.h.


The documentation for this class was generated from the following file:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
NavigationToken::setObject
void setObject(const_child_ptr data)
Definition: NavigationToken.h:252
NavigationToken::m_data
tokenStore m_data
Definition: NavigationToken.h:305
NavigationToken::m_navSelector
INavigationSelector< CHILD, CHILDPAR > * m_navSelector
Definition: NavigationToken.h:309
NavigationToken::m_navCondition
INavigationCondition * m_navCondition
Definition: NavigationToken.h:308
NavigationToken::m_lastReject
const std::type_info * m_lastReject
Definition: NavigationToken.h:312
NavigationToken::clear
void clear()