Frobby 0.9.5
IOParameters.h
Go to the documentation of this file.
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
24class Scanner;
25class DataType;
26
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 auto_ptr<IOHandler> createInputHandler() const;
38 auto_ptr<IOHandler> createOutputHandler() const;
39
46
47 // Exits with an error message if the input or output format is not
48 // known.
49 void validateFormats() const;
50
51 private:
54
55 auto_ptr<StringParameter> _inputFormat;
56 auto_ptr<StringParameter> _outputFormat;
57};
58
59#endif
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
Definition DataType.h:29
void setOutputFormat(const string &format)
const string & getOutputFormat() const
void autoDetectInputFormat(Scanner &in)
If using the input format, this must be called before validating the ideals, since the auto detect fo...
IOParameters(const DataType &input, const DataType &output)
auto_ptr< IOHandler > createOutputHandler() const
auto_ptr< StringParameter > _inputFormat
const string & getInputFormat() const
void setInputFormat(const string &format)
auto_ptr< IOHandler > createInputHandler() const
auto_ptr< StringParameter > _outputFormat
const DataType & _inputType
const DataType & _outputType
void validateFormats() const
This class offers an input interface which is more convenient and for some purposes more efficient th...
Definition Scanner.h:50