MPSolve 3.2.1
Loading...
Searching...
No Matches
mps_input_buffer Struct Reference

Buffer used to parse input files in MPSolve. It can read a stream line by line. More...

#include <input-buffer.h>

Public Attributes

mps_abstract_input_streamstream
 Stream associated with the mps_input_buffer.
 
char * line
 Pointer the last line read in the buffer. Another line can be read with mps_input_buffer_readline()
 
long int line_number
 Number of the last read line, the one that is stored in line field.
 
char ** history
 Lines that have been read before this. More...
 
size_t history_size
 Size of the history that is been kept in memory. More...
 
int last
 Index of the last line inserted in history. More...
 
char * last_token
 This is a pointer to the last parsed char in the buffer->line string. More...
 

Detailed Description

Buffer used to parse input files in MPSolve. It can read a stream line by line.

Member Data Documentation

◆ history

char** mps_input_buffer::history

Lines that have been read before this.

The number of lines that are remembered is set by the variable MPS_INPUT_BUFFER_HISTORY_DEFAULT_SIZE, but can be overriden by calling mps_input_buffer_set_history_size().

◆ history_size

size_t mps_input_buffer::history_size

Size of the history that is been kept in memory.

This value should never be modified directly, but can be tweaked using mps_input_buffer_set_history_size().

◆ last

int mps_input_buffer::last

Index of the last line inserted in history.

This is used internally by the mps_input_buffer to implement a circular buffer.

◆ last_token

char* mps_input_buffer::last_token

This is a pointer to the last parsed char in the buffer->line string.

It is used by mps_input_buffer_next_token() to determine the last thing read and if there is the need to read another line.

As for last, this pointer should never be manually modified, even if you think that you know what you're doing.


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