ATLAS Offline Software
TokenIterator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef PERSISTENCYSVC_TOKENITERATOR_H
6 #define PERSISTENCYSVC_TOKENITERATOR_H
7 
11 #include "GaudiKernel/implements.h"
12 
13 #include <string>
14 
15 namespace pool {
16 
17  // forward declarations
18  class FileDescriptor;
19  class IStorageExplorer;
20  class DbSelect;
21 
22  namespace PersistencySvc {
23 
30  class TokenIterator : virtual public ITokenIterator,
31  virtual public IPositionSeek,
32  virtual public implements<ICollectionSize>
33  {
34  public:
38  TokenIterator( FileDescriptor& fileDescriptor,
39  const std::string& containerName,
40  IStorageExplorer& storageExplorer,
41  const std::string& selection );
44 
45  TokenIterator( const TokenIterator& ) = delete;
46  TokenIterator& operator=( const TokenIterator& ) = delete;
47 
53  Token* next();
54 
60  virtual bool seek (long long int position);
61 
65  virtual int size ();
66 
67  private:
72  };
73  }
74 }
75 
76 #endif
pool
pool namespace
Definition: libname.h:15
ICollectionSize.h
Abstract interface for finding the size of an event collection.
pool::FileDescriptor
Definition: FileDescriptor.h:41
pool::IStorageExplorer
Definition: IStorageExplorer.h:53
pool::PersistencySvc::TokenIterator::operator=
TokenIterator & operator=(const TokenIterator &)=delete
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition: Token.h:21
pool::PersistencySvc::TokenIterator::m_storageExplorer
IStorageExplorer & m_storageExplorer
Reference to the storage explorer.
Definition: TokenIterator.h:69
pool::PersistencySvc::TokenIterator::~TokenIterator
~TokenIterator()
Destructor.
pool::DbSelect
Definition: DbSelect.h:44
IPositionSeek.h
Abstract interface for seeking within an event stream.
selection
std::string selection
Definition: fbtTestBasics.cxx:75
pool::PersistencySvc::TokenIterator::next
Token * next()
Returns the pointer to next token.
pool::PersistencySvc::TokenIterator::TokenIterator
TokenIterator(FileDescriptor &fileDescriptor, const std::string &containerName, IStorageExplorer &storageExplorer, const std::string &selection)
Constructor taking as argument a DbSelection object, the file descriptor, the container name and the ...
pool::ITokenIterator
Definition: ITokenIterator.h:20
pool::PersistencySvc::TokenIterator::m_selection
DbSelect * m_selection
Selection object.
Definition: TokenIterator.h:71
pool::PersistencySvc::TokenIterator::TokenIterator
TokenIterator(const TokenIterator &)=delete
pool::PersistencySvc::TokenIterator::size
virtual int size()
Return the size of the collection.
pool::PersistencySvc::TokenIterator
Definition: TokenIterator.h:33
ITokenIterator.h
pool::IPositionSeek
Abstract interface for seeking inside a collection.
Definition: IPositionSeek.h:26
pool::PersistencySvc::TokenIterator::seek
virtual bool seek(long long int position)
Seek to a given position in the collection.