DP3
BlobOBufStream.h
Go to the documentation of this file.
1 // BlobOBufStream.h: Output buffer for a blob using an ostream
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_BLOBOBUFSTREAM_H
7 #define LOFAR_BLOB_BLOBOBUFSTREAM_H
8 
9 #include "BlobOBuffer.h"
10 
11 #include <iosfwd>
12 
13 namespace dp3 {
14 namespace blob {
15 
18 
20 
23 
24 class BlobOBufStream : public BlobOBuffer {
25  public:
27  explicit BlobOBufStream(std::ostream&);
28 
30  virtual ~BlobOBufStream();
31 
33  virtual uint64_t put(const void* buffer, uint64_t nbytes);
34 
37  virtual int64_t tellPos() const;
38 
41  virtual int64_t setPos(int64_t pos);
42 
43  private:
44  std::streambuf* itsStream;
45 };
46 
48 
49 } // namespace blob
50 } // namespace dp3
51 
52 #endif
Output buffer for a blob using an ostream.
Definition: BlobOBufStream.h:24
virtual int64_t tellPos() const
virtual uint64_t put(const void *buffer, uint64_t nbytes)
Put the requested nr of bytes.
virtual ~BlobOBufStream()
Destructor.
virtual int64_t setPos(int64_t pos)
BlobOBufStream(std::ostream &)
Construct it with the underlying ostream object.
Abstract base class for output buffer for a blob.
Definition: BlobOBuffer.h:32
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53