ATLAS Offline Software
Loading...
Searching...
No Matches
A/AthLinks/ElementLinkBase.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2/*
3 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4 */
5#ifndef ATHLINKS_ELEMENTLINKBASE_H
6#define ATHLINKS_ELEMENTLINKBASE_H
7
8// System include(s):
9extern "C" {
10# include <stdint.h>
11}
12
24class ElementLinkBase {
25private:
27 static constexpr uint32_t INVALID = static_cast<uint32_t> (-1);
28public:
30 ElementLinkBase( uint32_t key = 0, uint32_t index = INVALID );
32 virtual ~ElementLinkBase() {}
33
35 uint32_t persKey() const;
37 void setPersKey( uint32_t key );
38
40 uint32_t persIndex() const;
42 void setPersIndex( uint32_t index );
43
45 virtual bool toTransient() = 0;
46
52 bool isDefault() const;
53
54protected:
56 uint32_t m_persKey;
58 uint32_t m_persIndex;
59
69
70}; // class ElementLinkBase
71
72#endif // ATHLINKS_ELEMENTLINKBASE_H
Base class for ElementLinks to vectors of pointers.
bool isDefault() const
Is the link in the default state.
bool m_isDirectIO
A transient variable signalling when direct I/O is happening.
uint32_t persIndex() const
Get the index of the referenced object in the container.
sgkey_t key() const
Return the SG key that we reference, as a hash.
stored_index_type m_persIndex
The index of the element within the container for this link.
uint32_t persKey() const
Get the key/identifier of the referenced container.
ElementLinkBase()
Default constructor.
static const uint32_t INVALID
Value to mark an invalid index.
void setPersIndex(uint32_t index)
Set the index of the referenced object in the container.
SG::sgkey_t m_persKey
The hashed key for this link.
virtual bool toTransient()=0
Reset the object's internal cache.
void setPersKey(uint32_t key)
Set the key/identifier of the referenced container.
virtual ~ElementLinkBase()
Destructor.
Definition index.py:1