SNAP Library 2.2, Developer Reference  2014-03-11 19:15:55
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
TSIn Class Reference

#include <fl.h>

Inheritance diagram for TSIn:
Collaboration diagram for TSIn:

List of all members.

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)
TSInoperator>> (bool &Bool)
TSInoperator>> (uchar &UCh)
TSInoperator>> (char &Ch)
TSInoperator>> (short &Sh)
TSInoperator>> (ushort &USh)
TSInoperator>> (int &Int)
TSInoperator>> (uint &UInt)
TSInoperator>> (int64 &Int)
TSInoperator>> (uint64 &UInt)
TSInoperator>> (float &Flt)
TSInoperator>> (double &Double)
TSInoperator>> (long double &LDouble)
bool GetNextLn (TStr &LnStr)
bool GetNextLn (TChA &LnChA)

Static Public Attributes

static const TPt< TSInStdIn = PSIn(new TStdIn())

Private Member Functions

 TSIn (const TSIn &)
TSInoperator= (const TSIn &)

Private Attributes

bool FastMode

Friends

class TPt< TSIn >

Detailed Description

Definition at line 58 of file fl.h.


Constructor & Destructor Documentation

TSIn::TSIn ( const TSIn ) [private]
TSIn::TSIn ( ) [inline]

Definition at line 65 of file fl.h.

: TSBase("Input-Stream"), FastMode(false){}
TSIn::TSIn ( const TStr Str)

Definition at line 26 of file fl.cpp.

: TSBase(Str.CStr()), FastMode(false){}
virtual TSIn::~TSIn ( ) [inline, virtual]

Definition at line 67 of file fl.h.

{}

Member Function Documentation

virtual int TSIn::GetBf ( const void *  Bf,
const TSize BfL 
) [pure virtual]
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().

                               {
  TChA LnChA;
  const bool IsNext=GetNextLn(LnChA);
  LnStr=LnChA;
  return IsNext;
}

Here is the caller graph for this function:

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();
}

Here is the call graph for this function:

virtual bool TSIn::GetNextLnBf ( TChA LnChA) [pure virtual]

Implemented in TStrIn, TMIn, TFInOut, TChAIn, TFIn, TStdIn, TMemIn, and TZipIn.

Referenced by TSsParser::Next().

Here is the caller graph for this function:

bool TSIn::IsFastMode ( ) const [inline]

Definition at line 77 of file fl.h.

References FastMode.

{return FastMode;}
virtual int TSIn::Len ( ) const [pure virtual]
void TSIn::Load ( uchar UCh) [inline]

Definition at line 85 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&UCh, sizeof(UCh));}

Here is the call graph for this function:

void TSIn::Load ( char &  Ch) [inline]

Definition at line 86 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&Ch, sizeof(Ch));}

Here is the call graph for this function:

void TSIn::Load ( short &  Short) [inline]

Definition at line 87 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&Short, sizeof(Short));} //J:

Here is the call graph for this function:

void TSIn::Load ( ushort UShort) [inline]

Definition at line 88 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&UShort, sizeof(UShort));} //J:

Here is the call graph for this function:

void TSIn::Load ( int &  Int) [inline]

Definition at line 89 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&Int, sizeof(Int));}

Here is the call graph for this function:

void TSIn::Load ( uint UInt) [inline]

Definition at line 90 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&UInt, sizeof(UInt));}

Here is the call graph for this function:

void TSIn::Load ( int64 Int) [inline]

Definition at line 91 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&Int, sizeof(Int));}

Here is the call graph for this function:

void TSIn::Load ( uint64 UInt) [inline]

Definition at line 92 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&UInt, sizeof(UInt));}

Here is the call graph for this function:

void TSIn::Load ( double &  Flt) [inline]

Definition at line 93 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&Flt, sizeof(Flt));}

Here is the call graph for this function:

void TSIn::Load ( sdouble SFlt) [inline]

Definition at line 94 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&SFlt, sizeof(SFlt));}

Here is the call graph for this function:

void TSIn::Load ( ldouble LFlt) [inline]

Definition at line 95 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&LFlt, sizeof(LFlt));}

Here is the call graph for this function:

void TSIn::Load ( char *&  CStr,
const int &  MxCStrLen,
const int &  CStrLen 
) [inline]

