OpendTect-6_4  6.4
rawarray.h
Go to the documentation of this file.
1 #ifndef rawarray_h
2 #define rawarray_h
3 
4 /*
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H.Bril
9  Date: 1-9-95
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 */
14 
15 #include "generalmod.h"
16 #include "gendefs.h"
17 
18 
22 {
23 public:
24  RawDataArray( int byts=4 )
25  : nelem_(0), bytes_(byts), data_(0)
26  {}
27  inline bool isEmpty() const { return !data_ || !nelem_; }
28 
29  inline int size() const { return nelem_; }
30  inline int bytesPerSample() const { return bytes_; }
31  bool isZero() const;
32 
33  inline unsigned char* data() { return data_; }
34  inline const unsigned char* data() const { return data_; }
35 
36 protected:
37 
38  int nelem_;
39  int bytes_;
40  unsigned char* data_;
41 
42 };
43 
44 
45 #endif
#define mExpClass(module)
Definition: commondefs.h:160
int size() const
Definition: rawarray.h:29
const unsigned char * data() const
Definition: rawarray.h:34
unsigned char * data()
Definition: rawarray.h:33
int bytes_
Definition: rawarray.h:39
unsigned char * data_
Definition: rawarray.h:40
bool isEmpty() const
Definition: rawarray.h:27
RawDataArray(int byts=4)
Definition: rawarray.h:24
Raw binary data access.
Definition: rawarray.h:21
int nelem_
Definition: rawarray.h:38
int bytesPerSample() const
Definition: rawarray.h:30

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019