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
TBool Class Reference

#include <dt.h>

Collaboration diagram for TBool:

Public Member Functions

 TBool ()
 
 TBool (const bool &_Val)
 
 operator bool () const
 
 TBool (TSIn &SIn)
 
void Load (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
void LoadXml (const PXmlTok &XmlTok, const TStr &Nm)
 
void SaveXml (TSOut &SOut, const TStr &Nm) const
 
TBooloperator= (const TBool &Bool)
 
bool operator== (const TBool &Bool) const
 
bool operator< (const TBool &Bool) const
 
bool operator() () const
 
int GetMemUsed () const
 
int GetPrimHashCd () const
 
int GetSecHashCd () const
 

Static Public Member Functions

static bool GetRnd ()
 
static TStr GetStr (const bool &Val)
 
static TStr GetStr (const TBool &Bool)
 
static TStr GetYNStr (const bool &Val)
 
static TStr GetYesNoStr (const bool &Val)
 
static TStr Get01Str (const bool &Val)
 
static bool IsValStr (const TStr &Str)
 
static bool GetValFromStr (const TStr &Str)
 
static bool GetValFromStr (const TStr &Str, const bool &DfVal)
 

Public Attributes

bool Val
 

Static Public Attributes

static const bool Mn =0
 
static const bool Mx =1
 
static const int Vals =TBool::Mx-TBool::Mn+1
 
static TRnd Rnd
 
static const TStr FalseStr ="F"
 
static const TStr TrueStr ="T"
 
static const TStr NStr ="N"
 
static const TStr YStr ="Y"
 
static const TStr NoStr ="No"
 
static const TStr YesStr ="Yes"
 

Detailed Description

Definition at line 974 of file dt.h.

Constructor & Destructor Documentation

TBool::TBool ( )
inline

Definition at line 990 of file dt.h.

Referenced by GetMemUsed().

990 : Val(false){}
bool Val
Definition: dt.h:976

Here is the caller graph for this function:

TBool::TBool ( const bool &  _Val)
inline

Definition at line 991 of file dt.h.

991 : Val(_Val){}
bool Val
Definition: dt.h:976
TBool::TBool ( TSIn SIn)
inlineexplicit

Definition at line 993 of file dt.h.

References TSIn::Load().

993 {SIn.Load(Val);}
void Load(bool &Bool)
Definition: fl.h:84
bool Val
Definition: dt.h:976

Here is the call graph for this function:

Member Function Documentation

static TStr TBool::Get01Str ( const bool &  Val)
inlinestatic

Definition at line 1019 of file dt.h.

1019  {
1020  if (Val){return "1";} else {return "0";}}
bool Val
Definition: dt.h:976
int TBool::GetMemUsed ( ) const
inline

Definition at line 1004 of file dt.h.

References TBool().

1004 {return sizeof(TBool);}
TBool()
Definition: dt.h:990

Here is the call graph for this function:

int TBool::GetPrimHashCd ( ) const
inline

Definition at line 1006 of file dt.h.

References Val.

1006 {return Val;}
bool Val
Definition: dt.h:976
static bool TBool::GetRnd ( )
inlinestatic

Definition at line 1009 of file dt.h.

References TRnd::GetUniDevInt().

1009 {return Rnd.GetUniDevInt(2)==1;}
static TRnd Rnd
Definition: dt.h:981
int GetUniDevInt(const int &Range=0)
Definition: dt.cpp:39

Here is the call graph for this function:

int TBool::GetSecHashCd ( ) const
inline

Definition at line 1007 of file dt.h.

References Val.

1007 {return Val;}
bool Val
Definition: dt.h:976
static TStr TBool::GetStr ( const bool &  Val)
inlinestatic

Definition at line 1011 of file dt.h.

References FalseStr, and TrueStr.

Referenced by TXmlTok::AddArg(), TEnv::GetIfArgPrefixBool(), GetStr(), TSOut::PutBool(), TOLx::PutBool(), TPt< TRec >::SaveXml(), and SaveXml().

1011  {
1012  if (Val){return TrueStr;} else {return FalseStr;}}
static const TStr FalseStr
Definition: dt.h:983
bool Val
Definition: dt.h:976
static const TStr TrueStr
Definition: dt.h:984

Here is the caller graph for this function:

static TStr TBool::GetStr ( const TBool Bool)
inlinestatic

Definition at line 1013 of file dt.h.

References GetStr(), and Val.

1013  {
1014  return GetStr(Bool.Val);}
bool Val
Definition: dt.h:976
static TStr GetStr(const bool &Val)
Definition: dt.h:1011

Here is the call graph for this function:

bool TBool::GetValFromStr ( const TStr Str)
static

Definition at line 1850 of file dt.cpp.

References TrueStr, YesStr, and YStr.

Referenced by TEnv::GetIfArgPrefixBool(), and TILx::GetSym().

1850  {
1851  return (Str==TrueStr)||(Str==YStr)||(Str==YesStr);
1852 }
static const TStr YStr
Definition: dt.h:986
static const TStr YesStr
Definition: dt.h:988
static const TStr TrueStr
Definition: dt.h:984

Here is the caller graph for this function:

bool TBool::GetValFromStr ( const TStr Str,
const bool &  DfVal 
)
static

Definition at line 1854 of file dt.cpp.

References TStr::GetUc(), IsValStr(), TrueStr, YesStr, and YStr.

1854  {
1855  TStr UcStr=Str.GetUc();
1856  if (IsValStr(UcStr)){
1857  return (UcStr==TrueStr)||(UcStr==YStr)||(UcStr==YesStr);
1858  } else {
1859  return DfVal;
1860  }
1861 }
TStr GetUc() const
Definition: dt.h:496
static const TStr YStr
Definition: dt.h:986
static const TStr YesStr
Definition: dt.h:988
static bool IsValStr(const TStr &Str)
Definition: dt.cpp:1842
Definition: dt.h:412
static const TStr TrueStr
Definition: dt.h:984

Here is the call graph for this function:

static TStr TBool::GetYesNoStr ( const bool &  Val)
inlinestatic

Definition at line 1017 of file dt.h.

References NoStr, and YesStr.

Referenced by TEnv::GetIfArgPrefixBool().

1017  {
1018  if (Val){return YesStr;} else {return NoStr;}}
static const TStr NoStr
Definition: dt.h:987
bool Val
Definition: dt.h:976
static const TStr YesStr
Definition: dt.h:988

Here is the caller graph for this function:

static TStr TBool::GetYNStr ( const bool &  Val)
inlinestatic

Definition at line 1015 of file dt.h.

References NStr, and YStr.

1015  {
1016  if (Val){return YStr;} else {return NStr;}}
static const TStr YStr
Definition: dt.h:986
bool Val
Definition: dt.h:976
static const TStr NStr
Definition: dt.h:985
bool TBool::IsValStr ( const TStr Str)
static

Definition at line 1842 of file dt.cpp.

References FalseStr, TStr::GetUc(), NoStr, NStr, TrueStr, YesStr, and YStr.

Referenced by TILx::GetSym(), and GetValFromStr().

1842  {
1843  TStr UcStr=Str.GetUc();
1844  return
1845  (UcStr==FalseStr)||(UcStr==TrueStr)||
1846  (UcStr==YStr)||(UcStr==NStr)||
1847  (UcStr==YesStr)||(UcStr==NoStr);
1848 }
static const TStr NoStr
Definition: dt.h:987
TStr GetUc() const
Definition: dt.h:496
static const TStr YStr
Definition: dt.h:986
static const TStr FalseStr
Definition: dt.h:983
static const TStr YesStr
Definition: dt.h:988
static const TStr NStr
Definition: dt.h:985
Definition: dt.h:412
static const TStr TrueStr
Definition: dt.h:984

Here is the call graph for this function:

Here is the caller graph for this function:

void TBool::Load ( TSIn SIn)
inline

Definition at line 994 of file dt.h.

References TSIn::Load().

Referenced by TAGMFast::Load(), TCoda::Load(), TStrHash< TInt, TBigStrPool >::Load(), and TStrHash< TInt, TBigStrPool >::LoadShM().

994 {SIn.Load(Val);}
void Load(bool &Bool)
Definition: fl.h:84
bool Val
Definition: dt.h:976

Here is the call graph for this function:

Here is the caller graph for this function:

void TBool::LoadXml ( const PXmlTok XmlTok,
const TStr Nm 
)

Definition at line 1833 of file dt.cpp.

References TXmlObjSer::GetBoolArg(), Val, and XLoadHd.

1833  {
1834  XLoadHd(Nm);
1835  Val=TXmlObjSer::GetBoolArg(XmlTok, "Val");
1836 }
#define XLoadHd(Nm)
Definition: bd.h:312
static bool GetBoolArg(const PXmlTok &XmlTok, const TStr &Nm)
Definition: xml.cpp:59
bool Val
Definition: dt.h:976

Here is the call graph for this function:

TBool::operator bool ( ) const
inline

Definition at line 992 of file dt.h.

References Val.

992 {return Val;}
bool Val
Definition: dt.h:976
bool TBool::operator() ( ) const
inline

Definition at line 1003 of file dt.h.

References Val.

1003 {return Val;}
bool Val
Definition: dt.h:976
bool TBool::operator< ( const TBool Bool) const
inline

Definition at line 1001 of file dt.h.

References Val.

1001  {//return Val<Bool.Val;
1002  return (Val==false)&&(Bool.Val==true);}
bool Val
Definition: dt.h:976
TBool& TBool::operator= ( const TBool Bool)
inline

Definition at line 999 of file dt.h.

References Val.

999 {Val=Bool.Val; return *this;}
bool Val
Definition: dt.h:976
bool TBool::operator== ( const TBool Bool) const
inline

Definition at line 1000 of file dt.h.

References Val.

1000 {return Val==Bool.Val;}
bool Val
Definition: dt.h:976
void TBool::Save ( TSOut SOut) const
inline

Definition at line 995 of file dt.h.

References TSOut::Save().

Referenced by TJsonVal::Save(), TAGMFast::Save(), TCoda::Save(), TBigNet< TNodeData, IsDir >::Save(), THash< TPair, THash >::Save(), TCrossNet::Save(), TPt< TRec >::Save(), TStrHash< TInt, TBigStrPool >::Save(), and THashSet< TInt >::Save().

995 {SOut.Save(Val);}
bool Val
Definition: dt.h:976
void Save(const bool &Bool)
Definition: fl.h:173

Here is the call graph for this function:

Here is the caller graph for this function:

void TBool::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 1838 of file dt.cpp.

References GetStr(), Val, and XSaveBETagArg.

1838  {
1839  XSaveBETagArg(Nm, "Val", TBool::GetStr(Val));
1840 }
#define XSaveBETagArg(Nm, ArgNm, ArgVal)
Definition: bd.h:327
bool Val
Definition: dt.h:976
static TStr GetStr(const bool &Val)
Definition: dt.h:1011

Here is the call graph for this function:

Member Data Documentation

const TStr TBool::FalseStr ="F"
static

Definition at line 983 of file dt.h.

Referenced by GetStr(), and IsValStr().

const bool TBool::Mn =0
static

Definition at line 978 of file dt.h.

const bool TBool::Mx =1
static

Definition at line 979 of file dt.h.

const TStr TBool::NoStr ="No"
static

Definition at line 987 of file dt.h.

Referenced by GetYesNoStr(), and IsValStr().

const TStr TBool::NStr ="N"
static

Definition at line 985 of file dt.h.

Referenced by GetYNStr(), and IsValStr().

TRnd TBool::Rnd
static

Definition at line 981 of file dt.h.

const TStr TBool::TrueStr ="T"
static

Definition at line 984 of file dt.h.

Referenced by TXmlTok::GetBoolArgVal(), GetStr(), GetValFromStr(), and IsValStr().

const int TBool::Vals =TBool::Mx-TBool::Mn+1
static

Definition at line 980 of file dt.h.

const TStr TBool::YesStr ="Yes"
static

Definition at line 988 of file dt.h.

Referenced by GetValFromStr(), GetYesNoStr(), and IsValStr().

const TStr TBool::YStr ="Y"
static

Definition at line 986 of file dt.h.

Referenced by GetValFromStr(), GetYNStr(), and IsValStr().


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