| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Containers::KeyedObjectManager< SETUP > Class Template Reference

KeyedObjectManager Class to manage keyed objects. More...

#include <KeyedObjectManager.h>

Collaboration diagram for Containers::KeyedObjectManager< SETUP >:

[legend]
List of all members.

Public Member Functions

 KeyedObjectManager ()
 Standard Constructor.
virtual ~KeyedObjectManager ()
 Standard Destructor.
void clearDirect ()
 Clear all direct access fields.
long insertDirect (ObjectContainerBase *b, ContainedObject *c, void *o, long k)
 Insert element into direct access map.
long isDirect () const
 Check if the container is dirty.
void * object (long key) const
 Retrieve object identified by a key from the container.
long insert (ObjectContainerBase *b, ContainedObject *c, void *o, long *k)
 Insert new object into container.
long insert (ObjectContainerBase *b, ContainedObject *c, void *o, long k)
 Insert new object into container.
void * erase (long key, const void *obj)
 Remove object from container (very inefficient if key is invalid).
long erase (seq_type::iterator beg, seq_type::iterator end)
 Remove object by sequential iterators.
void reserve (long size)
 Reserve buffer space.
void clear ()
 Clear content of the vector.
void setup (void *seq, void **rndm)
 Setup of the Map and the parent object.

Static Public Member Functions

static CLID classID ()
 Access CLID for this type of container.

Private Types

typedef std::vector< void * > seq_type

Private Member Functions

void onDirty () const
 Callbck when the container becomes dirty.

Private Attributes

seq_typem_seq
 Container holding array like container.
long m_direct
 Dirty flag.
long m_keyCtxt
union {
   char   buffer [128]
 Buffer space to hold keyed container.
   SETUP *   s
m_setup

Detailed Description

template<class SETUP>
class Containers::KeyedObjectManager< SETUP >

KeyedObjectManager Class to manage keyed objects.

This class is instantiated for two container types: map and hashmap. Other typeas are possible, but currently not supported. Other implementations may be achieved by specializing the SETUP class.

As an example below the specialization for a vector like implementation is shown.

Author:
M.Frank CERN/LHCb
Version:
1.0

Definition at line 46 of file KeyedObjectManager.h.


Member Typedef Documentation

template<class SETUP>
typedef std::vector<void*> Containers::KeyedObjectManager< SETUP >::seq_type [private]

Definition at line 48 of file KeyedObjectManager.h.


Constructor & Destructor Documentation

template<class SETUP>
Containers::KeyedObjectManager< SETUP >::KeyedObjectManager (  ) 

Standard Constructor.

template<class SETUP>
virtual Containers::KeyedObjectManager< SETUP >::~KeyedObjectManager (  )  [virtual]

Standard Destructor.


Member Function Documentation

template<class SETUP>
void Containers::KeyedObjectManager< SETUP >::onDirty (  )  const [private]

Callbck when the container becomes dirty.

template<class SETUP>
void Containers::KeyedObjectManager< SETUP >::clearDirect (  ) 

Clear all direct access fields.

template<class SETUP>
long Containers::KeyedObjectManager< SETUP >::insertDirect ( ObjectContainerBase b,
ContainedObject c,
void *  o,
long  k 
)

Insert element into direct access map.

template<class SETUP>
long Containers::KeyedObjectManager< SETUP >::isDirect (  )  const [inline]

Check if the container is dirty.

Definition at line 73 of file KeyedObjectManager.h.

00073 {      return m_direct;    }

template<class SETUP>
void* Containers::KeyedObjectManager< SETUP >::object ( long  key  )  const

Retrieve object identified by a key from the container.

template<class SETUP>
long Containers::KeyedObjectManager< SETUP >::insert ( ObjectContainerBase b,
ContainedObject c,
void *  o,
long *  k 
)

Insert new object into container.

template<class SETUP>
long Containers::KeyedObjectManager< SETUP >::insert ( ObjectContainerBase b,
ContainedObject c,
void *  o,
long  k 
)

Insert new object into container.

template<class SETUP>
void* Containers::KeyedObjectManager< SETUP >::erase ( long  key,
const void *  obj 
)

Remove object from container (very inefficient if key is invalid).

template<class SETUP>
long Containers::KeyedObjectManager< SETUP >::erase ( seq_type::iterator  beg,
seq_type::iterator  end 
)

Remove object by sequential iterators.

template<class SETUP>
void Containers::KeyedObjectManager< SETUP >::reserve ( long  size  ) 

Reserve buffer space.

template<class SETUP>
void Containers::KeyedObjectManager< SETUP >::clear (  ) 

Clear content of the vector.

template<class SETUP>
void Containers::KeyedObjectManager< SETUP >::setup ( void *  seq,
void **  rndm 
)

Setup of the Map and the parent object.

template<class SETUP>
static CLID Containers::KeyedObjectManager< SETUP >::classID (  )  [static]

Access CLID for this type of container.


Member Data Documentation

template<class SETUP>
seq_type* Containers::KeyedObjectManager< SETUP >::m_seq [private]

Container holding array like container.

Definition at line 50 of file KeyedObjectManager.h.

template<class SETUP>
long Containers::KeyedObjectManager< SETUP >::m_direct [mutable, private]

Dirty flag.

Definition at line 52 of file KeyedObjectManager.h.

template<class SETUP>
long Containers::KeyedObjectManager< SETUP >::m_keyCtxt [mutable, private]

Definition at line 53 of file KeyedObjectManager.h.

template<class SETUP>
char Containers::KeyedObjectManager< SETUP >::buffer[128] [private]

Buffer space to hold keyed container.

Definition at line 56 of file KeyedObjectManager.h.

template<class SETUP>
SETUP* Containers::KeyedObjectManager< SETUP >::s [private]

Definition at line 57 of file KeyedObjectManager.h.

union { ... } Containers::KeyedObjectManager< SETUP >::m_setup [private]


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:57:16 2011 for GaudiKernel by doxygen 1.4.7