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
19MPS_BEGIN_DECLS
20
25
30
39
47
48MPS_END_DECLS
49
50#ifdef __cplusplus
51
52namespace mps {
54public:
55
63 FileInputStream (FILE * source);
64
66
78 size_t readline (char ** buffer, size_t * length);
79
85 bool eof ();
86
92 int getchar ();
93
94private:
95 FILE * mSource;
96 };
97}
98
99#endif /* __cplusplus */
100
101#endif /* MPS_FILE_INPUT_STREAM_H_ */
102
Abstract class that represent a generic input stream that can be used by MPSolve to read polynomial f...
Definition: abstract-input-stream.h:62
Definition: file-input-stream.h:53
int getchar()
Obtain a single character.
Definition: file-input-stream.cpp:47
size_t readline(char **buffer, size_t *length)
Implementation of the readline() method of the AbstractInputStream parent.
Definition: file-input-stream.cpp:35
bool eof()
Implementation of the eof() method of AbstractInputStream.
Definition: file-input-stream.cpp:41
struct mps_file_input_stream mps_file_input_stream
Wrapper around FileInputStream.
Definition: file-input-stream.h:29
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
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