Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v28r2p1 (f1a77ff4)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
KeyedObjectManager.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_KEYEDOBJECTMANAGER_H
2 #define GAUDIKERNEL_KEYEDOBJECTMANAGER_H
3 
4 // Framework include files
5 #include "GaudiKernel/Kernel.h"
6 #include "GaudiKernel/ClassID.h"
8 
9 // STL includes
10 #include <vector>
11 
12 // Forward declarations
14 class ContainedObject;
15 
18 namespace Containers {
19 
21  typedef long (*MANIPULATOR)(void*);
25  struct GAUDI_API map;
27  struct GAUDI_API array;
29  struct GAUDI_API vector;
30 
44  template <class SETUP>
46  private:
49  seq_type* m_seq;
51  mutable long m_direct;
52  mutable long m_keyCtxt;
53  union {
55  char buffer[128];
56  SETUP* s;
57  } m_setup;
58 
60  void onDirty() const;
61 
62  public:
67  virtual ~KeyedObjectManager();
69  void clearDirect();
71  long insertDirect(ObjectContainerBase* b,ContainedObject* c,void* o, long k);
73  long isDirect() const { return m_direct; }
75  void* object(long key) const;
77  long insert(ObjectContainerBase* b,ContainedObject* c,void* o, long* k);
79  long insert(ObjectContainerBase* b,ContainedObject* c,void* o,long k);
81  void* erase(long key, const void* obj);
83  long erase(seq_type::iterator beg, seq_type::iterator end);
85  void reserve(long size);
87  void clear();
89  void setup(void* seq, void** rndm);
91  static CLID classID();
92  };
93 
102 }
103 #endif // GAUDIKERNEL_KEYEDOBJECTMANAGER_H
KeyedObjectManager< array > Array
Forward declaration of specialized redirection array object manager.
constexpr struct Gaudi::Functional::details::insert_t insert
KeyedObjectManager< vector > Vector
Forward declaration of specialized std::vector-like object manager.
Containers namespace.
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:50
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
std::vector< void * > seq_type
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
KeyedObjectManager< hashmap > HashMap
Forward declaration of specialized std::hashmap-like object manager.
KeyedObjectManager Class to manage keyed objects.
long(* MANIPULATOR)(void *)
Object manipulator type definition.
long isDirect() const
Check if the container is dirty.
ObjectContainerBase is the base class for Gaudi container classes.
#define GAUDI_API
Definition: Kernel.h:107
KeyedObjectManager< map > Map
Forward declaration of specialized std::map-like object manager.
seq_type * m_seq
Container holding array like container.