idep_TokenIter_i Struct Reference

List of all members.

Public Member Functions

 idep_TokenIter_i (std::istream &in)
 ~idep_TokenIter_i ()
void grow ()
void addChar (char ch)
void advance ()

Public Attributes

std::istream & d_in
char * d_buf_p
int d_size
int d_length
int d_newlineFlag

Detailed Description

Definition at line 18 of file idep_tokitr.cxx.


Constructor & Destructor Documentation

idep_TokenIter_i::idep_TokenIter_i ( std::istream &  in  ) 

Definition at line 32 of file idep_tokitr.cxx.

References d_buf_p.

00033 : d_in(in)
00034 , d_buf_p(new char[START_SIZE])
00035 , d_size(START_SIZE)
00036 , d_length(0)
00037 , d_newlineFlag(0)
00038 {
00039     assert(d_buf_p);
00040 }

idep_TokenIter_i::~idep_TokenIter_i (  ) 

Definition at line 42 of file idep_tokitr.cxx.

References d_buf_p.

00043 {
00044     delete d_buf_p;
00045 }


Member Function Documentation

void idep_TokenIter_i::addChar ( char  ch  ) 

Definition at line 58 of file idep_tokitr.cxx.

References d_buf_p, d_length, d_size, and grow().

Referenced by idep_TokenIter::operator++().

00059 {
00060     if (d_length >= d_size) {
00061         grow();
00062     }
00063     assert(d_length < d_size);
00064     d_buf_p[d_length++] = ch;
00065 }

void idep_TokenIter_i::advance (  ) 
void idep_TokenIter_i::grow (  ) 

Definition at line 47 of file idep_tokitr.cxx.

References d_buf_p, d_size, and GROW_FACTOR.

Referenced by addChar().

00048 {
00049     int newSize = d_size * GROW_FACTOR;
00050     char *tmp = d_buf_p;
00051     d_buf_p = new char[newSize];
00052     assert(d_buf_p);
00053     memcpy(d_buf_p, tmp, d_size);
00054     d_size = newSize;
00055     delete [] tmp;
00056 }


Member Data Documentation

std::istream& idep_TokenIter_i::d_in

Definition at line 19 of file idep_tokitr.cxx.

Referenced by idep_TokenIter::operator++().

Definition at line 23 of file idep_tokitr.cxx.

Referenced by idep_TokenIter::operator++().

Definition at line 21 of file idep_tokitr.cxx.

Referenced by addChar(), and grow().


The documentation for this struct was generated from the following file:

Generated on 16 Apr 2018 for loon by  doxygen 1.6.1