SNAP Library 2.0, Developer Reference  2013-05-13 16:33:57
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
TPt< TRec > Class Template Reference

#include <bd.h>

Collaboration diagram for TPt< TRec >:

List of all members.

Public Types

typedef TRec TObj

Public Member Functions

 TPt ()
 TPt (const TPt &Pt)
 TPt (TRec *_Addr)
 ~TPt ()
 TPt (TSIn &SIn)
 TPt (TSIn &SIn, void *ThisPt)
void Save (TSOut &SOut) const
void LoadXml (const TPt< TXmlTok > &XmlTok, const TStr &Nm)
void SaveXml (TSOut &SOut, const TStr &Nm) const
TPtoperator= (const TPt &Pt)
bool operator== (const TPt &Pt) const
bool operator!= (const TPt &Pt) const
bool operator< (const TPt &Pt) const
TRec * operator-> () const
TRec & operator* () const
TRec & operator[] (const int &RecN) const
TRec * operator() () const
bool Empty () const
void Clr ()
int GetRefs () const
int GetPrimHashCd () const
int GetSecHashCd () const
TPt< TRec > Clone ()

Static Public Member Functions

static TPt New ()

Private Member Functions

void MkRef () const
void UnRef () const

Private Attributes

TRec * Addr

Detailed Description

template<class TRec>
class TPt< TRec >

Definition at line 459 of file bd.h.


Member Typedef Documentation

template<class TRec>
typedef TRec TPt< TRec >::TObj

Definition at line 461 of file bd.h.


Constructor & Destructor Documentation

template<class TRec>
TPt< TRec >::TPt ( ) [inline]

Definition at line 476 of file bd.h.

: Addr(NULL){}
template<class TRec>
TPt< TRec >::TPt ( const TPt< TRec > &  Pt) [inline]

Definition at line 477 of file bd.h.

: Addr(Pt.Addr){MkRef();}
template<class TRec>
TPt< TRec >::TPt ( TRec *  _Addr) [inline]

Definition at line 478 of file bd.h.

: Addr(_Addr){MkRef();}
template<class TRec>
TPt< TRec >::~TPt ( ) [inline]

Definition at line 480 of file bd.h.

{UnRef();}
template<class TRec>
TPt< TRec >::TPt ( TSIn SIn) [explicit]

Definition at line 6 of file xmlser.h.

References TPt< TRec >::Addr, and TPt< TRec >::MkRef().

                       :
    Addr(NULL){TBool IsNull(SIn);
    if (!IsNull){TPt Pt=TRec::Load(SIn); Addr=Pt.Addr; MkRef();}}

Here is the call graph for this function:

template<class TRec>
TPt< TRec >::TPt ( TSIn SIn,
void *  ThisPt 
) [explicit]

Definition at line 11 of file xmlser.h.

References TPt< TRec >::Addr, and TPt< TRec >::MkRef().

                                     :
    Addr(NULL){TBool IsNull(SIn);
    if (!IsNull){TPt Pt=TRec::Load(SIn, ThisPt); Addr=Pt.Addr; MkRef();}}

Here is the call graph for this function:


Member Function Documentation

template<class TRec>
TPt<TRec> TPt< TRec >::Clone ( ) [inline]

Definition at line 509 of file bd.h.

{return MkClone(*this);}
template<class TRec>
void TPt< TRec >::Clr ( ) [inline]

Definition at line 502 of file bd.h.

Referenced by TUnicode::GetCodec(), and TFPathNotify::UpdateSOut().

{UnRef(); Addr=NULL;}

Here is the caller graph for this function:

template<class TRec>
int TPt< TRec >::GetPrimHashCd ( ) const [inline]

Definition at line 506 of file bd.h.

Referenced by TBigStrPool::GetPrimHashCd().

{return Addr->GetPrimHashCd();}

Here is the caller graph for this function:

template<class TRec>
int TPt< TRec >::GetRefs ( ) const [inline]

Definition at line 503 of file bd.h.

                      {
    if (Addr==NULL){return -1;} else {return Addr->CRef.GetRefs();}}
template<class TRec>
int TPt< TRec >::GetSecHashCd ( ) const [inline]

Definition at line 507 of file bd.h.

Referenced by TBigStrPool::GetSecHashCd().

{return Addr->GetSecHashCd();}

Here is the caller graph for this function:

template<class TRec >
void TPt< TRec >::LoadXml ( const TPt< TXmlTok > &  XmlTok,
const TStr Nm 
)

