MPSolve 3.2.1
Loading...
Searching...
No Matches
mps::AbstractInputStream Class Referenceabstract

Abstract class that represent a generic input stream that can be used by MPSolve to read polynomial files and/or descriptions. More...

#include <abstract-input-stream.h>

Inheritance diagram for mps::AbstractInputStream:
mps::FileInputStream mps::MemoryFileStream

Public Member Functions

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...
 

Detailed Description

Abstract class that represent a generic input stream that can be used by MPSolve to read polynomial files and/or descriptions.

@seealso MemoryFileStream, FileInputStream

Member Function Documentation

◆ eof()

virtual bool mps::AbstractInputStream::eof ( )
pure virtual

Check if we are at the end of the stream.

Returns
true if we are at the end of the stream.

Implemented in mps::FileInputStream, and mps::MemoryFileStream.

◆ getchar()

virtual int mps::AbstractInputStream::getchar ( )
pure virtual

Obtain a single character.

Returns
A new character read from the stream.

Implemented in mps::FileInputStream, and mps::MemoryFileStream.

◆ readline()

virtual size_t mps::AbstractInputStream::readline ( char **  buffer,
size_t *  length 
)
pure virtual

Return a new line of the stream or NULL if we are at the end.

Returns
A pointer to a newly allocated line or NULL.

Implemented in mps::FileInputStream, and mps::MemoryFileStream.


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