DP3
BlobAipsIO.h
Go to the documentation of this file.
1 // BlobAipsIO.h: A Blob buffer for Aips++ ByteIO
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_BLOBAIPSIO_H
7 #define LOFAR_BLOB_BLOBAIPSIO_H
8 
9 #include <casacore/casa/IO/ByteIO.h>
10 
11 #include "BlobOStream.h"
12 #include "BlobIStream.h"
13 
14 namespace dp3 {
15 namespace blob {
16 
19 
21 
30 class BlobAipsIO : public casacore::ByteIO {
31  public:
34  explicit BlobAipsIO(BlobOStream&);
35  explicit BlobAipsIO(BlobIStream&);
37 
38  virtual ~BlobAipsIO();
39 
46  virtual void write(casacore::Int64 size, const void* buf);
47  virtual void write(casacore::uInt size, const void* buf);
48 
55  virtual casacore::Int64 read(casacore::Int64 size, void* buf,
56  bool throwException);
57  virtual casacore::Int read(casacore::uInt size, void* buf,
58  bool throwException);
59 
62  virtual casacore::Int64 length();
63 
65  virtual bool isReadable() const;
66 
68  virtual bool isWritable() const;
69 
71  virtual bool isSeekable() const;
72 
73  private:
77  BlobAipsIO(const BlobAipsIO&);
78  BlobAipsIO& operator=(const BlobAipsIO&);
80 
83  virtual casacore::Int64 doSeek(casacore::Int64 offset,
84  casacore::ByteIO::SeekOption);
85 
86  BlobOStream* itsOBuf;
87  BlobIStream* itsIBuf;
88 };
89 
91 
92 } // namespace blob
93 } // namespace dp3
94 
95 #endif
A Blob buffer for Aips++ ByteIO.
Definition: BlobAipsIO.h:30
virtual casacore::Int64 length()
virtual casacore::Int64 read(casacore::Int64 size, void *buf, bool throwException)
virtual void write(casacore::uInt size, const void *buf)
virtual bool isReadable() const
Is the Blob stream readable?
BlobAipsIO(BlobIStream &)
virtual void write(casacore::Int64 size, const void *buf)
BlobAipsIO(BlobOStream &)
virtual bool isWritable() const
Is the Blob stream writable?
virtual casacore::Int read(casacore::uInt size, void *buf, bool throwException)
virtual bool isSeekable() const
Is the Blob stream seekable?
Input stream for a blob.
Definition: BlobIStream.h:43
Output stream for a blob.
Definition: BlobOStream.h:40
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53