Definition at line 21 of file xmlser.h.

References TPt< TRec >::Addr, TXmlObjSer::GetBoolArg(), TPt< TRec >::MkRef(), and XLoadHd.

Referenced by IsXLoadFromFileOk(), and TVec< TVal, TSizeTy >::LoadXml().

                                                                 {
  XLoadHd(Nm);
  bool NullP=TXmlObjSer::GetBoolArg(XmlTok, "Null");
  if (NullP){
    Addr=NULL;
  } else {
    Addr=new TRec(); MkRef();
    Addr->LoadXml(XmlTok, "-");
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TRec>
void TPt< TRec >::MkRef ( ) const [inline, private]

Definition at line 464 of file bd.h.

Referenced by TPt< TRec >::LoadXml(), TPt< TFRnd >::operator=(), TPt< TFRnd >::TPt(), and TPt< TRec >::TPt().

                     {
    if (Addr!=NULL){
      Addr->CRef.MkRef();
    }
  }

Here is the caller graph for this function:

template<class TRec>
static TPt TPt< TRec >::New ( ) [inline, static]

Definition at line 479 of file bd.h.

Referenced by TPt< TFRnd >::New().

{return TObj::New();}

Here is the caller graph for this function:

template<class TRec>
bool TPt< TRec >::operator!= ( const TPt< TRec > &  Pt) const [inline]

Definition at line 490 of file bd.h.

{return *Addr!=*Pt.Addr;}
template<class TRec>
TRec* TPt< TRec >::operator() ( ) const [inline]

Definition at line 497 of file bd.h.

{return Addr;}
template<class TRec>
TRec& TPt< TRec >::operator* ( ) const [inline]

Definition at line 494 of file bd.h.

{Assert(Addr!=NULL); return *Addr;}
template<class TRec>
TRec* TPt< TRec >::operator-> ( ) const [inline]

Definition at line 493 of file bd.h.

{Assert(Addr!=NULL); return Addr;}
template<class TRec>
bool TPt< TRec >::operator< ( const TPt< TRec > &  Pt) const [inline]

Definition at line 491 of file bd.h.

{return *Addr<*Pt.Addr;}
template<class TRec>
TPt& TPt< TRec >::operator= ( const TPt< TRec > &  Pt) [inline]

Definition at line 487 of file bd.h.

                               {
    if (this!=&Pt){Pt.MkRef(); UnRef(); Addr=Pt.Addr;} return *this;}
template<class TRec>
bool TPt< TRec >::operator== ( const TPt< TRec > &  Pt) const [inline]

Definition at line 489 of file bd.h.

{return *Addr==*Pt.Addr;}
template<class TRec>
TRec& TPt< TRec >::operator[] ( const int &  RecN) const [inline]

Definition at line 495 of file bd.h.

                                          {
    Assert(Addr!=NULL); return Addr[RecN];}
template<class TRec >
void TPt< TRec >::Save ( TSOut SOut) const

Definition at line 16 of file xmlser.h.

References TPt< TRec >::Addr, and TBool::Save().

Referenced by TFHash< TKey, TFDat, TVDat >::AddKey(), TFHashKey< TKey, TFDat, TVDat >::OnDelFromCache(), TTimeNet::PlotMissingPast(), TExpHelpObj::Save(), TStrHash< TDat, TStringPool, THashFunc >::Save(), and TTimeNENet::TimeGrowth().

                                      {
    if (Addr==NULL){TBool(true).Save(SOut);}
    else {TBool(false).Save(SOut); Addr->Save(SOut);}}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TRec >
void TPt< TRec >::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 33 of file xmlser.h.

References TPt< TRec >::Addr, TBool::GetStr(), XSaveBETagArg, and XSaveHdArg.

                                                         {
  if (Addr==NULL){
    XSaveBETagArg(Nm, "Null", TBool::GetStr(true));
  } else {
    XSaveHdArg(Nm, "Null", TBool::GetStr(false));
    Addr->SaveXml(SOut, "-");
  }
}

Here is the call graph for this function:

template<class TRec>
void TPt< TRec >::UnRef ( ) const [inline, private]

Definition at line 469 of file bd.h.

Referenced by TPt< TFRnd >::Clr(), TPt< TFRnd >::operator=(), and TPt< TFRnd >::~TPt().

                     {
    if (Addr!=NULL){
      Addr->CRef.UnRef();
      if (Addr->CRef.NoRef()){delete Addr;}
    }
  }

Here is the caller graph for this function:


Member Data Documentation


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