Frobby 0.9.5
DataType.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 DATA_TYPE_GUARD
18#define DATA_TYPE_GUARD
19
20#include <vector>
21
29class DataType {
30 public:
32 const char* getName() const;
33
35 bool isNull() const;
36
37 bool operator==(const DataType& type) const;
38 bool operator!=(const DataType& type) const;
39
41 static const DataType& getNullType();
42
44 static const DataType& getMonomialIdealType();
45
47 static const DataType& getPolynomialType();
48
50 static const DataType& getSatBinomIdealType();
51
53 static const DataType& getMonomialIdealListType();
54
56 static vector<const DataType*> getTypes();
57
58 private:
61
63 void operator=(const DataType&);
64
66 DataType(const char* name);
67
68 const char* _name;
69};
70
71#endif
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
Definition: DataType.h:29
const char * getName() const
Returns the name of the structure.
Definition: DataType.cpp:24
bool operator==(const DataType &type) const
Definition: DataType.cpp:32
void operator=(const DataType &)
Private to avoid copies.
static vector< const DataType * > getTypes()
Returns a vector of all types except null.
Definition: DataType.cpp:64
static const DataType & getSatBinomIdealType()
Returns the one and only instance for saturated binomial ideals.
Definition: DataType.cpp:59
static const DataType & getNullType()
Returns the one and only instance for null.
Definition: DataType.cpp:40
static const DataType & getMonomialIdealListType()
Returns the one and only instance for monomial ideal lists.
Definition: DataType.cpp:54
bool isNull() const
Returns true if this object was returned by getNullType().
Definition: DataType.cpp:28
bool operator!=(const DataType &type) const
Definition: DataType.cpp:36
DataType(const DataType &)
Private to avoid copies.
const char * _name
Definition: DataType.h:68
static const DataType & getMonomialIdealType()
Returns the one and only instance for monomial ideals.
Definition: DataType.cpp:45
static const DataType & getPolynomialType()
Returns the one and only instance for polynomials.
Definition: DataType.cpp:50