Frobby
0.9.5
|
This class is used to transfer terms one at a time from one part of the program to another, and possibly to perform computations on those terms. More...
#include <TermConsumer.h>
Public Member Functions | |
virtual | ~TermConsumer () |
virtual void | consumeRing (const VarNames &names) |
Tell the consumer which ring is being used. More... | |
virtual void | beginConsumingList () |
Tell the consumer that the ideals that are consumed until the next call to doneConsumingList are to be considered as one list of ideals, rather than as a number of separate ideals. More... | |
virtual void | beginConsuming ()=0 |
Tell the consumer to begin consuming an ideal. More... | |
virtual void | consume (const Term &term)=0 |
Consume a term. More... | |
virtual void | doneConsuming ()=0 |
Must be called once after each time beginConsuming has been called. More... | |
virtual void | doneConsumingList () |
Must be called once after each time beginConsumingList has been called. More... | |
void | consume (const Ideal &ideal) |
This is a non-virtual utility method that calls the other methods to achieve its effect of calling beginConsuming, then consuming all generators, and then calling doneConsuming. More... | |
This class is used to transfer terms one at a time from one part of the program to another, and possibly to perform computations on those terms.
These can be divided into ideals (lists of terms) and lists of ideals.
Using a consumer for output, for example, allows to move the output from memory onto the disk without having to wait for the entire computation to be done, while still making it possible to store the output in memory in a convenient form just by using a different consumer.
Definition at line 36 of file TermConsumer.h.
|
virtual |
Definition at line 23 of file TermConsumer.cpp.
|
pure virtual |
Tell the consumer to begin consuming an ideal.
It is required to call this method before calling consume().
Implemented in BigTermConsumer, TranslatingTermConsumer, OptimizeStrategy, NullTermConsumer, MsmIndependenceSplit::RightConsumer, MsmIndependenceSplit, IrreducibleIdealSplitter, IO::IdealWriter, IdealConsolidator, ExternalIdealConsumerWrapper, DecomRecorder, CanonicalTermConsumer, BigTermRecorder, and AnalyzeConsumer.
|
virtual |
Tell the consumer that the ideals that are consumed until the next call to doneConsumingList are to be considered as one list of ideals, rather than as a number of separate ideals.
The default implementation is to ignore this, but the consumer is free to do something special in this case. It is thus not in general required to call this method, but if you don't, make sure that every consumer that you want to use does what you want if you output more than a single ideal.
Reimplemented in TranslatingTermConsumer, NullTermConsumer, IrreducibleIdealSplitter, IO::IdealWriter, IdealConsolidator, and CanonicalTermConsumer.
Definition at line 29 of file TermConsumer.cpp.
void TermConsumer::consume | ( | const Ideal & | ideal | ) |
This is a non-virtual utility method that calls the other methods to achieve its effect of calling beginConsuming, then consuming all generators, and then calling doneConsuming.
Definition at line 35 of file TermConsumer.cpp.
|
pure virtual |
Consume a term.
Implemented in TranslatingTermConsumer, TermIgnorer, OptimizeStrategy, NullTermConsumer, MsmIndependenceSplit::RightConsumer, MsmIndependenceSplit, IrreducibleIdealSplitter, IdealConsolidator, DecomRecorder, CanonicalTermConsumer, and BigTermConsumer.
|
virtual |
Tell the consumer which ring is being used.
Reimplemented in BigTermConsumer, TranslatingTermConsumer, NullTermConsumer, IrreducibleIdealSplitter, IO::IdealWriter, IdealConsolidator, ExternalIdealConsumerWrapper, CanonicalTermConsumer, BigTermRecorder, and AnalyzeConsumer.
Definition at line 26 of file TermConsumer.cpp.
|
pure virtual |
Must be called once after each time beginConsuming has been called.
Implemented in BigTermConsumer, TranslatingTermConsumer, OptimizeStrategy, NullTermConsumer, MsmIndependenceSplit::RightConsumer, MsmIndependenceSplit, IrreducibleIdealSplitter, IO::IdealWriter, IdealConsolidator, ExternalIdealConsumerWrapper, DecomRecorder, CanonicalTermConsumer, BigTermRecorder, and AnalyzeConsumer.
|
virtual |
Must be called once after each time beginConsumingList has been called.
Reimplemented in TranslatingTermConsumer, NullTermConsumer, IrreducibleIdealSplitter, IO::IdealWriter, IdealConsolidator, and CanonicalTermConsumer.
Definition at line 32 of file TermConsumer.cpp.