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
|
#include <fl.h>
Public Member Functions | |
TSOut () | |
TSOut (const TStr &Str) | |
virtual | ~TSOut () |
void | EnableLnTrunc (const int &_MxLnLen) |
void | DisableLnTrunc () |
virtual int | PutCh (const char &Ch)=0 |
virtual int | PutBf (const void *LBf, const TSize &LBfL)=0 |
virtual void | Flush ()=0 |
virtual TFileId | GetFileId () const |
int | PutMem (const TMem &Mem) |
int | PutCh (const char &Ch, const int &Chs) |
int | PutBool (const bool &Bool) |
int | PutInt (const int &Int) |
int | PutInt (const int &Int, const char *FmtStr) |
int | PutUInt (const uint &Int) |
int | PutUInt (const uint &Int, const char *FmtStr) |
int | PutFlt (const double &Flt) |
int | PutFlt (const double &Flt, const char *FmtStr) |
int | PutStr (const char *CStr) |
int | PutStr (const TChA &ChA) |
int | PutStr (const TStr &Str, const char *FmtStr) |
int | PutStr (const TStr &Str, const bool &ForceInLn=false) |
int | PutStrLn (const TStr &Str, const bool &ForceInLn=false) |
int | PutStrFmt (const char *FmtStr,...) |
int | PutStrFmtLn (const char *FmtStr,...) |
int | PutIndent (const int &IndentLev=1) |
int | PutLn (const int &Lns=1) |
int | PutDosLn (const int &Lns=1) |
int | PutSep (const int &NextStrLen=0) |
int | PutSepLn (const int &Lns=0) |
void | SaveCs () |
void | SaveBf (const void *Bf, const TSize &BfL) |
void | Save (const bool &Bool) |
void | Save (const char &Ch) |
void | Save (const uchar &UCh) |
void | Save (const short &Short) |
void | Save (const ushort &UShort) |
void | Save (const int &Int) |
void | Save (const uint &UInt) |
void | Save (const int64 &Int) |
void | Save (const uint64 &UInt) |
void | Save (const double &Flt) |
void | Save (const sdouble &SFlt) |
void | Save (const ldouble &LFlt) |
void | Save (const char *CStr, const TSize &CStrLen) |
void | Save (const char *CStr) |
void | Save (TSIn &SIn, const TSize &BfL=-1) |
void | Save (const PSIn &SIn, const TSize &BfL=-1) |
void | Save (const void *Bf, const TSize &BfL) |
TSOut & | operator<< (const bool &Bool) |
TSOut & | operator<< (const uchar &UCh) |
TSOut & | operator<< (const char &Ch) |
TSOut & | operator<< (const short &Sh) |
TSOut & | operator<< (const ushort &USh) |
TSOut & | operator<< (const int &Int) |
TSOut & | operator<< (const uint &Int) |
TSOut & | operator<< (const int64 &Int) |
TSOut & | operator<< (const uint64 &UInt) |
TSOut & | operator<< (const float &Flt) |
TSOut & | operator<< (const double &Double) |
TSOut & | operator<< (const long double &LDouble) |
TSOut & | operator<< (const TSOutMnp &Mnp) |
TSOut & | operator<< (TSOut &(*FuncPt)(TSOut &)) |
TSOut & | operator<< (TSIn &SIn) |
TSOut & | operator<< (PSIn &SIn) |
Static Public Attributes | |
static const TPt< TSOut > | StdOut = PSOut(new TStdOut()) |
Private Member Functions | |
int | UpdateLnLen (const int &StrLen, const bool &ForceInLn=false) |
TSOut (const TSIn &) | |
TSOut & | operator= (const TSOut &) |
Private Attributes | |
int | MxLnLen |
int | LnLen |
Friends | |
class | TPt< TSOut > |
TSOut::TSOut | ( | const TSIn & | ) | [private] |
TSOut::TSOut | ( | ) | [inline] |
TSOut::TSOut | ( | const TStr & | Str | ) |
virtual TSOut::~TSOut | ( | ) | [inline, virtual] |
void TSOut::DisableLnTrunc | ( | ) | [inline] |
void TSOut::EnableLnTrunc | ( | const int & | _MxLnLen | ) | [inline] |
virtual void TSOut::Flush | ( | ) | [pure virtual] |
Implemented in TMOut, TFInOut, TFOut, TStdOut, TMemOut, and TZipOut.
Referenced by TFPathNotify::OnStatus(), TLAMisc::SaveMatlabTFltV(), TLAMisc::SaveMatlabTFltVV(), TLAMisc::SaveMatlabTFltVVCol(), TLAMisc::SaveMatlabTFltVVMjrSubMtrx(), TLAMisc::SaveMatlabTIntV(), and TFPathNotify::UpdateSOut().
virtual TFileId TSOut::GetFileId | ( | ) | const [inline, virtual] |
Reimplemented in TFInOut, and TFOut.
Definition at line 146 of file fl.h.
Referenced by THtmlDoc::SaveHtmlToXml().
{return NULL;}
TSOut& TSOut::operator<< | ( | const bool & | Bool | ) | [inline] |
TSOut& TSOut::operator<< | ( | const char & | Ch | ) | [inline] |
TSOut& TSOut::operator<< | ( | const short & | Sh | ) | [inline] |
TSOut& TSOut::operator<< | ( | const int & | Int | ) | [inline] |
TSOut& TSOut::operator<< | ( | const float & | Flt | ) | [inline] |
TSOut& TSOut::operator<< | ( | const double & | Double | ) | [inline] |
TSOut& TSOut::operator<< | ( | const long double & | LDouble | ) | [inline] |
Definition at line 205 of file fl.cpp.
References TSIn::Eof(), and TSIn::GetCh().
Definition at line 206 of file fl.h.
References operator<<().
Referenced by operator<<().
{return operator<<(*SIn);}
virtual int TSOut::PutBf | ( | const void * | LBf, |
const TSize & | LBfL | ||
) | [pure virtual] |
int TSOut::PutBool | ( | const bool & | Bool | ) |
Definition at line 89 of file fl.cpp.
References TBool::GetStr(), and PutStr().
{ return PutStr(TBool::GetStr(Bool)); }
virtual int TSOut::PutCh | ( | const char & | Ch | ) | [pure virtual] |
Implemented in TMOut, TFInOut, TFOut, TStdOut, TMemOut, and TZipOut.
Referenced by TOLx::GetSOut(), PutCh(), PutDosLn(), TOLx::PutDosLn(), PutIndent(), TOLx::PutIndent(), PutLn(), TOLx::PutLn(), TOLx::PutQStr(), PutSep(), TOLx::PutSep(), TOLx::PutStr(), TOLx::PutTab(), TStrPool64::Save(), TLAMisc::SaveCsvTFltV(), TLAMisc::SaveMatlabTFltV(), TLAMisc::SaveMatlabTFltVV(), TLAMisc::SaveMatlabTFltVVCol(), TLAMisc::SaveMatlabTFltVVMjrSubMtrx(), TLAMisc::SaveMatlabTIntV(), TWCh::SaveTxt(), TSs::SaveTxt(), TPreproc::TPreproc(), TXmlObjSerTagNm::TXmlObjSerTagNm(), and TXmlObjSerTagNm::~TXmlObjSerTagNm().
int TSOut::PutCh | ( | const char & | Ch, |
const int & | Chs | ||
) |
int TSOut::PutDosLn | ( | const int & | Lns = 1 | ) |
Definition at line 164 of file fl.cpp.
References TCh::CrCh, TSBase::Cs, TCh::LfCh, LnLen, and PutCh().
Referenced by TOLx::PutDosLn().
{ LnLen=0; int Cs=0; for (int LnN=0; LnN<Lns; LnN++){Cs+=PutCh(TCh::CrCh)+PutCh(TCh::LfCh);} return Cs; }
int TSOut::PutFlt | ( | const double & | Flt | ) |
Definition at line 109 of file fl.cpp.
References TFlt::GetStr(), and PutStr().
Referenced by TLAMisc::SaveCsvTFltV().
{ return PutStr(TFlt::GetStr(Flt)); }
int TSOut::PutFlt | ( | const double & | Flt, |
const char * | FmtStr | ||
) |
Definition at line 113 of file fl.cpp.
References TFlt::GetStr(), and PutStr().
{ return PutStr(TFlt::GetStr(Flt, FmtStr)); }
int TSOut::PutIndent | ( | const int & | IndentLev = 1 | ) |
int TSOut::PutInt | ( | const int & | Int | ) |
Definition at line 93 of file fl.cpp.
References TInt::GetStr(), and PutStr().
Referenced by TLAMisc::SaveMatlabTIntV().
{ return PutStr(TInt::GetStr(Int)); }
int TSOut::PutInt | ( | const int & | Int, |
const char * | FmtStr | ||
) |
Definition at line 97 of file fl.cpp.
References TInt::GetStr(), and PutStr().
{ return PutStr(TInt::GetStr(Int, FmtStr)); }
int TSOut::PutLn | ( | const int & | Lns = 1 | ) |
Definition at line 158 of file fl.cpp.
References TSBase::Cs, LnLen, and PutCh().
Referenced by TOLx::PutLn(), PutSep(), PutSepLn(), PutStrFmtLn(), PutStrLn(), TLAMisc::SaveCsvTFltV(), THtmlDoc::SaveTxt(), and UpdateLnLen().
int TSOut::PutMem | ( | const TMem & | Mem | ) |
int TSOut::PutSep | ( | const int & | NextStrLen = 0 | ) |
int TSOut::PutSepLn | ( | const int & | Lns = 0 | ) |
int TSOut::PutStr | ( | const char * | CStr | ) |
Definition at line 117 of file fl.cpp.
References TSBase::Cs, PutBf(), and UpdateLnLen().
Referenced by THtmlDoc::GetRedirHtmlDocStr(), THttpResp::GetSIn(), PutBool(), TOLx::PutBool(), PutFlt(), TOLx::PutFlt(), TOLx::PutIdStr(), PutInt(), TOLx::PutInt(), TOLx::PutQStr(), PutStr(), TOLx::PutStr(), PutStrFmt(), PutStrLn(), TOLx::PutSym(), PutUInt(), TOLx::PutUQStr(), TNetInfBs::SaveCascades(), TNIBs::SaveCascades(), TNetInfBs::SaveGroundTruth(), TNIBs::SaveGroundTruth(), TNIBs::SaveGroundTruthPajek(), TNIBs::SaveInferred(), TNIBs::SaveInferredEdges(), TNIBs::SaveInferredPajek(), TLAMisc::SaveMatlabTFltV(), TLAMisc::SaveMatlabTFltVV(), TLAMisc::SaveMatlabTFltVVCol(), TLAMisc::SaveMatlabTFltVVMjrSubMtrx(), TNIBs::SaveSites(), TSs::SaveTxt(), THtmlTok::SaveTxt(), THtmlDoc::SaveTxt(), TXmlDoc::SaveTxt(), TMem::SaveXml(), TChA::SaveXml(), TStr::SaveXml(), TPreproc::TPreproc(), TXmlObjSerTagNm::TXmlObjSerTagNm(), and TXmlObjSerTagNm::~TXmlObjSerTagNm().
{ int Cs=UpdateLnLen(int(strlen(CStr))); return Cs+PutBf(CStr, int(strlen(CStr))); }
int TSOut::PutStr | ( | const TChA & | ChA | ) |
Definition at line 122 of file fl.cpp.
References TSBase::Cs, TChA::CStr(), TChA::Len(), PutBf(), and UpdateLnLen().
int TSOut::PutStr | ( | const TStr & | Str, |
const char * | FmtStr | ||
) |
Definition at line 127 of file fl.cpp.
References TStr::GetStr(), and PutStr().
{ return PutStr(TStr::GetStr(Str, FmtStr)); }
int TSOut::PutStr | ( | const TStr & | Str, |
const bool & | ForceInLn = false |
||
) |
Definition at line 131 of file fl.cpp.
References TSBase::Cs, TStr::CStr(), TStr::Len(), PutBf(), and UpdateLnLen().
int TSOut::PutStrFmt | ( | const char * | FmtStr, |
... | |||
) |
int TSOut::PutStrFmtLn | ( | const char * | FmtStr, |
... | |||
) |
Definition at line 145 of file fl.cpp.
References PutLn(), and PutStrLn().
{ char Bf[10*1024]; va_list valist; va_start(valist, FmtStr); const int RetVal=vsnprintf(Bf, 10*1024-2, FmtStr, valist); va_end(valist); return RetVal!=-1 ? PutStrLn(TStr(Bf)) : PutLn(); }
int TSOut::PutStrLn | ( | const TStr & | Str, |
const bool & | ForceInLn = false |
||
) | [inline] |
Definition at line 161 of file fl.h.
References TSBase::Cs, PutLn(), and PutStr().
Referenced by TFPathNotify::OnStatus(), PutStrFmtLn(), TLAMisc::SaveMatlabTFltIntKdV(), and THist::SaveStat().
int TSOut::PutUInt | ( | const uint & | Int | ) |
Definition at line 101 of file fl.cpp.
References TUInt::GetStr(), and PutStr().
{ return PutStr(TUInt::GetStr(UInt)); }
int TSOut::PutUInt | ( | const uint & | Int, |
const char * | FmtStr | ||
) |
Definition at line 105 of file fl.cpp.
References TUInt::GetStr(), and PutStr().
{ return PutStr(TUInt::GetStr(UInt, FmtStr)); }
void TSOut::Save | ( | const bool & | Bool | ) | [inline] |
Definition at line 173 of file fl.h.
References TSBase::Cs, and PutBf().
Referenced by operator<<(), TWCh::Save(), TRnd::Save(), TKeyDatFl< TKey, TDat, THashFunc >::Save(), TBlobPt::Save(), TBigNet< TNodeData, IsDir >::TNode::Save(), TEdgeInfo::Save(), TSparseGroup< TVal, GroupSize >::Save(), TSparseColMatrix::Save(), TMem::Save(), TSparseRowMatrix::Save(), Save(), TChA::Save(), TBSet::Save(), TRStr::Save(), TVec< TVal, TSizeTy >::Save(), TBigStrPool::Save(), TStrPool::Save(), TStrPool64::Save(), TBool::Save(), TCh::Save(), TUCh::Save(), TSInt::Save(), TUniChInfo::Save(), TInt::Save(), TUInt::Save(), TUInt64::Save(), TFlt::Save(), TPackVec< TVal >::Save(), TSFlt::Save(), TLFlt::Save(), TGLib_OLD::TVec< TVal >::Save(), TVecPool< TVal, TSizeTy >::Save(), TGLib_OLD::TVecPool< TVal >::Save(), TLst< TVal >::Save(), TBigNet< TNodeData, IsDir >::SaveForDisk(), and TFHash< TKey, TFDat, TVDat >::~TFHash().
void TSOut::Save | ( | const char & | Ch | ) | [inline] |
void TSOut::Save | ( | const uchar & | UCh | ) | [inline] |
void TSOut::Save | ( | const short & | Short | ) | [inline] |
void TSOut::Save | ( | const ushort & | UShort | ) | [inline] |
void TSOut::Save | ( | const int & | Int | ) | [inline] |
void TSOut::Save | ( | const uint & | UInt | ) | [inline] |
void TSOut::Save | ( | const int64 & | Int | ) | [inline] |
void TSOut::Save | ( | const uint64 & | UInt | ) | [inline] |
void TSOut::Save | ( | const double & | Flt | ) | [inline] |
void TSOut::Save | ( | const sdouble & | SFlt | ) | [inline] |
void TSOut::Save | ( | const ldouble & | LFlt | ) | [inline] |
void TSOut::Save | ( | const char * | CStr, |
const TSize & | CStrLen | ||
) | [inline] |
void TSOut::Save | ( | const char * | CStr | ) |
Definition at line 189 of file fl.cpp.
References TSBase::Cs, EAssertR, TSBase::GetSNm(), PutBf(), and Save().
{ int CStrLen=int(strlen(CStr)); EAssertR(CStrLen<=127, "Error writting stream '"+GetSNm()+"'."); Save(char(CStrLen)); if (CStrLen>0){Cs+=PutBf(CStr, CStrLen);} }
void TSOut::Save | ( | TSIn & | SIn, |
const TSize & | BfL = -1 |
||
) |
void TSOut::Save | ( | const PSIn & | SIn, |
const TSize & | BfL = -1 |
||
) | [inline] |
void TSOut::Save | ( | const void * | Bf, |
const TSize & | BfL | ||
) | [inline] |
void TSOut::SaveBf | ( | const void * | Bf, |
const TSize & | BfL | ||
) | [inline] |
Definition at line 172 of file fl.h.
References TSBase::Cs, and PutBf().
Referenced by TMem::GetSIn(), TSparseGroup< TVal, GroupSize >::Save(), TMd5Sig::Save(), TMem::Save(), TB8Set::Save(), TB32Set::Save(), TBSet::Save(), TBigStrPool::Save(), TStrPool::Save(), TPackVec< TVal >::Save(), TMem::SaveMem(), TUniChInfo::SaveSChar(), TChA::SaveTxt(), TStr::SaveTxt(), and TUniChInfo::SaveUShort().
void TSOut::SaveCs | ( | ) | [inline] |
Definition at line 171 of file fl.h.
References TSBase::Cs, and PutBf().
Referenced by THash< TIntPr, TEdgeInfo >::Save(), TUniCaseFolding::Save(), TBigStrPool::Save(), TStrHash< TDat, TStringPool, THashFunc >::Save(), TStrPool::Save(), TStrPool64::Save(), THashSet< TInt >::Save(), and TUniChDb::Save().
int TSOut::UpdateLnLen | ( | const int & | StrLen, |
const bool & | ForceInLn = false |
||
) | [private] |
Definition at line 70 of file fl.cpp.
References TSBase::Cs, LnLen, MxLnLen, and PutLn().
Referenced by PutStr().
{ int Cs=0; if (MxLnLen!=-1){ if ((!ForceInLn)&&(LnLen+StrLen>MxLnLen)){Cs+=PutLn();} LnLen+=StrLen; } return Cs; }
int TSOut::LnLen [private] |
Definition at line 130 of file fl.h.
Referenced by PutDosLn(), PutLn(), PutSep(), PutSepLn(), and UpdateLnLen().
int TSOut::MxLnLen [private] |
Definition at line 130 of file fl.h.
Referenced by DisableLnTrunc(), EnableLnTrunc(), PutSep(), and UpdateLnLen().
const PSOut TSOut::StdOut = PSOut(new TStdOut()) [static] |
Definition at line 208 of file fl.h.
Referenced by THtmlHldV::THtmlHldV().