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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TStrIn Class Reference

#include <dt.h>

Inheritance diagram for TStrIn:
Collaboration diagram for TStrIn:

List of all members.

Public Member Functions

 TStrIn (const TStr &_Str)
 ~TStrIn ()
bool Eof ()
int Len () const
char GetCh ()
char PeekCh ()
int GetBf (const void *LBf, const TSize &LBfL)
void Reset ()
bool GetNextLnBf (TChA &LnChA)

Static Public Member Functions

static PSIn New (const TStr &Str)

Private Member Functions

 TStrIn ()
 TStrIn (const TStrIn &)
TStrInoperator= (const TStrIn &)

Private Attributes

TStr Str
char * Bf
int BfC
int BfL

Detailed Description

Definition at line 698 of file dt.h.


Constructor & Destructor Documentation

TStrIn::TStrIn ( ) [private]

Referenced by New().

Here is the caller graph for this function:

TStrIn::TStrIn ( const TStrIn ) [private]
TStrIn::TStrIn ( const TStr _Str)

Definition at line 1643 of file dt.cpp.

                              :
  TSBase("Input-String"), TSIn("Input-String"), Str(_Str), Bf(Str.CStr()), BfC(0), BfL(Str.Len()){}
TStrIn::~TStrIn ( ) [inline]

Definition at line 710 of file dt.h.

{}

Member Function Documentation

bool TStrIn::Eof ( ) [inline, virtual]

Implements TSIn.

Definition at line 712 of file dt.h.

References BfC, and BfL.

{return BfC==BfL;}
int TStrIn::GetBf ( const void *  LBf,
const TSize LBfL 
) [virtual]

Implements TSIn.

Definition at line 1646 of file dt.cpp.

References Assert, Bf, BfC, and BfL.

                                                   {
  Assert(TSize(BfC+LBfL)<=TSize(BfL));
  int LBfS=0;
  for (TSize LBfC=0; LBfC<LBfL; LBfC++){
    LBfS+=(((char*)LBf)[LBfC]=Bf[BfC++]);}
  return LBfS;
}
char TStrIn::GetCh ( ) [inline, virtual]

Implements TSIn.

Definition at line 714 of file dt.h.

References Assert, Bf, BfC, and BfL.

{Assert(BfC<BfL); return Bf[BfC++];}
bool TStrIn::GetNextLnBf ( TChA LnChA) [virtual]

Implements TSIn.

Definition at line 1654 of file dt.cpp.

References FailR, and TStr::Fmt().

                                   {
  // not implemented
  FailR(TStr::Fmt("TStrIn::GetNextLnBf: not implemented").CStr());
  return false;
}

Here is the call graph for this function:

int TStrIn::Len ( ) const [inline, virtual]

Implements TSIn.

Definition at line 713 of file dt.h.

References BfC, and BfL.

{return BfL-BfC;}
static PSIn TStrIn::New ( const TStr Str) [inline, static]
TStrIn& TStrIn::operator= ( const TStrIn ) [private]
char TStrIn::PeekCh ( ) [inline, virtual]

Implements TSIn.

Definition at line 715 of file dt.h.

References Assert, Bf, BfC, and BfL.

{Assert(BfC<BfL); return Bf[BfC];}
void TStrIn::Reset ( ) [inline, virtual]

Reimplemented from TSIn.

Definition at line 717 of file dt.h.

References BfC, and TSBase::Cs.

{Cs=TCs(); BfC=0;}

Member Data Documentation

char* TStrIn::Bf [private]

Definition at line 701 of file dt.h.

Referenced by GetBf(), GetCh(), and PeekCh().

int TStrIn::BfC [private]

Definition at line 702 of file dt.h.

Referenced by Eof(), GetBf(), GetCh(), Len(), PeekCh(), and Reset().

int TStrIn::BfL [private]

Definition at line 702 of file dt.h.

Referenced by Eof(), GetBf(), GetCh(), Len(), and PeekCh().

TStr TStrIn::Str [private]

Definition at line 700 of file dt.h.


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