MPSolve 3.2.1
Loading...
Searching...
No Matches
mps::FileInputStream Class Reference
Inheritance diagram for mps::FileInputStream:
mps::AbstractInputStream

Public Member Functions

 FileInputStream (FILE *source)
 Create a new instance of FileInputStream that will output the content of the FILE opened. More...
 
size_t readline (char **buffer, size_t *length)
 Implementation of the readline() method of the AbstractInputStream parent. More...
 
bool eof ()
 Implementation of the eof() method of AbstractInputStream. More...
 
int getchar ()
 Obtain a single character. More...
 
virtual size_t readline (char **buffer, size_t *length)=0
 Return a new line of the stream or NULL if we are at the end. More...
 
virtual bool eof ()=0
 Check if we are at the end of the stream. More...
 
virtual int getchar ()=0
 Obtain a single character. More...
 

Constructor & Destructor Documentation

◆ FileInputStream()

FileInputStream::FileInputStream ( FILE *  source)

Create a new instance of FileInputStream that will output the content of the FILE opened.

Parameters
sourceA FILE* object returned by a fopen() call on the file whose content should be provided by this stream.

Member Function Documentation

◆ eof()

bool FileInputStream::eof ( )
virtual

Implementation of the eof() method of AbstractInputStream.

Returns
true if the source stream has reached the end.

Implements mps::AbstractInputStream.

◆ getchar()

int FileInputStream::getchar ( )
virtual

Obtain a single character.

Returns
A new character read from the stream.

Implements mps::AbstractInputStream.

◆ readline()

size_t FileInputStream::readline ( char **  buffer,
size_t *  length 
)
virtual

Implementation of the readline() method of the AbstractInputStream parent.

Parameters
bufferA pointer to the buffer where the line will be stored.
lengthA pointer where the length of the allocated buffer at the end will be saved.
Returns
The number of characters that have been stored in buffer.

Implements mps::AbstractInputStream.


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