SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
TBlobPt Class Reference

#include <blobbs.h>

Collaboration diagram for TBlobPt:

Public Member Functions

 TBlobPt ()
 
 TBlobPt (const TBlobPt &Pt)
 
 TBlobPt (const uchar &_Seg, const uint &_Addr, const TB8Set &_FSet1, const TB8Set &_FSet2, const TB8Set &_FSet3)
 
 TBlobPt (const uchar &_Seg, const uint &_Addr)
 
 TBlobPt (const uint &_Addr)
 
 TBlobPt (const int &_Addr)
 
 ~TBlobPt ()
 
 TBlobPt (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
TBlobPtoperator= (const TBlobPt &Pt)
 
bool operator== (const TBlobPt &Pt) const
 
bool operator< (const TBlobPt &Pt) const
 
int GetMemUsed () const
 
int GetPrimHashCd () const
 
int GetSecHashCd () const
 
bool Empty () const
 
void Clr ()
 
void PutSeg (const uchar &_Seg)
 
uchar GetSeg () const
 
void PutAddr (const uint &_Addr)
 
uint GetAddr () const
 
void PutFlag (const int &FlagN, const bool &Val)
 
bool IsFlag (const int &FlagN) const
 
void MergeFlags (const TBlobPt &Pt)
 
void PutFSet (const int &FSetN, const TB8Set &FSet)
 
TB8Set GetFSet (const int &FSetN)
 
void Save (const PFRnd &FRnd) const
 
void SaveAddr (const PFRnd &FRnd) const
 
TStr GetAddrStr () const
 
TStr GetStr () const
 

Static Public Member Functions

static TBlobPt Load (const PFRnd &FRnd)
 
static TBlobPt LoadAddr (const PFRnd &FRnd, const uchar &Seg=0)
 

Public Attributes

uchar Seg
 
uint Addr
 
TB8Set FSet1
 
TB8Set FSet2
 
TB8Set FSet3
 

Static Public Attributes

static const int MnBlobBfL
 
static const int Flags =24
 

Detailed Description

Definition at line 5 of file blobbs.h.

Constructor & Destructor Documentation

TBlobPt::TBlobPt ( )
inline

Definition at line 13 of file blobbs.h.

13  :
14  Seg(0), Addr(TUInt::Mx), FSet1(), FSet2(), FSet3(){}
uchar Seg
Definition: blobbs.h:9
TB8Set FSet3
Definition: blobbs.h:11
static const uint Mx
Definition: dt.h:1247
uint Addr
Definition: blobbs.h:10
TB8Set FSet2
Definition: blobbs.h:11
TB8Set FSet1
Definition: blobbs.h:11
TBlobPt::TBlobPt ( const TBlobPt Pt)
inline

Definition at line 15 of file blobbs.h.

15  :
16  Seg(Pt.Seg), Addr(Pt.Addr),
17  FSet1(Pt.FSet1), FSet2(Pt.FSet2), FSet3(Pt.FSet3){}
uchar Seg
Definition: blobbs.h:9
TB8Set FSet3
Definition: blobbs.h:11
uint Addr
Definition: blobbs.h:10
TB8Set FSet2
Definition: blobbs.h:11
TB8Set FSet1
Definition: blobbs.h:11
TBlobPt::TBlobPt ( const uchar _Seg,
const uint _Addr,
const TB8Set _FSet1,
const TB8Set _FSet2,
const TB8Set _FSet3 
)
inline

Definition at line 18 of file blobbs.h.

19  :
20  Seg(_Seg), Addr(_Addr), FSet1(_FSet1), FSet2(_FSet2), FSet3(_FSet3){}
uchar Seg
Definition: blobbs.h:9
TB8Set FSet3
Definition: blobbs.h:11
uint Addr
Definition: blobbs.h:10
TB8Set FSet2
Definition: blobbs.h:11
TB8Set FSet1
Definition: blobbs.h:11
TBlobPt::TBlobPt ( const uchar _Seg,
const uint _Addr 
)
inline

Definition at line 21 of file blobbs.h.

21  :
22  Seg(_Seg), Addr(_Addr), FSet1(), FSet2(), FSet3(){}
uchar Seg
Definition: blobbs.h:9
TB8Set FSet3
Definition: blobbs.h:11
uint Addr
Definition: blobbs.h:10
TB8Set FSet2
Definition: blobbs.h:11
TB8Set FSet1
Definition: blobbs.h:11
TBlobPt::TBlobPt ( const uint _Addr)
inline

Definition at line 23 of file blobbs.h.

23  :
24  Seg(0), Addr(_Addr), FSet1(), FSet2(), FSet3(){}
uchar Seg
Definition: blobbs.h:9
TB8Set FSet3
Definition: blobbs.h:11
uint Addr
Definition: blobbs.h:10
TB8Set FSet2
Definition: blobbs.h:11
TB8Set FSet1
Definition: blobbs.h:11
TBlobPt::TBlobPt ( const int &  _Addr)
inline

Definition at line 25 of file blobbs.h.

References IAssert.

25  :
26  Seg(0), Addr(uint(_Addr)), FSet1(), FSet2(), FSet3(){IAssert(_Addr>=0);}
#define IAssert(Cond)
Definition: bd.h:262
uchar Seg
Definition: blobbs.h:9
TB8Set FSet3
Definition: blobbs.h:11
unsigned int uint
Definition: bd.h:11
uint Addr
Definition: blobbs.h:10
TB8Set FSet2
Definition: blobbs.h:11
TB8Set FSet1
Definition: blobbs.h:11
TBlobPt::~TBlobPt ( )
inline

Definition at line 27 of file blobbs.h.

27 {}
TBlobPt::TBlobPt ( TSIn SIn)
inline

Definition at line 28 of file blobbs.h.

References TSIn::Load().

28  {
29  SIn.Load(Seg); SIn.Load(Addr);
30  FSet1=TB8Set(SIn); FSet2=TB8Set(SIn); FSet3=TB8Set(SIn);}
uchar Seg
Definition: blobbs.h:9
TB8Set FSet3
Definition: blobbs.h:11
Definition: bits.h:166
uint Addr
Definition: blobbs.h:10
void Load(bool &Bool)
Definition: fl.h:84
TB8Set FSet2
Definition: blobbs.h:11
TB8Set FSet1
Definition: blobbs.h:11

Here is the call graph for this function:

Member Function Documentation

void TBlobPt::Clr ( )
inline

Definition at line 50 of file blobbs.h.

References TUInt::Mx.

Referenced by TGBlobBs::FNextBlobPt().

50 {Seg=0; Addr=TUInt::Mx;}
uchar Seg
Definition: blobbs.h:9
static const uint Mx
Definition: dt.h:1247
uint Addr
Definition: blobbs.h:10

Here is the caller graph for this function:

bool TBlobPt::Empty ( ) const
inline

Definition at line 49 of file blobbs.h.

References TUInt::Mx.

Referenced by GetStr(), and TMBlobBs::PutBlob().

49 {return Addr==TUInt::Mx;}
static const uint Mx
Definition: dt.h:1247
uint Addr
Definition: blobbs.h:10

Here is the caller graph for this function:

uint TBlobPt::GetAddr ( ) const
inline

Definition at line 54 of file blobbs.h.

Referenced by TGBlobBs::DelBlob(), TGBlobBs::FNextBlobPt(), TGBlobBs::GetBlob(), and TGBlobBs::PutBlob().

54 {return Addr;}
uint Addr
Definition: blobbs.h:10

Here is the caller graph for this function:

TStr TBlobPt::GetAddrStr ( ) const
inline

Definition at line 76 of file blobbs.h.

References TInt::GetStr(), and TUInt::GetStr().

76  {
77  TChA AddrChA; AddrChA+=TInt::GetStr(Seg); AddrChA+=':';
78  AddrChA+=TUInt::GetStr(Addr); return AddrChA;}
uchar Seg
Definition: blobbs.h:9
TStr GetStr() const
Definition: dt.h:1200
uint Addr
Definition: blobbs.h:10
TStr GetStr() const
Definition: dt.h:1282
Definition: dt.h:201

Here is the call graph for this function:

TB8Set TBlobPt::GetFSet ( const int &  FSetN)

Definition at line 34 of file blobbs.cpp.

References Fail, FSet1, FSet2, and FSet3.

34  {
35  switch (FSetN){
36  case 1: return FSet1;
37  case 2: return FSet2;
38  case 3: return FSet3;
39  default: Fail; return TB8Set();
40  }
41 }
TB8Set FSet3
Definition: blobbs.h:11
Definition: bits.h:166
#define Fail
Definition: bd.h:238
TB8Set FSet2
Definition: blobbs.h:11
TB8Set FSet1
Definition: blobbs.h:11
int TBlobPt::GetMemUsed ( ) const
inline

Definition at line 44 of file blobbs.h.

44 {return sizeof(TBlobPt);}
TBlobPt()
Definition: blobbs.h:13
int TBlobPt::GetPrimHashCd ( ) const
inline

Definition at line 46 of file blobbs.h.

46 {return abs(int(Addr));}
uint Addr
Definition: blobbs.h:10
int TBlobPt::GetSecHashCd ( ) const
inline

Definition at line 47 of file blobbs.h.

47 {return (abs(int(Addr))+int(Seg)*0x10);}
uchar Seg
Definition: blobbs.h:9
uint Addr
Definition: blobbs.h:10
uchar TBlobPt::GetSeg ( ) const
inline

Definition at line 52 of file blobbs.h.

Referenced by TMBlobBs::DelBlob(), TMBlobBs::FNextBlobPt(), TMBlobBs::GetBlob(), and TMBlobBs::PutBlob().

52 {return Seg;}
uchar Seg
Definition: blobbs.h:9

Here is the caller graph for this function:

TStr TBlobPt::GetStr ( ) const

Definition at line 43 of file blobbs.cpp.

References Addr, Empty(), Flags, TInt::GetStr(), TUInt::GetStr(), IsFlag(), and Seg.

43  {
44  TChA ChA;
45  ChA+='[';
46  if (Empty()){
47  ChA+="Null";
48  } else {
49  ChA+=TUInt::GetStr(uint(Seg)); ChA+=':'; ChA+=TUInt::GetStr(Addr);
50  for (int FlagN=0; FlagN<Flags; FlagN++){
51  if (IsFlag(FlagN)){
52  ChA+='{'; ChA+=TInt::GetStr(FlagN); ChA+='}';}
53  }
54  }
55  ChA+=']';
56  return ChA;
57 }
uchar Seg
Definition: blobbs.h:9
TStr GetStr() const
Definition: dt.h:1200
unsigned int uint
Definition: bd.h:11
uint Addr
Definition: blobbs.h:10
bool IsFlag(const int &FlagN) const
Definition: blobbs.cpp:15
TStr GetStr() const
Definition: dt.h:1282
Definition: dt.h:201
bool Empty() const
Definition: blobbs.h:49
static const int Flags
Definition: blobbs.h:8

Here is the call graph for this function:

bool TBlobPt::IsFlag ( const int &  FlagN) const

Definition at line 15 of file blobbs.cpp.

References EAssert, Fail, Flags, FSet1, FSet2, FSet3, and TB8Set::GetBit().

Referenced by GetStr().

15  {
16  EAssert((0<=FlagN)&&(FlagN<Flags));
17  switch (FlagN/8){
18  case 0: return FSet1.GetBit(7-FlagN%8);
19  case 1: return FSet2.GetBit(7-FlagN%8);
20  case 2: return FSet3.GetBit(7-FlagN%8);
21  default: Fail; return false;
22  }
23 }
TB8Set FSet3
Definition: blobbs.h:11
#define Fail
Definition: bd.h:238
TB8Set FSet2
Definition: blobbs.h:11
#define EAssert(Cond)
Definition: bd.h:280
bool GetBit(const int &BitN) const
Definition: bits.h:201
static const int Flags
Definition: blobbs.h:8
TB8Set FSet1
Definition: blobbs.h:11

Here is the call graph for this function:

Here is the caller graph for this function:

static TBlobPt TBlobPt::Load ( const PFRnd FRnd)
inlinestatic

Definition at line 62 of file blobbs.h.

References TFRnd::GetUCh(), and TFRnd::GetUInt().

Referenced by TBlobBs::GetFFreeBlobPtV().

62  {
63  uchar Seg=FRnd->GetUCh(); uint Addr=FRnd->GetUInt();
64  TB8Set B8Set1(FRnd->GetUCh()); TB8Set B8Set2(FRnd->GetUCh());
65  TB8Set B8Set3(FRnd->GetUCh());
66  return TBlobPt(Seg, Addr, B8Set1, B8Set2, B8Set3);}
uchar Seg
Definition: blobbs.h:9
Definition: bits.h:166
unsigned int uint
Definition: bd.h:11
uchar GetUCh()
Definition: fl.h:623
uint Addr
Definition: blobbs.h:10
TBlobPt()
Definition: blobbs.h:13
unsigned char uchar
Definition: bd.h:10
uint GetUInt()
Definition: fl.h:627

Here is the call graph for this function:

Here is the caller graph for this function:

static TBlobPt TBlobPt::LoadAddr ( const PFRnd FRnd,
const uchar Seg = 0 
)
inlinestatic

Definition at line 71 of file blobbs.h.

References TFRnd::GetUInt().

Referenced by TGBlobBs::PutBlob().

71  {
72  return TBlobPt(Seg, FRnd->GetUInt());}
uchar Seg
Definition: blobbs.h:9
TBlobPt()
Definition: blobbs.h:13
uint GetUInt()
Definition: fl.h:627

Here is the call graph for this function:

Here is the caller graph for this function:

void TBlobPt::MergeFlags ( const TBlobPt Pt)
inline

Definition at line 57 of file blobbs.h.

References FSet1, FSet2, and FSet3.

57  {
58  FSet1|=Pt.FSet1; FSet2|=Pt.FSet2; FSet3|=Pt.FSet3;}
TB8Set FSet3
Definition: blobbs.h:11
TB8Set FSet2
Definition: blobbs.h:11
TB8Set FSet1
Definition: blobbs.h:11
bool TBlobPt::operator< ( const TBlobPt Pt) const
inline

Definition at line 42 of file blobbs.h.

References Addr, and Seg.

42  {
43  return (Seg<Pt.Seg)||((Seg==Pt.Seg)&&(Addr<Pt.Addr));}
uchar Seg
Definition: blobbs.h:9
uint Addr
Definition: blobbs.h:10
TBlobPt& TBlobPt::operator= ( const TBlobPt Pt)
inline

Definition at line 35 of file blobbs.h.

References Addr, FSet1, FSet2, FSet3, and Seg.

35  {
36  if (this!=&Pt){
37  Seg=Pt.Seg; Addr=Pt.Addr;
38  FSet1=Pt.FSet1; FSet2=Pt.FSet2; FSet3=Pt.FSet3;}
39  return *this;}
uchar Seg
Definition: blobbs.h:9
TB8Set FSet3
Definition: blobbs.h:11
uint Addr
Definition: blobbs.h:10
TB8Set FSet2
Definition: blobbs.h:11
TB8Set FSet1
Definition: blobbs.h:11
bool TBlobPt::operator== ( const TBlobPt Pt) const
inline

Definition at line 40 of file blobbs.h.

References Addr, and Seg.

40  {
41  return (Seg==Pt.Seg)&&(Addr==Pt.Addr);}
uchar Seg
Definition: blobbs.h:9
uint Addr
Definition: blobbs.h:10
void TBlobPt::PutAddr ( const uint _Addr)
inline

Definition at line 53 of file blobbs.h.

53 {Addr=_Addr;}
uint Addr
Definition: blobbs.h:10
void TBlobPt::PutFlag ( const int &  FlagN,
const bool &  Val 
)

Definition at line 5 of file blobbs.cpp.

References EAssert, Fail, Flags, FSet1, FSet2, FSet3, and TB8Set::SetBit().

5  {
6  EAssert((0<=FlagN)&&(FlagN<Flags));
7  switch (FlagN/8){
8  case 0: FSet1.SetBit(7-FlagN%8, Val); break;
9  case 1: FSet2.SetBit(7-FlagN%8, Val); break;
10  case 2: FSet3.SetBit(7-FlagN%8, Val); break;
11  default: Fail;
12  }
13 }
TB8Set FSet3
Definition: blobbs.h:11
void SetBit(const int &BitN, const bool &Bool)
Definition: bits.h:199
#define Fail
Definition: bd.h:238
TB8Set FSet2
Definition: blobbs.h:11
#define EAssert(Cond)
Definition: bd.h:280
static const int Flags
Definition: blobbs.h:8
TB8Set FSet1
Definition: blobbs.h:11

Here is the call graph for this function:

void TBlobPt::PutFSet ( const int &  FSetN,
const TB8Set FSet 
)

Definition at line 25 of file blobbs.cpp.

References Fail, FSet1, FSet2, and FSet3.

25  {
26  switch (FSetN){
27  case 1: FSet1=FSet; break;
28  case 2: FSet2=FSet; break;
29  case 3: FSet3=FSet; break;
30  default: Fail;
31  }
32 }
TB8Set FSet3
Definition: blobbs.h:11
#define Fail
Definition: bd.h:238
TB8Set FSet2
Definition: blobbs.h:11
TB8Set FSet1
Definition: blobbs.h:11
void TBlobPt::PutSeg ( const uchar _Seg)
inline

Definition at line 51 of file blobbs.h.

Referenced by TMBlobBs::FNextBlobPt(), and TMBlobBs::PutBlob().

51 {Seg=_Seg;}
uchar Seg
Definition: blobbs.h:9

Here is the caller graph for this function:

void TBlobPt::Save ( TSOut SOut) const
inline

Definition at line 31 of file blobbs.h.

References TSOut::Save().

31  {
32  SOut.Save(Seg); SOut.Save(Addr);
33  FSet1.Save(SOut); FSet2.Save(SOut); FSet3.Save(SOut);}
uchar Seg
Definition: blobbs.h:9
TB8Set FSet3
Definition: blobbs.h:11
uint Addr
Definition: blobbs.h:10
void Save(const bool &Bool)
Definition: fl.h:173
TB8Set FSet2
Definition: blobbs.h:11
void Save(TSOut &SOut) const
Definition: bits.h:175
TB8Set FSet1
Definition: blobbs.h:11

Here is the call graph for this function:

void TBlobPt::Save ( const PFRnd FRnd) const
inline

Definition at line 67 of file blobbs.h.

References TFRnd::PutUCh(), and TFRnd::PutUInt().

67  {
68  FRnd->PutUCh(Seg); FRnd->PutUInt(Addr);
69  FRnd->PutUCh(FSet1.GetUCh()); FRnd->PutUCh(FSet2.GetUCh());
70  FRnd->PutUCh(FSet3.GetUCh());}
uchar Seg
Definition: blobbs.h:9
TB8Set FSet3
Definition: blobbs.h:11
uint Addr
Definition: blobbs.h:10
void PutUInt(const uint &UInt)
Definition: fl.h:626
TB8Set FSet2
Definition: blobbs.h:11
void PutUCh(const uchar &UCh)
Definition: fl.h:622
TB8Set FSet1
Definition: blobbs.h:11
uchar GetUCh() const
Definition: bits.h:188

Here is the call graph for this function:

void TBlobPt::SaveAddr ( const PFRnd FRnd) const
inline

Definition at line 73 of file blobbs.h.

References TFRnd::PutUInt().

73  {
74  FRnd->PutUInt(Addr);}
uint Addr
Definition: blobbs.h:10
void PutUInt(const uint &UInt)
Definition: fl.h:626

Here is the call graph for this function:

Member Data Documentation

uint TBlobPt::Addr

Definition at line 10 of file blobbs.h.

Referenced by GetStr(), operator<(), operator=(), and operator==().

const int TBlobPt::Flags =24
static

Definition at line 8 of file blobbs.h.

Referenced by GetStr(), IsFlag(), and PutFlag().

TB8Set TBlobPt::FSet1

Definition at line 11 of file blobbs.h.

Referenced by GetFSet(), IsFlag(), MergeFlags(), operator=(), PutFlag(), and PutFSet().

TB8Set TBlobPt::FSet2

Definition at line 11 of file blobbs.h.

Referenced by GetFSet(), IsFlag(), MergeFlags(), operator=(), PutFlag(), and PutFSet().

TB8Set TBlobPt::FSet3

Definition at line 11 of file blobbs.h.

Referenced by GetFSet(), IsFlag(), MergeFlags(), operator=(), PutFlag(), and PutFSet().

const int TBlobPt::MnBlobBfL
static

Definition at line 7 of file blobbs.h.

uchar TBlobPt::Seg

Definition at line 9 of file blobbs.h.

Referenced by GetStr(), operator<(), operator=(), and operator==().


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