Frobby
0.10.0
Toggle main menu visibility
Loading...
Searching...
No Matches
src
IOParameters.h
1
/* Frobby: Software for monomial ideal computations.
2
Copyright (C) 2007 Bjarke Hammersholt Roune (www.broune.com)
3
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program. If not, see http://www.gnu.org/licenses/.
16
*/
17
#ifndef IO_PARAMETERS_GUARD
18
#define IO_PARAMETERS_GUARD
19
20
#include "ParameterGroup.h"
21
#include "StringParameter.h"
22
#include "IOHandler.h"
23
24
class
Scanner
;
25
class
DataType
;
26
27
class
IOParameters :
public
ParameterGroup {
28
public
:
29
IOParameters(
const
DataType
& input,
const
DataType
& output);
30
31
void
setOutputFormat(
const
string
& format);
32
void
setInputFormat(
const
string
& format);
33
34
const
string
& getInputFormat()
const
;
35
const
string
& getOutputFormat()
const
;
36
37
unique_ptr<IOHandler> createInputHandler()
const
;
38
unique_ptr<IOHandler> createOutputHandler()
const
;
39
45
void
autoDetectInputFormat
(
Scanner
& in);
46
47
// Exits with an error message if the input or output format is not
48
// known.
49
void
validateFormats()
const
;
50
51
private
:
52
const
DataType
& _inputType;
53
const
DataType
& _outputType;
54
55
unique_ptr<StringParameter> _inputFormat;
56
unique_ptr<StringParameter> _outputFormat;
57
};
58
59
#endif
DataType
Definition
DataType.h:29
IOParameters::autoDetectInputFormat
void autoDetectInputFormat(Scanner &in)
Definition
IOParameters.cpp:139
Scanner
Definition
Scanner.h:50
Generated by
1.17.0