delpi  0.0.1
DElta-complete LP solver
Loading...
Searching...
No Matches
delpi::LineScanner Class Referenceabstract

LineScanner takes care of parsing the MPS file line by line, keeping an internal state and invoking the correct method of the MpsDriver. More...

#include <LineScanner.h>

Public Member Functions

bool ParseFile (const std::string &filename)
 Parse an MPS file from disk.
bool ParseString (std::string_view input)
 Parse an MPS file from an in-memory string.

Protected Member Functions

virtual bool ParseLines (BufferLineSource &src)=0
 Parse all lines from a line-oriented source.

Protected Attributes

std::string filename_
 Name of the file being parsed, used for error reporting.
std::size_t line_no_
 Current line number, used for error reporting.

Detailed Description

LineScanner takes care of parsing the MPS file line by line, keeping an internal state and invoking the correct method of the MpsDriver.

Definition at line 22 of file LineScanner.h.

Member Function Documentation

◆ ParseFile()

bool delpi::LineScanner::ParseFile ( const std::string & filename)

Parse an MPS file from disk.

Parameters
filenamepath to the MPS file
Returns
whether parsing succeeded

Definition at line 15 of file LineScanner.cpp.

◆ ParseLines()

virtual bool delpi::LineScanner::ParseLines ( BufferLineSource & src)
protectedpure virtual

Parse all lines from a line-oriented source.

Parameters
srcline source
Returns
whether parsing succeeded

◆ ParseString()

bool delpi::LineScanner::ParseString ( std::string_view input)

Parse an MPS file from an in-memory string.

Parameters
inputMPS contents
Returns
whether parsing succeeded

Definition at line 27 of file LineScanner.cpp.


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