6 #ifndef LOFAR_BLOB_BLOBISTREAM_H
7 #define LOFAR_BLOB_BLOBISTREAM_H
66 int getStart(
const char* objectType =
"");
113 void get(
bool* values, uint64_t nrval);
114 void get(
char* values, uint64_t nrval);
115 void get(int8_t* values, uint64_t nrval);
116 void get(uint8_t* values, uint64_t nrval);
117 void get(int16_t* values, uint64_t nrval);
118 void get(uint16_t* values, uint64_t nrval);
119 void get(int32_t* values, uint64_t nrval);
120 void get(uint32_t* values, uint64_t nrval);
121 void get(int64_t* values, uint64_t nrval);
122 void get(uint64_t* values, uint64_t nrval);
123 void get(
float* values, uint64_t nrval);
124 void get(
double* values, uint64_t nrval);
126 void get(std::complex<T>* values, uint64_t nrval);
127 void get(std::complex<float>* values, uint64_t nrval);
128 void get(std::complex<double>* values, uint64_t nrval);
129 void get(std::string* values, uint64_t nrval);
135 void get(std::vector<bool>& values);
136 template <
typename T>
137 void get(std::vector<T>& values);
171 void getBuf(
void* buf, uint64_t sz);
175 void checkGet()
const;
176 void throwGet()
const;
181 bool itsHasCachedType;
182 uint64_t itsCurLength;
183 unsigned int itsLevel;
188 std::string itsObjectType;
190 std::stack<uint64_t> itsObjTLN;
192 std::stack<uint64_t> itsObjLen;
202 itsHasCachedType =
false;
206 return getStart(std::string(objectType));
214 return itsDataFormat;
217 template <
typename T>
219 getBuf(&value,
sizeof(std::complex<T>));
220 if (itsMustConvert) {
225 template <
typename T>
227 getBuf(values, nrval *
sizeof(std::complex<T>));
228 if (itsMustConvert) {
233 template <
typename T>
246 inline void BlobIStream::checkGet()
const {
247 if (itsLevel == 0) throwGet();
Abstract base class for input buffer for a blob.
Definition: BlobIBuffer.h:36
virtual int64_t tellPos() const =0
Input stream for a blob.
Definition: BlobIStream.h:43
BlobIStream(BlobIBuffer &)
const std::string & getNextType(uint64_t &size)
~BlobIStream()
Destructor.
void get(char *values, uint64_t nrval)
void get(uint8_t *values, uint64_t nrval)
BlobIStream & operator>>(double &value)
int64_t tellPos() const
Definition: BlobIStream.h:209
BlobIStream & operator>>(uint8_t &value)
void get(uint64_t *values, uint64_t nrval)
BlobIStream & operator>>(std::string &value)
BlobIStream & operator>>(uint16_t &value)
unsigned int align(unsigned int n)
BlobIStream & operator>>(std::complex< double > &value)
BlobIStream & operator>>(char &value)
BlobIStream & operator>>(uint32_t &value)
void get(double *values, uint64_t nrval)
void get(int8_t *values, uint64_t nrval)
void getBoolVec(std::vector< bool > &values, uint64_t size)
void get(uint16_t *values, uint64_t nrval)
void get(int64_t *values, uint64_t nrval)
BlobIStream & operator>>(int8_t &value)
int getStart(const std::string &objectType)
BlobIStream & operator>>(uint64_t &value)
int64_t getSpace(uint64_t nbytes)
void get(int16_t *values, uint64_t nrval)
BlobIStream & operator>>(float &value)
void clear()
Clear the object. I.e., reset the current level and position.
Definition: BlobIStream.h:199
void get(std::complex< float > *values, uint64_t nrval)
BlobIStream & operator>>(std::complex< float > &value)
void get(int32_t *values, uint64_t nrval)
BlobIStream & operator>>(int32_t &value)
void get(std::complex< double > *values, uint64_t nrval)
bool mustConvert() const
Definition: BlobIStream.h:211
BlobIStream & operator>>(int16_t &value)
const std::string & getNextType()
void get(bool *values, uint64_t nrval)
BlobIStream & operator>>(int64_t &value)
void get(uint32_t *values, uint64_t nrval)
void get(std::string *values, uint64_t nrval)
void get(float *values, uint64_t nrval)
dp3::common::DataFormat dataFormat() const
Definition: BlobIStream.h:213
BlobIStream & operator>>(bool &value)
void dataConvert(DataFormat, char *inout, unsigned int nrval)
Definition: DataConvert.h:175
DataFormat
This file defines an enum for the possible machine data formats.
Definition: DataFormat.h:24
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53