BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
ComPackBase< T > Class Template Referenceabstract

#include <ComPackBase.h>

+ Inheritance diagram for ComPackBase< T >:

Public Member Functions

 ComPackBase ()
 
 ComPackBase (T minval, T maxval, d_ULong bitrange)
 
virtual ~ComPackBase ()
 
virtual StatusCode pack (const T, d_ULong &) const =0
 
virtual StatusCode unpack (const d_ULong, T &) const =0
 
virtual const T & getMinVal () const
 
virtual const T & getMaxVal () const
 
virtual const T & getRange () const
 
d_ULong bitRange () const
 
d_ULong bitMask () const
 
 ComPackBase (const ComPackBase &)
 
ComPackBaseoperator= (const ComPackBase &)
 

Protected Types

enum  { _maxlongbits = 32 }
 

Protected Attributes

_minVal
 
_maxVal
 
_valRange
 
d_ULong _bitRange
 
d_ULong _bitMask
 

Additional Inherited Members

- Public Types inherited from ComPackBaseBase
enum  StatusCode {
  TAG_OK , TAG_BAD , TAG_RANGE_ERROR , TAG_VAL_ROUND_DOWN ,
  TAG_VAL_ROUND_UP
}
 

Detailed Description

template<class T>
class ComPackBase< T >

Definition at line 40 of file ComPackBase.h.

Member Enumeration Documentation

◆ anonymous enum

template<class T >
anonymous enum
protected
Enumerator
_maxlongbits 

Definition at line 83 of file ComPackBase.h.

83{ _maxlongbits = 32 };

Constructor & Destructor Documentation

◆ ComPackBase() [1/3]

template<class T >
ComPackBase< T >::ComPackBase ( )
inline

Definition at line 46 of file ComPackBase.h.

46{};

◆ ComPackBase() [2/3]

template<class T >
ComPackBase< T >::ComPackBase ( minval,
maxval,
d_ULong  bitrange 
)
inline

Definition at line 48 of file ComPackBase.h.

48 :
49 _minVal(minval),_maxVal(maxval),_valRange(maxval-minval),
50 _bitRange(bitrange),_bitMask((1<<bitrange)-1){;}
d_ULong _bitRange
Definition: ComPackBase.h:87
d_ULong _bitMask
Definition: ComPackBase.h:88

◆ ~ComPackBase()

template<class T >
virtual ComPackBase< T >::~ComPackBase ( )
inlinevirtual

Definition at line 55 of file ComPackBase.h.

55{};

◆ ComPackBase() [3/3]

template<class T >
ComPackBase< T >::ComPackBase ( const ComPackBase< T > &  )
inline

Definition at line 78 of file ComPackBase.h.

78{ ::abort(); }

Member Function Documentation

◆ bitMask()

template<class T >
d_ULong ComPackBase< T >::bitMask ( ) const
inline

Definition at line 75 of file ComPackBase.h.

75{ return _bitMask; }

◆ bitRange()

template<class T >
d_ULong ComPackBase< T >::bitRange ( ) const
inline

Definition at line 74 of file ComPackBase.h.

74{ return _bitRange; }

◆ getMaxVal()

template<class T >
virtual const T & ComPackBase< T >::getMaxVal ( ) const
inlinevirtual

Definition at line 71 of file ComPackBase.h.

71{ return _maxVal;};

◆ getMinVal()

template<class T >
virtual const T & ComPackBase< T >::getMinVal ( ) const
inlinevirtual

Definition at line 70 of file ComPackBase.h.

70{ return _minVal;};

◆ getRange()

template<class T >
virtual const T & ComPackBase< T >::getRange ( ) const
inlinevirtual

Definition at line 72 of file ComPackBase.h.

72{ return _valRange;};

◆ operator=()

template<class T >
ComPackBase & ComPackBase< T >::operator= ( const ComPackBase< T > &  )
inline

Definition at line 79 of file ComPackBase.h.

79{::abort(); return *this;}

◆ pack()

template<class T >
virtual StatusCode ComPackBase< T >::pack ( const  T,
d_ULong  
) const
pure virtual

◆ unpack()

template<class T >
virtual StatusCode ComPackBase< T >::unpack ( const  d_ULong,
T &   
) const
pure virtual

Member Data Documentation

◆ _bitMask

template<class T >
d_ULong ComPackBase< T >::_bitMask
protected

Definition at line 88 of file ComPackBase.h.

Referenced by ComPackBase< T >::bitMask().

◆ _bitRange

template<class T >
d_ULong ComPackBase< T >::_bitRange
protected

Definition at line 87 of file ComPackBase.h.

Referenced by ComPackBase< T >::bitRange().

◆ _maxVal

template<class T >
T ComPackBase< T >::_maxVal
protected

Definition at line 85 of file ComPackBase.h.

Referenced by ComPackBase< T >::getMaxVal().

◆ _minVal

template<class T >
T ComPackBase< T >::_minVal
protected

Definition at line 84 of file ComPackBase.h.

Referenced by ComPackBase< T >::getMinVal().

◆ _valRange

template<class T >
T ComPackBase< T >::_valRange
protected

Definition at line 86 of file ComPackBase.h.

Referenced by ComPackBase< T >::getRange().


The documentation for this class was generated from the following file: