00001
00002
00003
00004
00005
00006
00007 #ifndef DCFENCODE_RTMRA_FLOAT_SCALAR_H
00008 #define DCFENCODE_RTMRA_FLOAT_SCALAR_H
00009
00010 #include "RtmraDim.h"
00011 template <typename Data_t, Rtmra_Dim Dim> class Rtmra;
00012
00013 template <>
00014 class DCFencode< Rtmra<float,scalar> > : public DCFencodeBase
00015 {
00016 public:
00017 inline DCFencode();
00018 inline int enctype();
00019 inline int encsizeb();
00020 inline void quantcoef( const float );
00021 inline float quantcoef();
00022 inline int bplen_coef();
00023
00024 void descr( ostream& = cout );
00025
00026 protected:
00027
00028 float _quantcoef;
00029 int _bplen_coef;
00030
00031 friend
00032 ostream& operator << ( ostream&, DCFencode& );
00033
00034 friend
00035 istream& operator >> ( istream&, DCFencode& );
00036
00037 };
00038
00039 inline
00040 DCFencode< Rtmra<float,scalar> >::DCFencode ()
00041 : _quantcoef(0), _bplen_coef(sizeof(float)) {}
00042
00043 inline
00044 int DCFencode< Rtmra<float,scalar> >::enctype() {
00045 return DCFenctype_Rtmra_float_scalar;
00046 }
00047
00048 inline
00049 int DCFencode< Rtmra<float,scalar> >::encsizeb() { return sizeof(float)+1; }
00050
00051 inline
00052 void DCFencode< Rtmra<float,scalar> >::quantcoef(const float quantcoef) {
00053 _quantcoef=quantcoef;
00054 }
00055
00056 inline
00057 float DCFencode< Rtmra<float,scalar> >::quantcoef() { return _quantcoef; }
00058
00059 inline
00060 int DCFencode< Rtmra<float,scalar> >::bplen_coef() { return _bplen_coef; }
00061
00062 #endif
00063