SNAP Library , User Reference
2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <exp.h>
Public Member Functions | |
TExpHelp () | |
~TExpHelp () | |
TExpHelp (TSIn &SIn) | |
void | Save (TSOut &SOut) const |
TExpHelp & | operator= (const TExpHelp &) |
bool | operator== (const TExpHelp &) const |
void | AddObj (const PExpHelpObj &Obj) |
void | GetCatNmV (TStrV &CatNmV) const |
void | GetObjHdNmV (const TStr &CatNm, TStrV &ObjHdNmV) const |
PExpHelpObj | GetObj (const TStr &ObjNm) const |
Static Public Member Functions | |
static PExpHelp | New () |
static PExpHelp | Load (TSIn &SIn) |
static PExpHelp | LoadXml (const PSIn &SIn) |
static PExpHelp | LoadXml (const TStr &FNm) |
Private Attributes | |
TCRef | CRef |
TExpHelpObjV | ObjV |
Friends | |
class | TPt< TExpHelp > |
TExpHelp::TExpHelp | ( | ) | [inline] |
TExpHelp::~TExpHelp | ( | ) | [inline] |
TExpHelp::TExpHelp | ( | TSIn & | SIn | ) | [inline] |
void TExpHelp::AddObj | ( | const PExpHelpObj & | Obj | ) | [inline] |
void TExpHelp::GetCatNmV | ( | TStrV & | CatNmV | ) | const |
PExpHelpObj TExpHelp::GetObj | ( | const TStr & | ObjNm | ) | const |
void TExpHelp::GetObjHdNmV | ( | const TStr & | CatNm, |
TStrV & | ObjHdNmV | ||
) | const |
static PExpHelp TExpHelp::Load | ( | TSIn & | SIn | ) | [inline, static] |
PExpHelp TExpHelp::LoadXml | ( | const PSIn & | SIn | ) | [static] |
Definition at line 1084 of file exp.cpp.
{ // create expression help PExpHelp ExpHelp=TExpHelp::New(); // load xml with expression help PXmlDoc Doc=TXmlDoc::LoadTxt(SIn); // retrieve objects TXmlTokV ObjTokV; Doc->GetTagTokV("ExpHelp|Obj", ObjTokV); for (int ObjTokN=0; ObjTokN<ObjTokV.Len(); ObjTokN++){ PXmlTok ObjTok=ObjTokV[ObjTokN]; // type TStr TypeStr=ObjTok->GetTagTok("Type")->GetTokStr(false); // category TStr CatNm=ObjTok->GetTagTok("Cat")->GetTokStr(false); // header TStr HdNm=ObjTok->GetTagTok("Head|Name")->GetTokStr(false); TStr HdTypeStr=ObjTok->GetTagTok("Head|Type")->GetTokStr(false); TStr HdDescStr=ObjTok->GetTagTok("Head|Desc")->GetTokStr(false); PExpHelpItem HdItem= TExpHelpItem::New(HdNm, HdTypeStr, HdDescStr, ""); // arguments TXmlTokV ArgTokV; ObjTok->GetTagTokV("Args|Arg", ArgTokV); TExpHelpItemV ArgItemV; for (int ArgTokN=0; ArgTokN<ArgTokV.Len(); ArgTokN++){ PXmlTok ArgTok=ArgTokV[ArgTokN]; // argument TStr ArgNm=ArgTok->GetTagTok("Name")->GetTokStr(false); TStr ArgTypeStr=ArgTok->GetTagTok("Type")->GetTokStr(false); TStr ArgDescStr=ArgTok->GetTagTok("Desc")->GetTokStr(false); TStr ArgDfValStr=ArgTok->GetTagTok("Default")->GetTokStr(false); PExpHelpItem ArgItem= TExpHelpItem::New(ArgNm, ArgTypeStr, ArgDescStr, ArgDfValStr); ArgItemV.Add(ArgItem); } // create & add object TExpHelpObjType Type=TExpHelpObj::GetObjTypeFromStr(TypeStr); PExpHelpObj Obj=TExpHelpObj::New(Type, CatNm, HdItem, ArgItemV); ExpHelp->AddObj(Obj); } // return result return ExpHelp; }
static PExpHelp TExpHelp::LoadXml | ( | const TStr & | FNm | ) | [inline, static] |
static PExpHelp TExpHelp::New | ( | ) | [inline, static] |
bool TExpHelp::operator== | ( | const TExpHelp & | ) | const [inline] |
void TExpHelp::Save | ( | TSOut & | SOut | ) | const [inline] |
TCRef TExpHelp::CRef [private] |
TExpHelpObjV TExpHelp::ObjV [private] |