MPSolve
3.2.1
Loading...
Searching...
No Matches
file-input-stream.h
Go to the documentation of this file.
1
/*
2
* This file is part of MPSolve 3.2.1
3
*
4
* Copyright (C) 2001-2020, Dipartimento di Matematica "L. Tonelli", Pisa.
5
* License: http://www.gnu.org/licenses/gpl.html GPL version 3 or higher
6
*
7
* Authors:
8
* Leonardo Robol <leonardo.robol@unipi.it>
9
*/
10
16
#ifndef MPS_FILE_INPUT_STREAM_H_
17
#define MPS_FILE_INPUT_STREAM_H_
18
19
MPS_BEGIN_DECLS
20
24
struct
mps_file_input_stream
;
25
29
typedef
struct
mps_file_input_stream
mps_file_input_stream
;
30
38
mps_file_input_stream
*
mps_file_input_stream_new
(FILE * source);
39
46
void
mps_file_input_stream_free
(
mps_file_input_stream
* stream);
47
48
MPS_END_DECLS
49
50
#ifdef __cplusplus
51
52
namespace
mps {
53
class
FileInputStream
:
public
AbstractInputStream
{
54
public
:
55
63
FileInputStream
(FILE * source);
64
65
~FileInputStream
();
66
78
size_t
readline
(
char
** buffer,
size_t
* length);
79
85
bool
eof
();
86
92
int
getchar
();
93
94
private
:
95
FILE * mSource;
96
};
97
}
98
99
#endif
/* __cplusplus */
100
101
#endif
/* MPS_FILE_INPUT_STREAM_H_ */
102
mps::AbstractInputStream
Abstract class that represent a generic input stream that can be used by MPSolve to read polynomial f...
Definition:
abstract-input-stream.h:62
mps::FileInputStream
Definition:
file-input-stream.h:53
mps::FileInputStream::getchar
int getchar()
Obtain a single character.
Definition:
file-input-stream.cpp:47
mps::FileInputStream::readline
size_t readline(char **buffer, size_t *length)
Implementation of the readline() method of the AbstractInputStream parent.
Definition:
file-input-stream.cpp:35
mps::FileInputStream::eof
bool eof()
Implementation of the eof() method of AbstractInputStream.
Definition:
file-input-stream.cpp:41
mps_file_input_stream
struct mps_file_input_stream mps_file_input_stream
Wrapper around FileInputStream.
Definition:
file-input-stream.h:29
mps_file_input_stream_new
mps_file_input_stream * mps_file_input_stream_new(FILE *source)
Allocate a new FileInputStream instane that will stream the given file.
Definition:
file-input-stream.cpp:17
mps_file_input_stream_free
void mps_file_input_stream_free(mps_file_input_stream *stream)
Release the resources holded by this FileInputStream instance.
Definition:
file-input-stream.cpp:23
include
mps
private
system
file-input-stream.h
Generated on Mon Nov 28 2022 00:00:00 for MPSolve by
1.9.5