Frobby 0.10.0
Loading...
Searching...
No Matches
TermConsumer Class Referenceabstract

#include <TermConsumer.h>

Inheritance diagram for TermConsumer:

Public Member Functions

virtual void consumeRing (const VarNames &names)
virtual void beginConsumingList ()
virtual void beginConsuming ()=0
virtual void consume (const Term &term)=0
virtual void doneConsuming ()=0
virtual void doneConsumingList ()
void consume (const Ideal &ideal)

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;

Member Function Documentation

◆ beginConsuming()

virtual void TermConsumer::beginConsuming ( )
pure virtual

◆ 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.

◆ 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.

◆ consume() [2/2]

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

◆ consumeRing()

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

◆ doneConsuming()

virtual void TermConsumer::doneConsuming ( )
pure virtual

◆ 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.


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