TermConsumer Class Referenceabstract

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>`

Inheritance diagram for TermConsumer:

## Public Member Functions

virtual | ~TermConsumer ()
virtual void | consumeRing (const VarNames &names)
| Tell the consumer which ring is being used.
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.
virtual void | beginConsuming ()=0
| Tell the consumer to begin consuming an ideal.
virtual void | consume (const Term &term)=0
| Consume a term.
virtual void | doneConsuming ()=0
| Must be called once after each time beginConsuming has been called.
virtual void | doneConsumingList ()
| Must be called once after each time beginConsumingList has been called.
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.

## Detailed Description

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.

Todo
  : consider merging this with BigTermConsumer;

Definition at line 36 of file TermConsumer.h.

## Constructor & Destructor Documentation

## ~TermConsumer()

TermConsumer::~TermConsumer | ( |  | ) |

virtual

Definition at line 23 of file TermConsumer.cpp.

## Member Function Documentation

## beginConsuming()

virtual void TermConsumer::beginConsuming | ( |  | ) |

pure virtual

Tell the consumer to begin consuming an ideal.

It is required to call this method before calling consume().

Implemented in AnalyzeConsumer, BigTermConsumer, BigTermRecorder, CanonicalTermConsumer, DecomRecorder, ExternalIdealConsumerWrapper, IdealConsolidator, IO::IdealWriter, IrreducibleIdealSplitter, MsmIndependenceSplit, MsmIndependenceSplit::RightConsumer, NullTermConsumer, OptimizeStrategy, and TranslatingTermConsumer.

## beginConsumingList()

void TermConsumer::beginConsumingList | ( |  | ) |

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 CanonicalTermConsumer, IdealConsolidator, IO::IdealWriter, IrreducibleIdealSplitter, NullTermConsumer, and TranslatingTermConsumer.

Definition at line 29 of file TermConsumer.cpp.

## consume() [1/2]

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.

## consume() [2/2]

virtual void TermConsumer::consume | ( | const Term & | term | ) |

pure virtual

Consume a term.

Implemented in AnalyzeConsumer, BigTermConsumer, CanonicalTermConsumer, DecomRecorder, IdealConsolidator, IrreducibleIdealSplitter, MsmIndependenceSplit, MsmIndependenceSplit::RightConsumer, NullTermConsumer, OptimizeStrategy, TermIgnorer, and TranslatingTermConsumer.

## consumeRing()

void TermConsumer::consumeRing | ( | const VarNames & | names | ) |

virtual

Tell the consumer which ring is being used.

Reimplemented in AnalyzeConsumer, BigTermConsumer, BigTermRecorder, CanonicalTermConsumer, ExternalIdealConsumerWrapper, IdealConsolidator, IO::IdealWriter, IrreducibleIdealSplitter, NullTermConsumer, and TranslatingTermConsumer.

Definition at line 26 of file TermConsumer.cpp.

## doneConsuming()

virtual void TermConsumer::doneConsuming | ( |  | ) |

pure virtual

Must be called once after each time beginConsuming has been called.

Implemented in AnalyzeConsumer, BigTermConsumer, BigTermRecorder, CanonicalTermConsumer, DecomRecorder, ExternalIdealConsumerWrapper, IdealConsolidator, IO::IdealWriter, IrreducibleIdealSplitter, MsmIndependenceSplit, MsmIndependenceSplit::RightConsumer, NullTermConsumer, OptimizeStrategy, and TranslatingTermConsumer.

## doneConsumingList()

void TermConsumer::doneConsumingList | ( |  | ) |

virtual

Must be called once after each time beginConsumingList has been called.

Reimplemented in CanonicalTermConsumer, IdealConsolidator, IO::IdealWriter, IrreducibleIdealSplitter, NullTermConsumer, and TranslatingTermConsumer.

Definition at line 32 of file TermConsumer.cpp.

The documentation for this class was generated from the following files:

- src/TermConsumer.h
- src/TermConsumer.cpp