idep_FileDepIter Class Reference

#include <idep_filedepiter.h>

List of all members.

Public Member Functions

 idep_FileDepIter (const char *fileName)
 ~idep_FileDepIter ()
void reset ()
void operator++ ()
int isValidFile () const
 operator const void * () const
const char * operator() () const

Private Member Functions

 idep_FileDepIter (const idep_FileDepIter &)
idep_FileDepIteroperator= (const idep_FileDepIter &)

Private Attributes

idep_FileDepIter_id_this

Detailed Description

Definition at line 10 of file idep_filedepiter.h.


Constructor & Destructor Documentation

idep_FileDepIter::idep_FileDepIter ( const idep_FileDepIter  )  [private]
idep_FileDepIter::idep_FileDepIter ( const char *  fileName  ) 

Definition at line 127 of file idep_fdepitr.cxx.

References idep_FileDepIter_i::d_header_p, d_this, and isValidFile().

00128 : d_this(new idep_FileDepIter_i(fileName))
00129 {
00130     if (!isValidFile()) {       
00131         d_this->d_header_p = 0; // iteration state is invalid
00132     }
00133     ++*this; // load first occurrence
00134 }

idep_FileDepIter::~idep_FileDepIter (  ) 

Definition at line 136 of file idep_fdepitr.cxx.

References d_this.

00137 {
00138     delete d_this;
00139 }


Member Function Documentation

int idep_FileDepIter::isValidFile (  )  const

Definition at line 161 of file idep_fdepitr.cxx.

References idep_FileDepIter_i::d_isValidFile, and d_this.

Referenced by idep_AliasDep::extract(), getDep(), idep_FileDepIter(), reset(), and idep_AliasDep::verify().

00162 { 
00163     return d_this->d_isValidFile;
00164 }

idep_FileDepIter::operator const void * (  )  const

Definition at line 166 of file idep_fdepitr.cxx.

References idep_FileDepIter_i::d_header_p, and d_this.

00167 { 
00168     return d_this->d_header_p ? this : 0;
00169 }

const char * idep_FileDepIter::operator() (  )  const

Definition at line 171 of file idep_fdepitr.cxx.

References idep_FileDepIter_i::d_header_p, and d_this.

00172 { 
00173     return d_this->d_header_p;
00174 }

void idep_FileDepIter::operator++ (  ) 

Definition at line 151 of file idep_fdepitr.cxx.

References idep_FileDepIter_i::d_buf, idep_FileDepIter_i::d_file, idep_FileDepIter_i::d_header_p, d_this, extractDependency(), and loadBuf().

00152 { 
00153     d_this->d_header_p = 0;
00154     while (loadBuf(d_this->d_file, d_this->d_buf, sizeof d_this->d_buf) >= 0) {
00155         if ((d_this->d_header_p = extractDependency(d_this->d_buf))) { // `=' ok
00156             break;
00157         }
00158     };
00159 }    

idep_FileDepIter& idep_FileDepIter::operator= ( const idep_FileDepIter  )  [private]
void idep_FileDepIter::reset (  ) 

Definition at line 141 of file idep_fdepitr.cxx.

References idep_FileDepIter_i::d_buf, idep_FileDepIter_i::d_file, idep_FileDepIter_i::d_header_p, d_this, and isValidFile().

00142 {
00143     if (isValidFile()) {
00144         d_this->d_file.seekg(std::ios::beg); // rewind to beginning of file
00145         d_this->d_file.clear(d_this->d_file.rdstate() & std::ios::badbit); 
00146         d_this->d_header_p = d_this->d_buf;
00147     }
00148     ++*this; // load first occurrence
00149 }


Member Data Documentation


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

Generated on 13 Dec 2018 for loon by  doxygen 1.6.1