DP3
BlobIBufStream.h
Go to the documentation of this file.
1 // BlobIBufStream.h: Input buffer for a blob using an istream
2 //
3 // Copyright (C) 2020 ASTRON (Netherlands Institute for Radio Astronomy)
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 
6 #ifndef LOFAR_BLOB_BLOBIBUFSTREAM_H
7 #define LOFAR_BLOB_BLOBIBUFSTREAM_H
8 
9 #include "BlobIBuffer.h"
10 
11 #include <iosfwd>
12 
13 namespace dp3 {
14 namespace blob {
15 
18 
20 
24 
25 class BlobIBufStream : public BlobIBuffer {
26  public:
28  explicit BlobIBufStream(std::istream&);
29 
31  virtual ~BlobIBufStream();
32 
34  virtual uint64_t get(void* buffer, uint64_t nbytes);
35 
38  virtual int64_t tellPos() const;
39 
42  virtual int64_t setPos(int64_t pos);
43 
44  private:
45  std::streambuf* itsStream;
46 };
47 
49 
50 } // namespace blob
51 } // namespace dp3
52 
53 #endif
Input buffer for a blob using an istream.
Definition: BlobIBufStream.h:25
virtual int64_t tellPos() const
virtual uint64_t get(void *buffer, uint64_t nbytes)
Get the requested nr of bytes.
virtual int64_t setPos(int64_t pos)
BlobIBufStream(std::istream &)
Construct it with the underlying istream object.
virtual ~BlobIBufStream()
Destructor.
Abstract base class for input buffer for a blob.
Definition: BlobIBuffer.h:36
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53