Definition at line 96 of file fl.h.

References TSBase::Cs, and GetBf().

                                                                  {
    CStr=new char[MxCStrLen+1]; Cs+=GetBf(CStr, CStrLen+1);}

Here is the call graph for this function:

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;
}

Here is the call graph for this function:

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().

{Cs+=GetBf(Bf, BfL);}

Here is the call graph for this function:

Here is the caller graph for this function:

void* TSIn::LoadNewBf ( const int &  BfL) [inline]

Definition at line 82 of file fl.h.

References TSBase::Cs, and GetBf().

Referenced by TBSet::TBSet().

                                 {
    void* Bf=(void*)new char[BfL]; Cs+=GetBf(Bf, BfL); return Bf;}

Here is the call graph for this function:

Here is the caller graph for this function:

TSIn& TSIn::operator= ( const TSIn ) [private]
TSIn& TSIn::operator>> ( bool &  Bool) [inline]

Definition at line 100 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&Bool, sizeof(Bool)); return *this;}

Here is the call graph for this function:

TSIn& TSIn::operator>> ( uchar UCh) [inline]

Definition at line 101 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&UCh, sizeof(UCh)); return *this;}

Here is the call graph for this function:

TSIn& TSIn::operator>> ( char &  Ch) [inline]

Definition at line 102 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&Ch, sizeof(Ch)); return *this;}

Here is the call graph for this function:

TSIn& TSIn::operator>> ( short &  Sh) [inline]

Definition at line 103 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&Sh, sizeof(Sh)); return *this;}

Here is the call graph for this function:

TSIn& TSIn::operator>> ( ushort USh) [inline]

Definition at line 104 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&USh, sizeof(USh)); return *this;}

Here is the call graph for this function:

TSIn& TSIn::operator>> ( int &  Int) [inline]

Definition at line 105 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&Int, sizeof(Int)); return *this;}

Here is the call graph for this function:

TSIn& TSIn::operator>> ( uint UInt) [inline]

Definition at line 106 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&UInt, sizeof(UInt)); return *this;}

Here is the call graph for this function:

TSIn& TSIn::operator>> ( int64 Int) [inline]

Definition at line 107 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&Int, sizeof(Int)); return *this;}

Here is the call graph for this function:

TSIn& TSIn::operator>> ( uint64 UInt) [inline]

Definition at line 108 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&UInt, sizeof(UInt)); return *this;}

Here is the call graph for this function:

TSIn& TSIn::operator>> ( float &  Flt) [inline]

Definition at line 109 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&Flt, sizeof(Flt)); return *this;}

Here is the call graph for this function:

TSIn& TSIn::operator>> ( double &  Double) [inline]

Definition at line 110 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&Double, sizeof(Double)); return *this;}

Here is the call graph for this function:

TSIn& TSIn::operator>> ( long double &  LDouble) [inline]

Definition at line 111 of file fl.h.

References TSBase::Cs, and GetBf().

{Cs+=GetBf(&LDouble, sizeof(LDouble)); return *this;}

Here is the call graph for this function:

virtual char TSIn::PeekCh ( ) [pure virtual]

Implemented in TStrIn, TMIn, TFInOut, TChAIn, TFIn, TStdIn, TMemIn, and TZipIn.

Referenced by GetNextLn(), and TXmlParser::GetSym().

Here is the caller graph for this function:

virtual void TSIn::Reset ( ) [inline, virtual]

Reimplemented in TStrIn, TMIn, TChAIn, TFIn, TStdIn, and TMemIn.

Definition at line 75 of file fl.h.

References Fail.

{Fail;}
void TSIn::SetFastMode ( const bool &  _FastMode) [inline]

Definition at line 78 of file fl.h.

References FastMode.

{FastMode=_FastMode;}

Friends And Related Function Documentation

friend class TPt< TSIn > [friend]

Definition at line 117 of file fl.h.


Member Data Documentation

bool TSIn::FastMode [private]

Definition at line 60 of file fl.h.

Referenced by IsFastMode(), and SetFastMode().

const PSIn TSIn::StdIn = PSIn(new TStdIn()) [static]

Definition at line 116 of file fl.h.


The documentation for this class was generated from the following files: