00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef NC_PACKET_H
00022 #define NC_PACKET_H
00023
00024 #include<vector>
00025 #include<ostream>
00026
00027 #include<simple-ref-count.h>
00028
00029 namespace Binc {
00030
00043 class BitVector : public SimpleRefCount<BitVector>
00044 {
00045 public:
00046
00047 BitVector();
00048 virtual ~BitVector();
00049
00050 BitVector(const BitVector& v);
00051
00057 BitVector(const std::vector<unsigned int>& v);
00058
00059
00066 bool operator== (const BitVector& rhs) const;
00067
00068
00075 bool operator!= (const BitVector& rhs) const;
00076
00086 BitVector& operator+= (const BitVector& rhs);
00087
00088
00098 friend BitVector operator+ (const BitVector& lhs, const BitVector& rhs);
00099
00100
00109 friend std::ostream& operator << (std::ostream& os, const BitVector& v);
00110
00115 unsigned int Size ();
00116
00117
00118 protected:
00119
00120 std::vector<unsigned int> m_vect;
00121 };
00122
00123
00124
00125
00126
00127
00128 }
00129
00130
00131 #endif