| 
    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 | |
| TSIn () | |
| TSIn (const TStr &Str) | |
| virtual | ~TSIn () | 
| virtual bool | Eof ()=0 | 
| virtual int | Len () const =0 | 
| virtual char | GetCh ()=0 | 
| virtual char | PeekCh ()=0 | 
| virtual int | GetBf (const void *Bf, const TSize &BfL)=0 | 
| virtual bool | GetNextLnBf (TChA &LnChA)=0 | 
| virtual void | Reset () | 
| bool | IsFastMode () const | 
| void | SetFastMode (const bool &_FastMode) | 
| void | LoadCs () | 
| void | LoadBf (const void *Bf, const TSize &BfL) | 
| void * | LoadNewBf (const int &BfL) | 
| void | Load (bool &Bool) | 
| void | Load (uchar &UCh) | 
| void | Load (char &Ch) | 
| void | Load (short &Short) | 
| void | Load (ushort &UShort) | 
| void | Load (int &Int) | 
| void | Load (uint &UInt) | 
| void | Load (int64 &Int) | 
| void | Load (uint64 &UInt) | 
| void | Load (double &Flt) | 
| void | Load (sdouble &SFlt) | 
| void | Load (ldouble &LFlt) | 
| void | Load (char *&CStr, const int &MxCStrLen, const int &CStrLen) | 
| void | Load (char *&CStr) | 
| TSIn & | operator>> (bool &Bool) | 
| TSIn & | operator>> (uchar &UCh) | 
| TSIn & | operator>> (char &Ch) | 
| TSIn & | operator>> (short &Sh) | 
| TSIn & | operator>> (ushort &USh) | 
| TSIn & | operator>> (int &Int) | 
| TSIn & | operator>> (uint &UInt) | 
| TSIn & | operator>> (int64 &Int) | 
| TSIn & | operator>> (uint64 &UInt) | 
| TSIn & | operator>> (float &Flt) | 
| TSIn & | operator>> (double &Double) | 
| TSIn & | operator>> (long double &LDouble) | 
| bool | GetNextLn (TStr &LnStr) | 
| bool | GetNextLn (TChA &LnChA) | 
Static Public Attributes | |
| static const TPt< TSIn > | StdIn = PSIn(new TStdIn()) | 
Private Member Functions | |
| TSIn (const TSIn &) | |
| TSIn & | operator= (const TSIn &) | 
Private Attributes | |
| bool | FastMode | 
Friends | |
| class | TPt< TSIn > | 
| TSIn::TSIn | ( | const TSIn & | ) |  [private] | 
        
| TSIn::TSIn | ( | ) |  [inline] | 
        
| TSIn::TSIn | ( | const TStr & | Str | ) | 
| virtual TSIn::~TSIn | ( | ) |  [inline, virtual] | 
        
| virtual bool TSIn::Eof | ( | ) |  [pure virtual] | 
        
Implemented in TStrIn, TMIn, TFInOut, TChAIn, TFIn, TStdIn, TMemIn, and TZipIn.
Referenced by THtmlLx::GetCh(), TXmlLx::GetCh(), TILx::GetCh(), THttpLx::GetCh(), TPreproc::GetCh(), TXmlParser::GetCh(), TChRet::GetCh(), THttpLx::GetFirstCh(), GetNextLn(), THttpLx::GetRest(), TXmlParser::GetSym(), TNetInfBs::LoadCascadesTxt(), TNIBs::LoadCascadesTxt(), TNIBs::LoadGroundTruthNodesTxt(), TNetInfBs::LoadGroundTruthTxt(), TNIBs::LoadGroundTruthTxt(), TNIBs::LoadInferredNodesTxt(), TNIBs::LoadInferredTxt(), TSs::LoadTxt(), TWChA::LoadTxt(), TSs::LoadTxtFldV(), TLnRet::NextLn(), TSOut::operator<<(), and TSOut::Save().

| virtual int TSIn::GetBf | ( | const void * | Bf, | 
| const TSize & | BfL | ||
| ) |  [pure virtual] | 
        
Implemented in TStrIn, TMIn, TFInOut, TChAIn, TFIn, TStdIn, TMemIn, and TZipIn.
Referenced by TMd5::Add(), Load(), LoadBf(), LoadCs(), TInt::LoadFrugalIntV(), TMem::LoadMem(), LoadNewBf(), TChA::LoadTxt(), TMem::operator+=(), operator>>(), TFRnd::PutSIn(), and TStr::TStr().

| virtual char TSIn::GetCh | ( | ) |  [pure virtual] | 
        
