The Gaudi Framework
master (57817a18)
Toggle main menu visibility
Loading...
Searching...
No Matches
ObjectContainerBase.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2025 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
#pragma once
12
13
#include <
GaudiKernel/DataObject.h
>
14
#include <
GaudiKernel/Kernel.h
>
15
16
class
ContainedObject
;
17
26
class
GAUDI_API
ObjectContainerBase
:
public
DataObject
{
27
28
protected
:
30
ObjectContainerBase
() =
default
;
31
ObjectContainerBase
(
ObjectContainerBase
&& ) =
default
;
32
ObjectContainerBase
&
operator=
(
ObjectContainerBase
&& ) =
default
;
33
~ObjectContainerBase
()
override
=
default
;
34
35
public
:
37
typedef
size_t
size_type
;
38
40
virtual
long
index
(
const
ContainedObject
* obj )
const
= 0;
41
43
virtual
const
ContainedObject
*
containedObject
(
long
dist )
const
= 0;
44
virtual
ContainedObject
*
containedObject
(
long
dist ) = 0;
45
47
virtual
size_type
numberOfObjects
()
const
= 0;
48
52
virtual
long
add
(
ContainedObject
* pObject ) = 0;
53
57
virtual
long
remove
(
ContainedObject
* value ) = 0;
58
};
DataObject.h
Kernel.h
GAUDI_API
#define GAUDI_API
Definition
Kernel.h:49
ContainedObject
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
Definition
ContainedObject.h:37
DataObject::DataObject
DataObject()
Standard Constructor.
Definition
DataObject.cpp:23
ObjectContainerBase::numberOfObjects
virtual size_type numberOfObjects() const =0
Number of objects in the container.
ObjectContainerBase::~ObjectContainerBase
~ObjectContainerBase() override=default
ObjectContainerBase::containedObject
virtual ContainedObject * containedObject(long dist)=0
ObjectContainerBase::ObjectContainerBase
ObjectContainerBase()=default
Constructor.
ObjectContainerBase::index
virtual long index(const ContainedObject *obj) const =0
Distance of a given object from the beginning of its container.
ObjectContainerBase::remove
virtual long remove(ContainedObject *value)=0
Release object from the container (the pointer will be removed from the container,...
ObjectContainerBase::size_type
size_t size_type
size_type, to conform the STL container interface
Definition
ObjectContainerBase.h:37
ObjectContainerBase::add
virtual long add(ContainedObject *pObject)=0
Virtual functions (forwards to the concrete container definitions) Add an object to the container.
ObjectContainerBase::ObjectContainerBase
ObjectContainerBase(ObjectContainerBase &&)=default
ObjectContainerBase::containedObject
virtual const ContainedObject * containedObject(long dist) const =0
Pointer to an object of a given distance.
ObjectContainerBase::operator=
ObjectContainerBase & operator=(ObjectContainerBase &&)=default
GaudiKernel
include
GaudiKernel
ObjectContainerBase.h
Generated on
for The Gaudi Framework by
1.17.0