SNAP Library , Developer Reference
2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <bits.h>
Public Member Functions | |
TB8Set () | |
TB8Set (const TB8Set &B8Set) | |
TB8Set (const uchar &_B1) | |
TB8Set (TSIn &SIn) | |
void | Save (TSOut &SOut) const |
TB8Set & | operator= (const TB8Set &BSet) |
TB8Set & | operator= (const uchar &_B1) |
bool | operator== (const TB8Set &BSet) const |
bool | operator< (const TB8Set &BSet) const |
bool | Empty () const |
TB8Set & | Clr () |
TB8Set & | Fill () |
bool | IsPrefix (const TB8Set &BSet, const int &MnBitN) const |
uchar | GetUCh () const |
void | Incl (const int &BitN) |
void | Excl (const int &BitN) |
bool | In (const int &BitN) const |
void | SetBit (const int &BitN, const bool &Bool) |
bool | GetBit (const int &BitN) const |
int | GetBits () const |
int | Get1s () const |
int | Get0s () const |
TStr | GetStr () const |
void | Wr () |
void | PutInt (const int &MnBitN, const int &MxBitN, const int &Val) |
int | GetInt (const int &MnBitN, const int &MxBitN) const |
TB8Set & | operator~ () |
TB8Set & | operator&= (const TB8Set &BSet) |
TB8Set & | operator|= (const TB8Set &BSet) |
TB8Set & | operator|= (const int &BitN) |
TB8Set & | operator^= (const TB8Set &BSet) |
TB8Set & | operator>>= (const int &ShiftBits) |
TB8Set & | operator<<= (const int &ShiftBits) |
Private Attributes | |
TB1Def::TB1 | B1 |
Static Private Attributes | |
static const int | Bits = 8 |
Friends | |
TB8Set | operator~ (const TB8Set &BSet) |
TB8Set | operator& (const TB8Set &LBSet, const TB8Set &RBSet) |
TB8Set | operator| (const TB8Set &LBSet, const TB8Set &RBSet) |
TB8Set | operator^ (const TB8Set &LBSet, const TB8Set &RBSet) |
TB8Set::TB8Set | ( | ) | [inline] |
TB8Set::TB8Set | ( | const TB8Set & | B8Set | ) | [inline] |
TB8Set::TB8Set | ( | const uchar & | _B1 | ) | [inline] |
TB8Set::TB8Set | ( | TSIn & | SIn | ) | [inline] |
Definition at line 174 of file bits.h.
References B1, and TSIn::LoadBf().
{SIn.LoadBf(&B1, sizeof(TB1Def::TB1));}
TB8Set& TB8Set::Clr | ( | ) | [inline] |
bool TB8Set::Empty | ( | ) | const [inline] |
void TB8Set::Excl | ( | const int & | BitN | ) | [inline] |
Definition at line 193 of file bits.h.
References Assert, B1, TB1Def::B1Def, and Bits.
Referenced by SetBit().
{ Assert((0<=BitN)&&(BitN<Bits)); B1&=TB1Def::TB1(~(TB1Def::B1Def.B1P2T[BitN]));}
TB8Set& TB8Set::Fill | ( | ) | [inline] |
Definition at line 184 of file bits.h.
References B1, TB1Def::B1Def, and TB1Def::MxB1.
{B1=TB1Def::B1Def.MxB1; return *this;}
int TB8Set::Get0s | ( | ) | const [inline] |
int TB8Set::Get1s | ( | ) | const [inline] |
Definition at line 205 of file bits.h.
References B1, TB1Def::B1Def, and TB1Def::GetB1Bits().
Referenced by Get0s().
{return TB1Def::B1Def.GetB1Bits(B1);}
bool TB8Set::GetBit | ( | const int & | BitN | ) | const [inline] |
Definition at line 201 of file bits.h.
References Assert, B1, TB1Def::B1Def, and Bits.
Referenced by TBlobPt::IsFlag(), and Wr().
{ Assert((0<=BitN)&&(BitN<Bits)); return (B1 & TB1Def::B1Def.B1P2T[BitN])!=0;}
int TB8Set::GetBits | ( | ) | const [inline] |
int TB8Set::GetInt | ( | const int & | MnBitN, |
const int & | MxBitN | ||
) | const [inline] |
Definition at line 214 of file bits.h.
References Assert, B1, TB1Def::B1Def, TB1Def::B1P2T, and Bits.
{ Assert((0<=MnBitN)&&(MnBitN<=MxBitN)&&(MxBitN<Bits)); return (B1>>MnBitN) & (TB1Def::B1Def.B1P2T[MxBitN-MnBitN+1]-1);}
TStr TB8Set::GetStr | ( | ) | const |
uchar TB8Set::GetUCh | ( | ) | const [inline] |
bool TB8Set::In | ( | const int & | BitN | ) | const [inline] |
void TB8Set::Incl | ( | const int & | BitN | ) | [inline] |
Definition at line 190 of file bits.h.
References Assert, B1, TB1Def::B1Def, TB1Def::B1P2T, and Bits.
Referenced by operator|=(), and SetBit().
{ Assert((0<=BitN)&&(BitN<Bits)); B1|=TB1Def::B1Def.B1P2T[BitN];}
bool TB8Set::IsPrefix | ( | const TB8Set & | BSet, |
const int & | MnBitN | ||
) | const [inline] |
bool TB8Set::operator< | ( | const TB8Set & | BSet | ) | const [inline] |
TB8Set& TB8Set::operator<<= | ( | const int & | ShiftBits | ) | [inline] |
bool TB8Set::operator== | ( | const TB8Set & | BSet | ) | const [inline] |
TB8Set& TB8Set::operator>>= | ( | const int & | ShiftBits | ) | [inline] |
TB8Set& TB8Set::operator|= | ( | const int & | BitN | ) | [inline] |
TB8Set& TB8Set::operator~ | ( | ) | [inline] |
void TB8Set::PutInt | ( | const int & | MnBitN, |
const int & | MxBitN, | ||
const int & | Val | ||
) | [inline] |
Definition at line 210 of file bits.h.
References Assert, B1, TB1Def::B1Def, and Bits.
{ Assert((0<=MnBitN)&&(MnBitN<=MxBitN)&&(MxBitN<Bits)); B1 &= TB1Def::TB1((~(TB1Def::B1Def.B1P2T[MxBitN-MnBitN+1]-1)) << MnBitN); B1 |= TB1Def::TB1((Val & (TB1Def::B1Def.B1P2T[MxBitN-MnBitN+1]-1)) << MnBitN);}
void TB8Set::Save | ( | TSOut & | SOut | ) | const [inline] |
Definition at line 175 of file bits.h.
References B1, and TSOut::SaveBf().
{SOut.SaveBf(&B1, sizeof(TB1Def::TB1));}
void TB8Set::SetBit | ( | const int & | BitN, |
const bool & | Bool | ||
) | [inline] |
void TB8Set::Wr | ( | ) |
TB1Def::TB1 TB8Set::B1 [private] |
Definition at line 169 of file bits.h.
Referenced by Clr(), Empty(), Excl(), Fill(), Get1s(), GetBit(), GetInt(), GetUCh(), In(), Incl(), IsPrefix(), operator&=(), operator<(), operator<<=(), operator=(), operator==(), operator>>=(), operator^=(), operator|=(), operator~(), PutInt(), Save(), and TB8Set().
const int TB8Set::Bits = 8 [static, private] |