hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
BitsetBase.hpp
Go to the documentation of this file.
1 
8 #ifndef _BITSET_BASE_HPP
9 #define _BITSET_BASE_HPP
10 
11 #include <bitset>
12 
13 namespace HCE
14 {
15 
16 
17  template<size_t N>
18  class BitsetBase
19  {
20  protected:
21  std::bitset<N> _bitset;
22  public:
24  virtual ~BitsetBase<N>() = 0;
25  public:
26  virtual const unsigned long getMask() const { return BitsetBase<N>::_bitset.to_ulong(); }
27  virtual void setMask( const unsigned short & mask) { if(BitsetBase<N>::_bitset.size()>mask) BitsetBase<N>::_bitset.set( mask ); }
28  };
29 
30  template<size_t N>
32 
33 
34 }
35 
36 
37 #endif