ATLAS Offline Software
Loading...
Searching...
No Matches
IStringPool.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
13
14
15#ifndef ATHENAKERNEL_ISTRINGPOOL_H
16#define ATHENAKERNEL_ISTRINGPOOL_H
17
18
19#include "SGCore/sgkey_t.h"
20#include "GaudiKernel/ClassID.h"
21#include <string>
22
23
28{
29public:
31 virtual ~IStringPool() {}
32
35
36
45 virtual
46 sgkey_t stringToKey (const std::string& str, CLID clid) = 0;
47
55 virtual
56 const std::string* keyToString (sgkey_t key) const = 0;
57
66 virtual
67 const std::string* keyToString (sgkey_t key,
68 CLID& clid) const = 0;
69
82 virtual
84 const std::string& str,
85 CLID clid) = 0;
86};
87
88
89#endif // not ATHENAKERNEL_ISTRINGPOOL_H
uint32_t CLID
The Class ID type.
Abstract interface for looking up strings/CLIDs in a pool.
Definition IStringPool.h:28
virtual sgkey_t stringToKey(const std::string &str, CLID clid)=0
Find the key for a string/CLID pair.
virtual const std::string * keyToString(sgkey_t key) const =0
Find the string corresponding to a given key.
virtual void registerKey(sgkey_t key, const std::string &str, CLID clid)=0
Remember an additional mapping from key to string/CLID.
SG::sgkey_t sgkey_t
Type of the keys.
Definition IStringPool.h:34
virtual const std::string * keyToString(sgkey_t key, CLID &clid) const =0
Find the string and CLID corresponding to a given key.
virtual ~IStringPool()
Destructor.
Definition IStringPool.h:31
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition sgkey_t.h:32