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
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 ()
bool GetNextLnBf (TChA &LnChA)

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 322 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 641 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 333 of file dt.h.

{}

Member Function Documentation

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

Implements TSIn.

Definition at line 335 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 644 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 337 of file dt.h.

References Assert, Bf, BfC, and BfL.

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

Implements TSIn.

Definition at line 652 of file dt.cpp.

References FailR, and TStr::Fmt().

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

Here is the call graph for this function:

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

Implements TSIn.

Definition at line 336 of file dt.h.

References BfC, and BfL.

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

Definition at line 332 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 338 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 340 of file dt.h.

References BfC, and TSBase::Cs.

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

Member Data Documentation

const char* TChAIn::Bf [private]

Definition at line 324 of file dt.h.

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

int TChAIn::BfC [private]

Definition at line 325 of file dt.h.

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

int TChAIn::BfL [private]

Definition at line 325 of file dt.h.

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


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