abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Minisat::StreamBuffer Class Reference

#include <ParseUtils.h>

Public Member Functions

 StreamBuffer (gzFile i)
 
int operator* () const
 
void operator++ ()
 
int position () const
 

Private Member Functions

void assureLookahead ()
 

Private Attributes

gzFile in
 
unsigned char buf [buffer_size]
 
int pos
 
int size
 

Detailed Description

Definition at line 37 of file ParseUtils.h.

Constructor & Destructor Documentation

Minisat::StreamBuffer::StreamBuffer ( gzFile  i)
inlineexplicit

Definition at line 49 of file ParseUtils.h.

Member Function Documentation

void Minisat::StreamBuffer::assureLookahead ( )
inlineprivate

Definition at line 43 of file ParseUtils.h.

43  {
44  if (pos >= size) {
45  pos = 0;
46  size = gzread(in, buf, sizeof(buf)); } }
unsigned char buf[buffer_size]
Definition: ParseUtils.h:39
int ZEXPORT gzread(gzFile file, voidp buf, unsigned len)
Definition: gzread.c:357
int Minisat::StreamBuffer::operator* ( ) const
inline

Definition at line 51 of file ParseUtils.h.

51 { return (pos >= size) ? EOF : buf[pos]; }
unsigned char buf[buffer_size]
Definition: ParseUtils.h:39
void Minisat::StreamBuffer::operator++ ( )
inline

Definition at line 52 of file ParseUtils.h.

int Minisat::StreamBuffer::position ( ) const
inline

Definition at line 53 of file ParseUtils.h.

53 { return pos; }

Field Documentation

unsigned char Minisat::StreamBuffer::buf[buffer_size]
private

Definition at line 39 of file ParseUtils.h.

gzFile Minisat::StreamBuffer::in
private

Definition at line 38 of file ParseUtils.h.

int Minisat::StreamBuffer::pos
private

Definition at line 40 of file ParseUtils.h.

int Minisat::StreamBuffer::size
private

Definition at line 41 of file ParseUtils.h.


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