SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
TStdIn Class Reference

#include <fl.h>

Inheritance diagram for TStdIn:
Collaboration diagram for TStdIn:

Public Member Functions

 TStdIn ()
 
bool Eof ()
 
int Len () const
 
char GetCh ()
 
char PeekCh ()
 
int GetBf (const void *LBf, const TSize &LBfL)
 
void Reset ()
 
bool GetNextLnBf (TChA &LnChA)
 
- Public Member Functions inherited from TSIn
 TSIn ()
 
 TSIn (const TStr &Str)
 
virtual ~TSIn ()
 
bool IsFastMode () const
 
void SetFastMode (const bool &_FastMode)
 
virtual 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)
 
- Public Member Functions inherited from TSBase
 TSBase (const TSStr &Nm)
 
virtual ~TSBase ()
 
virtual TStr GetSNm () const
 

Static Public Member Functions

static TPt< TSInNew ()
 

Private Member Functions

 TStdIn (const TStdIn &)
 
TStdInoperator= (const TStdIn &)
 

Additional Inherited Members

- Static Public Attributes inherited from TSIn
static const TPt< TSInStdIn =PSIn(new TStdIn())
 
- Protected Attributes inherited from TSBase
TCRef CRef
 
TSStr SNm
 
TCs Cs
 

Detailed Description

Definition at line 240 of file fl.h.

Constructor & Destructor Documentation

TStdIn::TStdIn ( const TStdIn )
private
TStdIn::TStdIn ( )

Definition at line 63 of file fl.cpp.

Referenced by New().

63 : TSBase("Standard input"), TSIn("Standard input") {}
TSBase(const TSStr &Nm)
Definition: fl.h:50
TSIn()
Definition: fl.h:65

Here is the caller graph for this function:

Member Function Documentation

bool TStdIn::Eof ( )
inlinevirtual

Implements TSIn.

Definition at line 248 of file fl.h.

248 {return feof(stdin)!=0;}
int TStdIn::GetBf ( const void *  LBf,
const TSize LBfL 
)
virtual

Implements TSIn.

Definition at line 217 of file fl.cpp.

References GetCh().

217  {
218  int LBfS=0;
219  for (TSize LBfC=0; LBfC<LBfL; LBfC++){
220  LBfS+=(((char*)LBf)[LBfC]=GetCh());}
221  return LBfS;
222 }
size_t TSize
Definition: bd.h:58
char GetCh()
Definition: fl.h:250

Here is the call graph for this function:

char TStdIn::GetCh ( )
inlinevirtual

Implements TSIn.

Definition at line 250 of file fl.h.

Referenced by GetBf().

250 {return char(getchar());}

Here is the caller graph for this function:

bool TStdIn::GetNextLnBf ( TChA LnChA)
virtual

Implements TSIn.

Definition at line 224 of file fl.cpp.

References FailR, and TStr::Fmt().

224  {
225  // not implemented
226  FailR(TStr::Fmt("TStdIn::GetNextLnBf: not implemented").CStr());
227  return false;
228 }
#define FailR(Reason)
Definition: bd.h:240
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599

Here is the call graph for this function:

int TStdIn::Len ( ) const
inlinevirtual

Implements TSIn.

Definition at line 249 of file fl.h.

249 {return -1;}
static TPt<TSIn> TStdIn::New ( )
inlinestatic

Definition at line 246 of file fl.h.

References TStdIn().

246 {return new TStdIn();}
TStdIn()
Definition: fl.cpp:63

Here is the call graph for this function:

TStdIn& TStdIn::operator= ( const TStdIn )
private
char TStdIn::PeekCh ( )
inlinevirtual

Implements TSIn.

Definition at line 251 of file fl.h.

251  {
252  int Ch=getchar(); ungetc(Ch, stdin); return char(Ch);}
void TStdIn::Reset ( )
inlinevirtual

Reimplemented from TSIn.

Definition at line 254 of file fl.h.

References TSBase::Cs.

254 {Cs=TCs();}
Definition: fl.h:11
TCs Cs
Definition: fl.h:44

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