Implemented in TStrIn, TMIn, TFInOut, TChAIn, TFIn, TStdIn, TMemIn, and TZipIn.
Referenced by THtmlLx::GetCh(), TXmlLx::GetCh(), TILx::GetCh(), THttpLx::GetCh(), TPreproc::GetCh(), TXmlParser::GetCh(), THttpChRet::GetCh(), TChRet::GetCh(), THttpLx::GetFirstCh(), GetNextLn(), TInt::LoadFrugalIntV(), TWCh::LoadTxt(), TSs::LoadTxt(), TSs::LoadTxtFldV(), TLnRet::NextLn(), TSOut::operator<<(), TSOut::Save(), TMIn::TMIn(), and TStrPool64::TStrPool64().

| bool TSIn::GetNextLn | ( | TStr & | LnStr | ) | 
Definition at line 43 of file fl.cpp.
Referenced by TNetInfBs::LoadCascadesTxt(), TNIBs::LoadCascadesTxt(), TNIBs::LoadGroundTruthNodesTxt(), TNetInfBs::LoadGroundTruthTxt(), TNIBs::LoadGroundTruthTxt(), TNIBs::LoadInferredNodesTxt(), TNIBs::LoadInferredTxt(), and TSsParser::NextSlow().

| bool TSIn::GetNextLn | ( | TChA & | LnChA | ) | 
Definition at line 50 of file fl.cpp.
References TChA::AddCh(), TChA::Clr(), TChA::Empty(), Eof(), GetCh(), and PeekCh().
                               {
  LnChA.Clr();
  while (!Eof()){
    const char Ch=GetCh();
    if (Ch=='\n'){return true;}
    if (Ch=='\r' && PeekCh()=='\n'){GetCh(); return true;}
    LnChA.AddCh(Ch);
  }
  return !LnChA.Empty();
}

| virtual bool TSIn::GetNextLnBf | ( | TChA & | LnChA | ) |  [pure virtual] | 
        
| bool TSIn::IsFastMode | ( | ) |  const [inline] | 
        
| virtual int TSIn::Len | ( | ) |  const [pure virtual] | 
        
Implemented in TStrIn, TMIn, TFInOut, TChAIn, TFIn, TStdIn, TMemIn, and TZipIn.
Referenced by TMd5::Add(), THttpLx::Len(), TMem::LoadMem(), TChA::LoadTxt(), TMem::operator+=(), TGBlobBs::PutBlob(), TFRnd::PutSIn(), THttpResp::THttpResp(), TMIn::TMIn(), and TStr::TStr().

| void TSIn::Load | ( | bool & | Bool | ) |  [inline] | 
        
Definition at line 84 of file fl.h.
References TSBase::Cs, and GetBf().
Referenced by TPackVec< TVal >::AddV(), TSparseGroup< TVal, GroupSize >::Load(), TSparseColMatrix::Load(), Load(), TSparseRowMatrix::Load(), TChA::Load(), TVec< TVal, TSizeTy >::Load(), TBool::Load(), TSInt::Load(), TUniChInfo::Load(), TInt::Load(), TUInt::Load(), TUInt64::Load(), TFlt::Load(), TPackVec< TVal >::Load(), TGLib_OLD::TVec< TVal >::Load(), TBigNet< TNodeData, IsDir >::LoadNodeDatH(), operator>>(), TBigStrPool::TBigStrPool(), TBlobPt::TBlobPt(), TBool::TBool(), TBSet::TBSet(), TCh::TCh(), TChA::TChA(), TFlt::TFlt(), TInt::TInt(), TLFlt::TLFlt(), TLst< TVal >::TLst(), TMem::TMem(), TRnd::TRnd(), TRStr::TRStr(), TSFlt::TSFlt(), TSInt::TSInt(), TStrPool::TStrPool(), TStrPool64::TStrPool64(), TUCh::TUCh(), TUInt::TUInt(), TUInt64::TUInt64(), TVecPool< TVal, TSizeTy >::TVecPool(), TGLib_OLD::TVecPool< TVal >::TVecPool(), and TWCh::TWCh().


| void TSIn::Load | ( | uchar & | UCh | ) |  [inline] | 
        
| void TSIn::Load | ( | char & | Ch | ) |  [inline] | 
        
| void TSIn::Load | ( | short & | Short | ) |  [inline] | 
        
| void TSIn::Load | ( | ushort & | UShort | ) |  [inline] | 
        
| void TSIn::Load | ( | int & | Int | ) |  [inline] | 
        
| void TSIn::Load | ( | uint & | UInt | ) |  [inline] | 
        
| void TSIn::Load | ( | int64 & | Int | ) |  [inline] | 
        
| void TSIn::Load | ( | uint64 & | UInt | ) |  [inline] | 
        
| void TSIn::Load | ( | double & | Flt | ) |  [inline] | 
        
| void TSIn::Load | ( | sdouble & | SFlt | ) |  [inline] | 
        
| void TSIn::Load | ( | ldouble & | LFlt | ) |  [inline] | 
        
| void TSIn::Load | ( | char *& | CStr, | 
| const int & | MxCStrLen, | ||
| const int & | CStrLen | ||
| ) |  [inline] | 
        
| void TSIn::Load | ( | char *& | CStr | ) | 
Definition at line 34 of file fl.cpp.
References TSBase::Cs, EAssertR, GetBf(), TSBase::GetSNm(), Load(), and TCh::NullCh.
                          {
  char Ch; Load(Ch);
  int CStrLen=int(Ch);
  EAssertR(CStrLen>=0, "Error reading stream '"+GetSNm()+"'.");
  CStr=new char[CStrLen+1];
  if (CStrLen>0){Cs+=GetBf(CStr, CStrLen);}
  CStr[CStrLen]=TCh::NullCh;
}

| void TSIn::LoadBf | ( | const void * | Bf, | 
| const TSize & | BfL | ||
| ) |  [inline] | 
        
Definition at line 81 of file fl.h.
References TSBase::Cs, and GetBf().
Referenced by TPackVec< TVal >::AddV(), TSparseGroup< TVal, GroupSize >::Load(), TPackVec< TVal >::Load(), TUniChInfo::LoadSChar(), TUniChInfo::LoadUShort(), TB32Set::TB32Set(), TB8Set::TB8Set(), TBigStrPool::TBigStrPool(), TBSet::TBSet(), TMd5Sig::TMd5Sig(), TMem::TMem(), and TStrPool::TStrPool().


| void TSIn::LoadCs | ( | ) | 
Definition at line 28 of file fl.cpp.
References TSBase::Cs, EAssertR, GetBf(), and TSBase::GetSNm().
Referenced by THash< TIntPr, TEdgeInfo >::Load(), TUniCaseFolding::Load(), TStrHash< TDat, TStringPool, THashFunc >::Load(), THashSet< TInt >::Load(), TUniChDb::Load(), TBigStrPool::TBigStrPool(), THash< TIntPr, TEdgeInfo >::THash(), THashSet< TInt >::THashSet(), TStrHash< TDat, TStringPool, THashFunc >::TStrHash(), TStrPool::TStrPool(), TStrPool64::TStrPool64(), and TUniCaseFolding::TUniCaseFolding().
                 {
  TCs CurCs=Cs; TCs TestCs;
  Cs+=GetBf(&TestCs, sizeof(TestCs));
  EAssertR(CurCs==TestCs, "Invalid checksum reading '"+GetSNm()+"'.");
}


| void* TSIn::LoadNewBf | ( | const int & | BfL | ) |  [inline] | 
        
Definition at line 82 of file fl.h.
References TSBase::Cs, and GetBf().
Referenced by TBSet::TBSet().


| TSIn& TSIn::operator>> | ( | bool & | Bool | ) |  [inline] | 
        
| TSIn& TSIn::operator>> | ( | char & | Ch | ) |  [inline] | 
        
| TSIn& TSIn::operator>> | ( | short & | Sh | ) |  [inline] | 
        
| TSIn& TSIn::operator>> | ( | int & | Int | ) |  [inline] | 
        
| TSIn& TSIn::operator>> | ( | float & | Flt | ) |  [inline] | 
        
| TSIn& TSIn::operator>> | ( | double & | Double | ) |  [inline] | 
        
| TSIn& TSIn::operator>> | ( | long double & | LDouble | ) |  [inline] | 
        
| virtual char TSIn::PeekCh | ( | ) |  [pure virtual] | 
        
Implemented in TStrIn, TMIn, TFInOut, TChAIn, TFIn, TStdIn, TMemIn, and TZipIn.
Referenced by GetNextLn(), and TXmlParser::GetSym().

| virtual void TSIn::Reset | ( | ) |  [inline, virtual] | 
        
| void TSIn::SetFastMode | ( | const bool & | _FastMode | ) |  [inline] | 
        
bool TSIn::FastMode [private] | 
        
Definition at line 60 of file fl.h.
Referenced by IsFastMode(), and SetFastMode().