15 #error To include __FILE__, set mTheType 18 #define mDICB(fntyp,fn) \ 19 ((DataInterpreter<mTheType>::fntyp)(&DataInterpreter<mTheType>::fn)) 21 #define mDefGetPut(fnnm) \ 23 getfn = needswap ? mDICB(GetFn,get##fnnm##swp) : mDICB(GetFn,get##fnnm); \ 24 putfn = needswap ? mDICB(PutFn,put##fnnm##swp) : mDICB(PutFn,put##fnnm); \ 27 #define mDefGetPutNoSwap(fnnm) \ 28 { getfn = mDICB(GetFn,get##fnnm); putfn = mDICB(PutFn,put##fnnm); } 38 :
mDICB(SwapFn,swap2) ) );
40 getfn =
mDICB(GetFn,get0);
41 putfn =
mDICB(PutFn,put0);
42 bool needswap = !ignend && dc.
needSwap();
70 default:
pErrMsg(
"Invalid enum");
break;
91 default:
pErrMsg(
"Unhandled enum");
break;
140 #define mSet(nb,isint,frmt,iss,swpd) \ 141 dc = DataCharacteristics( isint, iss, (BinDataDesc::ByteCount)nb, \ 142 DataCharacteristics::frmt, __islittle__ != swpd ); 153 mSet(2,
true,Ieee,
true,
false)
155 mSet(2,
true,Ieee,
false,
false)
157 mSet(2,
true,Ibm,
true,
false)
159 mSet(2,
true,Ieee,
true,
true)
161 mSet(2,
true,Ieee,
false,
true)
163 mSet(2,
true,Ibm,
true,
true)
169 mSet(4,
true,Ieee,
true,
false)
171 mSet(4,
true,Ieee,
false,
false)
173 mSet(4,
false,Ieee,
true,
false)
175 mSet(4,
true,Ibm,
true,
false)
177 mSet(4,
false,Ibm,
true,
false)
179 mSet(4,
true,Ieee,
true,
true)
181 mSet(4,
true,Ieee,
false,
true)
183 mSet(4,
false,Ieee,
true,
true)
185 mSet(4,
true,Ibm,
true,
true)
187 mSet(4,
false,Ibm,
true,
true)
193 mSet(8,
false,Ieee,
true,
false)
195 mSet(8,
false,Ieee,
true,
true)
197 mSet(8,
true,Ieee,
true,
false)
199 mSet(8,
true,Ieee,
true,
true)
205 mSet(1,
true,Ieee,
true,
false)
207 mSet(1,
true,Ieee,
false,
false)
241 #define mDoChgSwp(typ) \ 242 if ( getfn == &DataInterpreter<mTheType>::get##typ ) \ 244 getfn = &DataInterpreter<mTheType>::get##typ##swp; \ 245 putfn = &DataInterpreter<mTheType>::put##typ##swp; \ 247 else if ( getfn == &DataInterpreter<mTheType>::get##typ##swp ) \ 249 getfn = &DataInterpreter<mTheType>::get##typ; \ 250 putfn = &DataInterpreter<mTheType>::put##typ; \
Definition: bindatadesc.h:47
#define mSet(nb, isint, frmt, iss, swpd)
Definition: i_datainterp.h:140
SwapFn swpfn
Definition: datainterp.h:154
DataCharacteristics dataChar() const
GetFn getfn
Definition: datainterp.h:152
void set(const DataCharacteristics &, bool ignoreendianness=false)
use ignoreendianness when you pre-byteswap the data
Definition: bindatadesc.h:47
bool isIeee() const
Definition: datachar.h:55
Byte-level data interpreter.
Definition: cbvswriter.h:22
ByteCount nrBytes() const
Definition: bindatadesc.h:62
Definition: bindatadesc.h:47
PutFn putfn
Definition: datainterp.h:153
#define mDoChgSwp(typ)
Definition: i_datainterp.h:241
byte-level data characteristics of stored data.
Definition: datachar.h:37
#define mDefGetPut(fnnm)
Definition: i_datainterp.h:21
#define mDefGetPutNoSwap(fnnm)
Definition: i_datainterp.h:27
DataInterpreter< T > & operator=(const DataInterpreter< T > &)
bool needSwap() const
Definition: datachar.h:84
bool isInteger() const
Definition: bindatadesc.h:60
Definition: bindatadesc.h:47
#define mDICB(fntyp, fn)
Definition: i_datainterp.h:18
DataInterpreter(const DataCharacteristics &, bool ignoreendianness=false)
#define pErrMsg(msg)
Definition: errmsg.h:60
bool isSigned() const
Definition: bindatadesc.h:61