00001
00002
00003
00004
00005
00006
00007 #ifndef DCFENCODE_RTMRA_FLOAT_ARRAY_H
00008 #define DCFENCODE_RTMRA_FLOAT_ARRAY_H
00009
00010 #include "RtmraDim.h"
00011 template <typename Data_t, Rtmra_Dim Dim> class Rtmra;
00012
00013 template <>
00014 class DCFencode< Rtmra<float,array> > : 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 inline void amax( const int );
00024 inline int amax();
00025 inline void bplen_a( const int );
00026 inline int bplen_a();
00027
00028 void descr( ostream& = cout );
00029
00030 protected:
00031
00032 float _quantcoef;
00033 int _bplen_coef;
00034 int _amax;
00035 int _bplen_a;
00036
00037 friend
00038 ostream& operator << ( ostream&, DCFencode& );
00039
00040 friend
00041 istream& operator >> ( istream&, DCFencode& );
00042
00043 };
00044
00045 inline
00046 DCFencode< Rtmra<float,array> >::DCFencode ()
00047 : _quantcoef(0), _bplen_coef(sizeof(float)), _amax(1), _bplen_a(1) {}
00048
00049 inline
00050 int DCFencode< Rtmra<float,array> >::enctype()
00051 {
00052 return DCFenctype_Rtmra_float_array;
00053 }
00054
00055 inline
00056 int DCFencode< Rtmra<float,array> >::encsizeb()
00057 {
00058 return sizeof(float)+1+sizeof(int)+1;
00059 }
00060
00061 inline
00062 void DCFencode< Rtmra<float,array> >::quantcoef( const float quantcoef )
00063 {
00064 _quantcoef=quantcoef;
00065 }
00066
00067 inline
00068 float DCFencode< Rtmra<float,array> >::quantcoef() { return _quantcoef; }
00069
00070 inline
00071 int DCFencode< Rtmra<float,array> >::bplen_coef() { return _bplen_coef; }
00072
00073 inline
00074 void DCFencode< Rtmra<float,array> >::amax(const int amax) { _amax=amax; }
00075
00076 inline
00077 int DCFencode< Rtmra<float,array> >::amax() { return _amax; }
00078
00079 inline
00080 void DCFencode< Rtmra<float,array> >::bplen_a(const int bplen_a)
00081 {
00082 _bplen_a=bplen_a;
00083 }
00084
00085 inline
00086 int DCFencode< Rtmra<float,array> >::bplen_a() { return _bplen_a; }
00087
00088 #endif
00089