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