ATLAS Offline Software
TokenIterator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef PERSISTENCYSVC_TOKENITERATOR_H
6 #define PERSISTENCYSVC_TOKENITERATOR_H
7 
11 #include <string>
12 
13 namespace pool {
14 
15  // forward declarations
16  class FileDescriptor;
17  class IStorageExplorer;
18  class DbSelect;
19 
20  namespace PersistencySvc {
21 
28  class TokenIterator : virtual public ITokenIterator,
29  virtual public IPositionSeek,
30  virtual public ICollectionSize
31  {
32  public:
36  TokenIterator( FileDescriptor& fileDescriptor,
37  const std::string& containerName,
38  IStorageExplorer& storageExplorer,
39  const std::string& selection );
42 
43  TokenIterator( const TokenIterator& ) = delete;
44  TokenIterator& operator=( const TokenIterator& ) = delete;
45 
51  Token* next();
52 
58  virtual bool seek (long long int position);
59 
63  virtual int size ();
64 
65  private:
70  };
71  }
72 }
73 
74 #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:67
pool::PersistencySvc::TokenIterator::~TokenIterator
~TokenIterator()
Destructor.
pool::DbSelect
Definition: DbSelect.h:44
IPositionSeek.h
Abstract interface for seeking within an event stream.
ICollectionSize
Abstract interface for finding the size of an event collection.
Definition: ICollectionSize.h:31
selection
std::string selection
Definition: fbtTestBasics.cxx:73
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:69
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:31
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.