SNAP Library, Developer Reference  2012-10-02 12:56:23
SNAP, a general purpose network analysis and graph mining library
 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 456 of file bd.h.


Member Typedef Documentation

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

Definition at line 458 of file bd.h.


Constructor & Destructor Documentation

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

Definition at line 473 of file bd.h.

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

Definition at line 474 of file bd.h.

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

Definition at line 475 of file bd.h.

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

Definition at line 477 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, IsNull(), Load(), 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, IsNull(), Load(), 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 506 of file bd.h.

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

Definition at line 499 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 503 of file bd.h.

{return Addr->GetPrimHashCd();}
template<class TRec>
int TPt< TRec >::GetRefs ( ) const [inline]

Definition at line 500 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 504 of file bd.h.

{return Addr->GetSecHashCd();}
template<class TRec >
void TPt< TRec >::LoadXml ( const TPt< TXmlTok > &  XmlTok,
const TStr Nm 
)

Definition at line 21 of file xmlser.h.

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

Referenced by IsXLoadFromFileOk(), and TVec< TVal >::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 461 of file bd.h.

Referenced by TPt< TRec >::LoadXml(), TPt< TSIn >::operator=(), TPt< TSIn >::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 476 of file bd.h.

Referenced by TPt< TSIn >::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 487 of file bd.h.

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

Definition at line 494 of file bd.h.

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

Definition at line 491 of file bd.h.

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

Definition at line 490 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 488 of file bd.h.

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

Definition at line 484 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 486 of file bd.h.

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

Definition at line 492 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 Addr, and TBool::Save().

Referenced by TFHash< TKey, TFDat, TVDat >::AddKey(), TTimeNet::PlotMissingPast(), 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 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 466 of file bd.h.

Referenced by TPt< TSIn >::Clr(), TPt< TSIn >::operator=(), and TPt< TSIn >::~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: