SNAP Library 2.4, Developer Reference  2015-05-11 19:40:56
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TUInt64 Class Reference

#include <dt.h>

Collaboration diagram for TUInt64:

Public Member Functions

 TUInt64 ()
 
 TUInt64 (const TUInt64 &Int)
 
 TUInt64 (const uint64 &Int)
 
 TUInt64 (const uint &MsVal, const uint &LsVal)
 
 TUInt64 (void *Pt)
 
 operator uint64 () const
 
 TUInt64 (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
 
TUInt64operator= (const TUInt64 &Int)
 
TUInt64operator+= (const TUInt64 &Int)
 
TUInt64operator-= (const TUInt64 &Int)
 
TUInt64operator*= (const TUInt64 &Int)
 
TUInt64 operator++ (int)
 
TUInt64 operator-- (int)
 
int GetMemUsed () const
 
int GetPrimHashCd () const
 
int GetSecHashCd () const
 
uint GetMsVal () const
 
uint GetLsVal () const
 
TStr GetStr () const
 

Static Public Member Functions

static TStr GetStr (const TUInt64 &Int)
 
static TStr GetHexStr (const TUInt64 &Int)
 
static TStr GetKiloStr (const uint64 &Val)
 
static TStr GetMegaStr (const uint64 &Val)
 

Public Attributes

uint64 Val
 

Static Public Attributes

static const TUInt64 Mn
 
static const TUInt64 Mx
 

Detailed Description

Definition at line 1223 of file dt.h.

Constructor & Destructor Documentation

TUInt64::TUInt64 ( )
inline

Definition at line 1230 of file dt.h.

Referenced by GetMemUsed().

1230 : Val(0){}
uint64 Val
Definition: dt.h:1225

Here is the caller graph for this function:

TUInt64::TUInt64 ( const TUInt64 Int)
inline

Definition at line 1231 of file dt.h.

1231 : Val(Int.Val){}
uint64 Val
Definition: dt.h:1225
TUInt64::TUInt64 ( const uint64 Int)
inline

Definition at line 1232 of file dt.h.

1232 : Val(Int){}
uint64 Val
Definition: dt.h:1225
TUInt64::TUInt64 ( const uint MsVal,
const uint LsVal 
)
inline

Definition at line 1233 of file dt.h.

References Val.

1233  : Val(0){
1234  Val=(((uint64)MsVal) << 32) | ((uint64)LsVal);}
unsigned long long uint64
Definition: bd.h:38
uint64 Val
Definition: dt.h:1225
TUInt64::TUInt64 ( void *  Pt)
inlineexplicit

Definition at line 1235 of file dt.h.

References TConv_Pt64Ints32::GetUInt64(), and Val.

1235  : Val(0){
1236  TConv_Pt64Ints32 Conv(Pt); Val=Conv.GetUInt64();}
uint64 Val
Definition: dt.h:1225

Here is the call graph for this function:

TUInt64::TUInt64 ( TSIn SIn)
inlineexplicit

Definition at line 1238 of file dt.h.

References TSIn::Load(), and Val.

1238 {SIn.Load(Val);}
void Load(bool &Bool)
Definition: fl.h:84
uint64 Val
Definition: dt.h:1225

Here is the call graph for this function:

Member Function Documentation

static TStr TUInt64::GetHexStr ( const TUInt64 Int)
inlinestatic

Definition at line 1270 of file dt.h.

References TStr::Fmt(), and Val.

1270 {return TStr::Fmt("%llX", Int.Val);}
uint64 Val
Definition: dt.h:1225
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599

Here is the call graph for this function:

static TStr TUInt64::GetKiloStr ( const uint64 Val)
inlinestatic

Definition at line 1273 of file dt.h.

References GetStr().

Referenced by GetMegaStr().

1273  {
1274  if (Val>100*1000){return GetStr(Val/1000)+"K";}
1275  else if (Val>1000){return GetStr(Val/1000)+"."+GetStr((Val%1000)/100)+"K";}
1276  else {return GetStr(Val);}}
TStr GetStr() const
Definition: dt.h:1268
uint64 Val
Definition: dt.h:1225

Here is the call graph for this function:

Here is the caller graph for this function:

uint TUInt64::GetLsVal ( ) const
inline

Definition at line 1257 of file dt.h.

References Val.

Referenced by GetPrimHashCd(), and GetSecHashCd().

1257  {
1258  return (uint)(Val & 0xffffffff);}
unsigned int uint
Definition: bd.h:11
uint64 Val
Definition: dt.h:1225

Here is the caller graph for this function:

static TStr TUInt64::GetMegaStr ( const uint64 Val)
inlinestatic

Definition at line 1277 of file dt.h.

References GetKiloStr(), and GetStr().

1277  {
1278  if (Val>100*1000000){return GetStr(Val/1000000)+"M";}
1279  else if (Val>1000000){
1280  return GetStr(Val/1000000)+"."+GetStr((Val%1000000)/100000)+"M";}
1281  else {return GetKiloStr(Val);}}
static TStr GetKiloStr(const uint64 &Val)
Definition: dt.h:1273
TStr GetStr() const
Definition: dt.h:1268
uint64 Val
Definition: dt.h:1225

Here is the call graph for this function:

int TUInt64::GetMemUsed ( ) const
inline

Definition at line 1250 of file dt.h.

References TUInt64().

1250 {return sizeof(TUInt64);}
TUInt64()
Definition: dt.h:1230

Here is the call graph for this function:

uint TUInt64::GetMsVal ( ) const
inline

Definition at line 1255 of file dt.h.

References Val.

Referenced by GetPrimHashCd(), and GetSecHashCd().

1255  {
1256  return (uint)(Val >> 32);}
unsigned int uint
Definition: bd.h:11
uint64 Val
Definition: dt.h:1225

Here is the caller graph for this function:

int TUInt64::GetPrimHashCd ( ) const
inline

Definition at line 1252 of file dt.h.

References GetLsVal(), and GetMsVal().

1252 { return (int)GetMsVal() + (int)GetLsVal(); } //TODO: to check
uint GetLsVal() const
Definition: dt.h:1257
uint GetMsVal() const
Definition: dt.h:1255

Here is the call graph for this function:

int TUInt64::GetSecHashCd ( ) const
inline

Definition at line 1253 of file dt.h.

References GetLsVal(), and GetMsVal().

1253 { return ((int)GetMsVal() + (int)GetLsVal()) / 0x10; } //TODO: to check
uint GetLsVal() const
Definition: dt.h:1257
uint GetMsVal() const
Definition: dt.h:1255

Here is the call graph for this function:

TStr TUInt64::GetStr ( ) const
inline

Definition at line 1268 of file dt.h.

References TStr::Fmt(), and Val.

Referenced by TXmlTok::AddArg(), TAGMFit::CalcPNoComByCmtyVV(), GetKiloStr(), GetMegaStr(), TGraphAnf< PGraph >::InitAnfBits(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TCesna::MLEGradAscentParallel(), TSnap::PrintInfo(), and SaveXml().

1268 {return TStr::Fmt("%llu", Val);}
uint64 Val
Definition: dt.h:1225
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599

Here is the call graph for this function:

Here is the caller graph for this function:

static TStr TUInt64::GetStr ( const TUInt64 Int)
inlinestatic

Definition at line 1269 of file dt.h.

References TStr::Fmt(), and Val.

1269 {return TStr::Fmt("%llu", Int.Val);}
uint64 Val
Definition: dt.h:1225
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599

Here is the call graph for this function:

void TUInt64::Load ( TSIn SIn)
inline

Definition at line 1239 of file dt.h.

References TSIn::Load(), and Val.

1239 {SIn.Load(Val);}
void Load(bool &Bool)
Definition: fl.h:84
uint64 Val
Definition: dt.h:1225

Here is the call graph for this function:

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

Definition at line 2151 of file dt.cpp.

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

2151  {
2152  XLoadHd(Nm);
2153  Val=TXmlObjSer::GetInt64Arg(XmlTok, "Val");
2154 }
#define XLoadHd(Nm)
Definition: bd.h:312
static int64 GetInt64Arg(const PXmlTok &XmlTok, const TStr &Nm)
Definition: xml.cpp:89
uint64 Val
Definition: dt.h:1225

Here is the call graph for this function:

TUInt64::operator uint64 ( ) const
inline

Definition at line 1237 of file dt.h.

References Val.

1237 {return Val;}
uint64 Val
Definition: dt.h:1225
TUInt64& TUInt64::operator*= ( const TUInt64 Int)
inline

Definition at line 1247 of file dt.h.

References Val.

1247 {Val*=Int.Val; return *this;}
uint64 Val
Definition: dt.h:1225
TUInt64 TUInt64::operator++ ( int  )
inline

Definition at line 1248 of file dt.h.

References Val.

1248 {Val++; return *this;}
uint64 Val
Definition: dt.h:1225
TUInt64& TUInt64::operator+= ( const TUInt64 Int)
inline

Definition at line 1245 of file dt.h.

References Val.

1245 {Val+=Int.Val; return *this;}
uint64 Val
Definition: dt.h:1225
TUInt64 TUInt64::operator-- ( int  )
inline

Definition at line 1249 of file dt.h.

References Val.

1249 {Val--; return *this;}
uint64 Val
Definition: dt.h:1225
TUInt64& TUInt64::operator-= ( const TUInt64 Int)
inline

Definition at line 1246 of file dt.h.

References Val.

1246 {Val-=Int.Val; return *this;}
uint64 Val
Definition: dt.h:1225
TUInt64& TUInt64::operator= ( const TUInt64 Int)
inline

Definition at line 1244 of file dt.h.

References Val.

1244 {Val=Int.Val; return *this;}
uint64 Val
Definition: dt.h:1225
void TUInt64::Save ( TSOut SOut) const
inline

Definition at line 1240 of file dt.h.

References TSOut::Save(), and Val.

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

Here is the call graph for this function:

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

Definition at line 2156 of file dt.cpp.

References GetStr(), Val, and XSaveBETagArg.

2156  {
2157  XSaveBETagArg(Nm, "Val", TUInt64::GetStr(Val));
2158 }
#define XSaveBETagArg(Nm, ArgNm, ArgVal)
Definition: bd.h:327
TStr GetStr() const
Definition: dt.h:1268
uint64 Val
Definition: dt.h:1225

Here is the call graph for this function:

Member Data Documentation

const TUInt64 TUInt64::Mn
static

Definition at line 1227 of file dt.h.

const TUInt64 TUInt64::Mx
static

Definition at line 1228 of file dt.h.


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