SNAP Library 3.0, User Reference  2016-07-20 17:56:49
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TStdIn Class Reference

#include <fl.h>

Inherits TSIn.

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

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

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.

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
char TStdIn::GetCh ( )
inlinevirtual

Implements TSIn.

Definition at line 250 of file fl.h.

250 {return char(getchar());}
bool TStdIn::GetNextLnBf ( TChA LnChA)
virtual

Implements TSIn.

Definition at line 224 of file fl.cpp.

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

246 {return new TStdIn();}
TStdIn()
Definition: fl.cpp:63
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.

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

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