SNAP Library , Developer Reference  2013-01-07 14:03:36
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
TChAIn Class Reference

#include <dt.h>

Inheritance diagram for TChAIn:
Collaboration diagram for TChAIn:

List of all members.

Public Member Functions

 TChAIn (const TChA &ChA, const int &_BfC=0)
 ~TChAIn ()
bool Eof ()
int Len () const
char GetCh ()
char PeekCh ()
int GetBf (const void *LBf, const TSize &LBfL)
void Reset ()

Static Public Member Functions

static PSIn New (const TChA &ChA)

Private Member Functions

 TChAIn ()
 TChAIn (const TChAIn &)
TChAInoperator= (const TChAIn &)

Private Attributes

const char * Bf
int BfC
int BfL

Detailed Description

Definition at line 316 of file dt.h.


Constructor & Destructor Documentation

TChAIn::TChAIn ( ) [private]

Referenced by New().

Here is the caller graph for this function:

TChAIn::TChAIn ( const TChAIn ) [private]
TChAIn::TChAIn ( const TChA ChA,
const int &  _BfC = 0 
)

Definition at line 623 of file dt.cpp.

                                              :
  TSBase("Input-Char-Array"), TSIn("Input-Char-Array"), Bf(ChA.CStr()), BfC(_BfC), BfL(ChA.Len()){}
TChAIn::~TChAIn ( ) [inline]

Definition at line 327 of file dt.h.

{}

Member Function Documentation

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

Implements TSIn.

Definition at line 329 of file dt.h.

References BfC, and BfL.

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

Implements TSIn.

Definition at line 626 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 TChAIn::GetCh ( ) [inline, virtual]

Implements TSIn.

Definition at line 331 of file dt.h.

References Assert, Bf, BfC, and BfL.

{Assert(BfC<BfL); return Bf[BfC++];}
int TChAIn::Len ( ) const [inline, virtual]

Implements TSIn.

Definition at line 330 of file dt.h.

References BfC, and BfL.

{return BfL-BfC;}
static PSIn TChAIn::New ( const TChA ChA) [inline, static]

Definition at line 326 of file dt.h.

References TChAIn().

{return PSIn(new TChAIn(ChA));}

Here is the call graph for this function:

TChAIn& TChAIn::operator= ( const TChAIn ) [private]
char TChAIn::PeekCh ( ) [inline, virtual]

Implements TSIn.

Definition at line 332 of file dt.h.

References Assert, Bf, BfC, and BfL.

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

Reimplemented from TSIn.

Definition at line 334 of file dt.h.

References BfC, and TSBase::Cs.

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

Member Data Documentation

const char* TChAIn::Bf [private]

Definition at line 318 of file dt.h.

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

int TChAIn::BfC [private]

Definition at line 319 of file dt.h.

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

int TChAIn::BfL [private]

Definition at line 319 of file dt.h.

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


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