SNAP Library , Developer Reference  2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TUInt64 Class Reference

#include <dt.h>

Collaboration diagram for TUInt64:

List of all members.

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


Constructor & Destructor Documentation

TUInt64::TUInt64 ( ) [inline]

Definition at line 1212 of file dt.h.

Referenced by GetMemUsed().

: Val(0){}

Here is the caller graph for this function:

TUInt64::TUInt64 ( const TUInt64 Int) [inline]

Definition at line 1213 of file dt.h.

: Val(Int.Val){}
TUInt64::TUInt64 ( const uint64 Int) [inline]

Definition at line 1214 of file dt.h.

: Val(Int){}
TUInt64::TUInt64 ( const uint MsVal,
const uint LsVal 
) [inline]

Definition at line 1215 of file dt.h.

References Val.

                                               : Val(0){
    Val=(((uint64)MsVal) << 32) | ((uint64)LsVal);}
TUInt64::TUInt64 ( void *  Pt) [inline, explicit]

Definition at line 1217 of file dt.h.

References TConv_Pt64Ints32::GetUInt64(), and Val.

                            : Val(0){
     TConv_Pt64Ints32 Conv(Pt); Val=Conv.GetUInt64();}

Here is the call graph for this function:

TUInt64::TUInt64 ( TSIn SIn) [inline, explicit]

Definition at line 1220 of file dt.h.

References TSIn::Load(), and Val.

{SIn.Load(Val);}

Here is the call graph for this function:


Member Function Documentation

static TStr TUInt64::GetHexStr ( const TUInt64 Int) [inline, static]

Definition at line 1251 of file dt.h.

References TStr::Fmt(), and Val.

{return TStr::Fmt("%llX", Int.Val);}

Here is the call graph for this function:

static TStr TUInt64::GetKiloStr ( const uint64 Val) [inline, static]

Definition at line 1254 of file dt.h.

References GetStr().

Referenced by GetMegaStr().

                                           {
    if (Val>100*1000){return GetStr(Val/1000)+"K";}
    else if (Val>1000){return GetStr(Val/1000)+"."+GetStr((Val%1000)/100)+"K";}
    else {return GetStr(Val);}}

Here is the call graph for this function:

Here is the caller graph for this function:

uint TUInt64::GetLsVal ( ) const [inline]

Definition at line 1238 of file dt.h.

References Val.

Referenced by GetPrimHashCd(), and GetSecHashCd().

                        {
    return (uint)(Val & 0xffffffff);}

Here is the caller graph for this function:

static TStr TUInt64::GetMegaStr ( const uint64 Val) [inline, static]

Definition at line 1258 of file dt.h.

References GetKiloStr(), and GetStr().

                                           {
    if (Val>100*1000000){return GetStr(Val/1000000)+"M";}
    else if (Val>1000000){
      return GetStr(Val/1000000)+"."+GetStr((Val%1000000)/100000)+"M";}
    else {return GetKiloStr(Val);}}

Here is the call graph for this function:

int TUInt64::GetMemUsed ( ) const [inline]

Definition at line 1231 of file dt.h.

References TUInt64().

{return sizeof(TUInt64);}

Here is the call graph for this function:

uint TUInt64::GetMsVal ( ) const [inline]

Definition at line 1236 of file dt.h.

References Val.

Referenced by GetPrimHashCd(), and GetSecHashCd().

                        {
    return (uint)(Val >> 32);}

Here is the caller graph for this function:

int TUInt64::GetPrimHashCd ( ) const [inline]

Definition at line 1233 of file dt.h.

References GetLsVal(), and GetMsVal().

{ return (int)GetMsVal() + (int)GetLsVal(); } //TODO: to check

Here is the call graph for this function:

int TUInt64::GetSecHashCd ( ) const [inline]

Definition at line 1234 of file dt.h.

References GetLsVal(), and GetMsVal().

{ return ((int)GetMsVal() + (int)GetLsVal()) / 0x10; } //TODO: to check

Here is the call graph for this function:

TStr TUInt64::GetStr ( ) const [inline]

Definition at line 1249 of file dt.h.

References TStr::Fmt(), and Val.

Referenced by TXmlTok::AddArg(), GetKiloStr(), GetMegaStr(), TGraphAnf< PGraph >::InitAnfBits(), and SaveXml().

{return TStr::Fmt("%llu", Val);}

Here is the call graph for this function:

Here is the caller graph for this function:

static TStr TUInt64::GetStr ( const TUInt64 Int) [inline, static]

Definition at line 1250 of file dt.h.

References TStr::Fmt(), and Val.

{return TStr::Fmt("%llu", Int.Val);}

Here is the call graph for this function:

void TUInt64::Load ( TSIn SIn) [inline]

Definition at line 1221 of file dt.h.

References TSIn::Load(), and Val.

{SIn.Load(Val);}

Here is the call graph for this function:

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

Definition at line 2104 of file dt.cpp.

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

                                                          {
  XLoadHd(Nm);
  Val=TXmlObjSer::GetInt64Arg(XmlTok, "Val");
}

Here is the call graph for this function:

TUInt64::operator uint64 ( ) const [inline]

Definition at line 1219 of file dt.h.

References Val.

{return Val;}
TUInt64 TUInt64::operator++ ( int  ) [inline]

Definition at line 1229 of file dt.h.

References Val.

{Val++; return *this;}
TUInt64& TUInt64::operator+= ( const TUInt64 Int) [inline]

Definition at line 1227 of file dt.h.

References Val.

{Val+=Int.Val; return *this;}
TUInt64 TUInt64::operator-- ( int  ) [inline]

Definition at line 1230 of file dt.h.

References Val.

{Val--; return *this;}
TUInt64& TUInt64::operator-= ( const TUInt64 Int) [inline]

Definition at line 1228 of file dt.h.

References Val.

{Val-=Int.Val; return *this;}
TUInt64& TUInt64::operator= ( const TUInt64 Int) [inline]

Definition at line 1226 of file dt.h.

References Val.

{Val=Int.Val; return *this;}
void TUInt64::Save ( TSOut SOut) const [inline]

Definition at line 1222 of file dt.h.

References TSOut::Save(), and Val.

{SOut.Save(Val);}

Here is the call graph for this function:

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

Definition at line 2109 of file dt.cpp.

References GetStr(), Val, and XSaveBETagArg.

                                                       {
  XSaveBETagArg(Nm, "Val", TUInt64::GetStr(Val));
}

Here is the call graph for this function:


Member Data Documentation

const TUInt64 TUInt64::Mn [static]

Definition at line 1209 of file dt.h.

const TUInt64 TUInt64::Mx [static]

Definition at line 1210 of file dt.h.


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