Frobby
0.10.0
Toggle main menu visibility
Loading...
Searching...
No Matches
src
IOHandlerCommon.h
1
/* Frobby: Software for monomial ideal computations.
2
Copyright (C) 2009 University of Aarhus
3
Contact Bjarke Hammersholt Roune for license information (www.broune.com)
4
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see http://www.gnu.org/licenses/.
17
*/
18
#ifndef IO_HANDLER_COMMON_GUARD
19
#define IO_HANDLER_COMMON_GUARD
20
21
#include "IOHandlerImpl.h"
22
23
class
Scanner
;
24
class
VarNames
;
25
class
BigTermConsumer
;
26
class
CoefBigTermConsumer
;
27
class
InputConsumer
;
28
29
namespace
IO {
33
class
IOHandlerCommon :
public
IOHandlerImpl {
34
public
:
35
IOHandlerCommon(
const
char
* formatName,
36
const
char
* formatDescription);
37
39
void
readRing
(
Scanner
& in,
VarNames
& names);
40
43
bool
peekRing
(
Scanner
& in);
44
46
void
readBareIdeal
(
Scanner
& in,
InputConsumer
& consumer);
47
49
void
readBarePolynomial
(
Scanner
& in,
50
const
VarNames
& names,
51
CoefBigTermConsumer
& consumer);
52
53
private
:
54
// The following methods are implemented in terms of the new methods.
55
virtual
void
doReadIdeal(
Scanner
& in,
InputConsumer
& consumer);
56
virtual
void
doReadIdeals(
Scanner
& in,
InputConsumer
& consumer);
57
virtual
void
doReadPolynomial(
Scanner
& in,
CoefBigTermConsumer
& consumer);
58
59
// Override these methods except for those that do input
60
// of un-supported type.
61
virtual
void
doReadRing(
Scanner
& in,
VarNames
& names) = 0;
62
virtual
bool
doPeekRing(
Scanner
& in) = 0;
63
virtual
void
doReadBareIdeal(
Scanner
& in,
InputConsumer
& consumer);
64
virtual
void
doReadBarePolynomial(
Scanner
& in,
65
const
VarNames
& names,
66
CoefBigTermConsumer
& consumer);
67
};
68
}
69
70
#endif
BigTermConsumer
Definition
BigTermConsumer.h:29
CoefBigTermConsumer
Definition
CoefBigTermConsumer.h:29
IO::IOHandlerCommon::readBareIdeal
void readBareIdeal(Scanner &in, InputConsumer &consumer)
Definition
IOHandlerCommon.cpp:40
IO::IOHandlerCommon::readRing
void readRing(Scanner &in, VarNames &names)
Definition
IOHandlerCommon.cpp:32
IO::IOHandlerCommon::peekRing
bool peekRing(Scanner &in)
Definition
IOHandlerCommon.cpp:36
IO::IOHandlerCommon::readBarePolynomial
void readBarePolynomial(Scanner &in, const VarNames &names, CoefBigTermConsumer &consumer)
Definition
IOHandlerCommon.cpp:44
InputConsumer
Definition
InputConsumer.h:30
Scanner
Definition
Scanner.h:50
VarNames
Definition
VarNames.h:38
Generated by
1.17.0