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
xmlser.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class TRec >
bool IsXLoadFromFileOk (const TStr &FNm, const TStr &Nm, TRec &Rec, TStr &MsgStr)
template<class TRec >
void XLoadFromFile (const TStr &FNm, const TStr &Nm, TRec &Rec)

Function Documentation

template<class TRec >
bool IsXLoadFromFileOk ( const TStr FNm,
const TStr Nm,
TRec &  Rec,
TStr MsgStr 
)

Definition at line 45 of file xmlser.h.

References TXmlDoc::LoadTxt(), and TPt< TRec >::LoadXml().

Referenced by XLoadFromFile().

                                                                                {
  bool Ok=true;
  try {
    PXmlDoc XmlDoc=TXmlDoc::LoadTxt(FNm);
    if (XmlDoc->IsOk()){
      PXmlTok XmlTok=XmlDoc->GetTok();
      Rec.LoadXml(XmlTok, Nm);
    } else {
      Ok=false; MsgStr=XmlDoc->GetMsgStr();
    }
  }
  catch (PExcept Except){
    Ok=false; MsgStr=Except->GetMsgStr();
  }
  return Ok;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TRec >
void XLoadFromFile ( const TStr FNm,
const TStr Nm,
TRec &  Rec 
)

Definition at line 63 of file xmlser.h.

References IsXLoadFromFileOk(), and TExcept::Throw().

                                                              {
  TStr MsgStr;
  if (!IsXLoadFromFileOk(FNm, Nm, Rec, MsgStr)){
    TExcept::Throw(MsgStr);
  }
}

Here is the call graph for this function: