00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _AFLIBDATA_H_
00024 #define _AFLIBDATA_H_
00025
00026
00027 #ifdef HAVE_CONFIG_H
00028 #include <config.h>
00029 #endif
00030
00031 #include "aflibConfig.h"
00032
00033
00056 class aflibData {
00057
00058 public:
00059
00060 aflibData(long length);
00061
00062 aflibData(
00063 const aflibConfig& config,
00064 long length);
00065
00066 aflibData(const aflibData& data);
00067
00068 ~aflibData();
00069
00070 aflibData&
00071 operator=(const aflibData& data);
00072
00073 void
00074 setConfig(const aflibConfig& config);
00075
00076 const aflibConfig&
00077 getConfig() const;
00078
00079 void
00080 getLength(long& length) const;
00081
00082 long
00083 getLength() const;
00084
00085 void
00086 getOrigLength(long& length) const;
00087
00088 long
00089 getOrigLength() const;
00090
00091 void
00092 adjustLength(long length);
00093
00094 void
00095 adjustTotalLength(long length);
00096
00097 long
00098 getTotalLength();
00099
00100 long
00101 getTotalAdjustLength();
00102
00103 void *
00104 getDataPointer() const;
00105
00106 void
00107 setSample(
00108 int sample,
00109 long position,
00110 int channel);
00111
00112 int
00113 getSample(
00114 long position,
00115 int channel);
00116
00117 void
00118 getMinMax(
00119 int& min_value,
00120 int& max_value) const;
00121
00122 void
00123 convertToSize(aflib_data_size data_size);
00124
00125 void
00126 convertToEndian(aflib_data_endian endian);
00127
00128 aflib_data_endian
00129 getHostEndian() const;
00130
00131 void
00132 zeroData();
00133
00134 private:
00135
00136 void
00137 init();
00138
00139 void
00140 setHostEndian();
00141
00142 void
00143 allocate();
00144
00145
00146 void * _data;
00147 int _initialized;
00148 aflibConfig _config;
00149 int _byte_inc;
00150 long _length;
00151 long _adj_length;
00152 long _total_length;
00153 aflib_data_endian _endian;
00154
00155 };
00156
00157
00158 #endif