Frobby  0.9.5
Public Member Functions | List of all members
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:
BigTermConsumer CanonicalTermConsumer DecomRecorder MsmIndependenceSplit MsmIndependenceSplit::RightConsumer OptimizeStrategy TermIgnorer AnalyzeConsumer BigTermRecorder ExternalIdealConsumerWrapper IO::IdealWriter IdealConsolidator IrreducibleIdealSplitter NullTermConsumer TranslatingTermConsumer

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

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

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

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

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

Definition at line 32 of file TermConsumer.cpp.


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