The Gaudi Framework  v33r1 (b1225454)
ObjectContainerBase.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDI_OBJECTCONTAINERBASE_H
12 #define GAUDI_OBJECTCONTAINERBASE_H 1
13 
14 // Include files
15 #include "GaudiKernel/DataObject.h"
16 #include "GaudiKernel/Kernel.h"
17 
18 // Forward declarations
19 class ContainedObject;
20 
30 
31 protected:
33  ObjectContainerBase() = default;
36  ~ObjectContainerBase() override = default;
37 
38 public:
40  typedef size_t size_type;
41 
43  virtual long index( const ContainedObject* obj ) const = 0;
44 
46  virtual const ContainedObject* containedObject( long dist ) const = 0;
47  virtual ContainedObject* containedObject( long dist ) = 0;
48 
50  virtual size_type numberOfObjects() const = 0;
51 
55  virtual long add( ContainedObject* pObject ) = 0;
56 
60  virtual long remove( ContainedObject* value ) = 0;
61 };
62 
63 #endif // GAUDI_OBJECTCONTAINERBASE_H
size_t size_type
size_type, to conform the STL container interface
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
DataObject & operator=(const DataObject &rhs)
Assignment Operator.
Definition: DataObject.cpp:29
ObjectContainerBase is the base class for Gaudi container classes.
#define GAUDI_API
Definition: Kernel.h:81
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:40