Frobby  0.9.1
DebugStrategy.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 DEBUG_STRATEGY
18 #define DEBUG_STRATEGY
19 
20 #include "SliceStrategy.h"
21 
26 class DebugStrategy : public SliceStrategy {
27  public:
30  DebugStrategy(SliceStrategy* strategy, FILE* out);
31  virtual ~DebugStrategy();
32 
33  virtual void run(const Ideal& ideal);
34 
35  bool processSlice(TaskEngine& tasks, auto_ptr<Slice> slice);
36 
37  virtual void setUseIndependence(bool use);
38  virtual void setUseSimplification(bool use);
39  virtual bool getUseSimplification() const;
40 
41  virtual void freeSlice(auto_ptr<Slice> slice);
42 
43  private:
45  FILE* _out;
46 };
47 
48 #endif
SliceStrategy.h
SliceStrategy
This class describes the interface of a strategy object for the Slice Algorithm.
Definition: SliceStrategy.h:33
DebugStrategy::getUseSimplification
virtual bool getUseSimplification() const
Definition: DebugStrategy.cpp:68
DebugStrategy::freeSlice
virtual void freeSlice(auto_ptr< Slice > slice)
It is allowed to delete returned slices directly, but it is better to use freeSlice.
Definition: DebugStrategy.cpp:72
DebugStrategy::~DebugStrategy
virtual ~DebugStrategy()
Definition: DebugStrategy.cpp:29
DebugStrategy::setUseSimplification
virtual void setUseSimplification(bool use)
This method should only be called before calling run().
Definition: DebugStrategy.cpp:60
TaskEngine
TaskEngine handles a list of tasks that are to be carried out.
Definition: TaskEngine.h:40
DebugStrategy
A wrapper for a SliceStrategy that prints out what is going out for debugging purposes,...
Definition: DebugStrategy.h:26
DebugStrategy::processSlice
bool processSlice(TaskEngine &tasks, auto_ptr< Slice > slice)
Process the parameter slice.
Definition: DebugStrategy.cpp:41
Ideal
Represents a monomial ideal with int exponents.
Definition: Ideal.h:27
DebugStrategy::DebugStrategy
DebugStrategy(SliceStrategy *strategy, FILE *out)
Debug information is written to out, and every call is delegated to strategy.
Definition: DebugStrategy.cpp:22
DebugStrategy::run
virtual void run(const Ideal &ideal)
Run the Slice algorithm.
Definition: DebugStrategy.cpp:32
DebugStrategy::setUseIndependence
virtual void setUseIndependence(bool use)
This method should only be called before calling run().
Definition: DebugStrategy.cpp:52
DebugStrategy::_strategy
SliceStrategy * _strategy
Definition: DebugStrategy.h:44
DebugStrategy::_out
FILE * _out
Definition: DebugStrategy.h:45