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

#include <dt.h>

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 1318 of file dt.h.

Constructor & Destructor Documentation

TUInt64::TUInt64 ( )
inline

Definition at line 1325 of file dt.h.

1325 : Val(0){}
uint64 Val
Definition: dt.h:1320
TUInt64::TUInt64 ( const TUInt64 Int)
inline

Definition at line 1326 of file dt.h.

1326 : Val(Int.Val){}
uint64 Val
Definition: dt.h:1320
TUInt64::TUInt64 ( const uint64 Int)
inline

Definition at line 1327 of file dt.h.

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

Definition at line 1328 of file dt.h.

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

Definition at line 1330 of file dt.h.

1330  : Val(0){
1331  TConv_Pt64Ints32 Conv(Pt); Val=Conv.GetUInt64();}
uint64 Val
Definition: dt.h:1320
TUInt64::TUInt64 ( TSIn SIn)
inlineexplicit

Definition at line 1333 of file dt.h.

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

Member Function Documentation

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

Definition at line 1365 of file dt.h.

1365 {return TStr::Fmt("%llX", Int.Val);}
uint64 Val
Definition: dt.h:1320
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599
static TStr TUInt64::GetKiloStr ( const uint64 Val)
inlinestatic

Definition at line 1368 of file dt.h.

1368  {
1369  if (Val>100*1000){return GetStr(Val/1000)+"K";}
1370  else if (Val>1000){return GetStr(Val/1000)+"."+GetStr((Val%1000)/100)+"K";}
1371  else {return GetStr(Val);}}
TStr GetStr() const
Definition: dt.h:1363
uint64 Val
Definition: dt.h:1320
uint TUInt64::GetLsVal ( ) const
inline

Definition at line 1352 of file dt.h.

1352  {
1353  return (uint)(Val & 0xffffffff);}
unsigned int uint
Definition: bd.h:11
uint64 Val
Definition: dt.h:1320
static TStr TUInt64::GetMegaStr ( const uint64 Val)
inlinestatic

Definition at line 1372 of file dt.h.

1372  {
1373  if (Val>100*1000000){return GetStr(Val/1000000)+"M";}
1374  else if (Val>1000000){
1375  return GetStr(Val/1000000)+"."+GetStr((Val%1000000)/100000)+"M";}
1376  else {return GetKiloStr(Val);}}
static TStr GetKiloStr(const uint64 &Val)
Definition: dt.h:1368
TStr GetStr() const
Definition: dt.h:1363
uint64 Val
Definition: dt.h:1320
int TUInt64::GetMemUsed ( ) const
inline

Definition at line 1345 of file dt.h.

1345 {return sizeof(TUInt64);}
TUInt64()
Definition: dt.h:1325
uint TUInt64::GetMsVal ( ) const
inline

Definition at line 1350 of file dt.h.

1350  {
1351  return (uint)(Val >> 32);}
unsigned int uint
Definition: bd.h:11
uint64 Val
Definition: dt.h:1320
int TUInt64::GetPrimHashCd ( ) const
inline

Definition at line 1347 of file dt.h.

1347 { return (int)GetMsVal() + (int)GetLsVal(); } //TODO: to check
uint GetLsVal() const
Definition: dt.h:1352
uint GetMsVal() const
Definition: dt.h:1350
int TUInt64::GetSecHashCd ( ) const
inline

Definition at line 1348 of file dt.h.

1348 { return ((int)GetMsVal() + (int)GetLsVal()) / 0x10; } //TODO: to check
uint GetLsVal() const
Definition: dt.h:1352
uint GetMsVal() const
Definition: dt.h:1350
TStr TUInt64::GetStr ( ) const
inline

Definition at line 1363 of file dt.h.

1363 {return TStr::Fmt("%llu", Val);}
uint64 Val
Definition: dt.h:1320
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599
static TStr TUInt64::GetStr ( const TUInt64 Int)
inlinestatic

Definition at line 1364 of file dt.h.

1364 {return TStr::Fmt("%llu", Int.Val);}
uint64 Val
Definition: dt.h:1320
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599
void TUInt64::Load ( TSIn SIn)
inline

Definition at line 1334 of file dt.h.

1334 {SIn.Load(Val);}
void Load(bool &Bool)
Definition: fl.h:84
uint64 Val
Definition: dt.h:1320
void TUInt64::LoadXml ( const PXmlTok XmlTok,
const TStr Nm 
)

Definition at line 2151 of file dt.cpp.

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:1320
TUInt64::operator uint64 ( ) const
inline

Definition at line 1332 of file dt.h.

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

Definition at line 1342 of file dt.h.

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

Definition at line 1343 of file dt.h.

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

Definition at line 1340 of file dt.h.

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

Definition at line 1344 of file dt.h.

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

Definition at line 1341 of file dt.h.

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

Definition at line 1339 of file dt.h.

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

Definition at line 1335 of file dt.h.

1335 {SOut.Save(Val);}
void Save(const bool &Bool)
Definition: fl.h:173
uint64 Val
Definition: dt.h:1320
void TUInt64::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 2156 of file dt.cpp.

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

Member Data Documentation

const TUInt64 TUInt64::Mn
static

Definition at line 1322 of file dt.h.

const TUInt64 TUInt64::Mx
static

Definition at line 1323 of file dt.h.

uint64 TUInt64::Val

Definition at line 1320 of file dt.h.


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