Frobby  0.9.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
IO::IdealWriter Class Referenceabstract

#include <IdealWriter.h>

Inheritance diagram for IO::IdealWriter:
BigTermConsumer TermConsumer IO::CoCoA4IdealWriter IO::Fourti2IdealWriter IO::M2IdealWriter IO::MonosIdealWriter IO::NewMonosIdealWriter IO::SingularIdealWriter

Public Member Functions

 IdealWriter (FILE *out)
 
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 ()
 Tell the consumer to begin consuming an ideal. More...
 
virtual void consume (const Term &term, const TermTranslator &translator)
 
virtual void consume (const vector< mpz_class > &term)
 
virtual void doneConsuming ()
 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...
 
virtual void consume (const BigIdeal &ideal)
 
FILE * getFile ()
 
const VarNamesgetNames ()
 
- Public Member Functions inherited from BigTermConsumer
virtual ~BigTermConsumer ()
 
virtual void consume (const Term &term)
 Consume a term. More...
 
virtual void consume (auto_ptr< BigIdeal > ideal)
 
void beginConsuming (const VarNames &names)
 
- Public Member Functions inherited from TermConsumer
virtual ~TermConsumer ()
 
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...
 

Private Member Functions

virtual void doWriteHeader (bool firstIdeal, size_t generatorCount)
 
virtual void doWriteHeader (bool firstIdeal)=0
 
virtual void doWriteTerm (const Term &term, const TermTranslator &translator, bool firstGenerator)=0
 
virtual void doWriteTerm (const vector< mpz_class > &term, bool firstGenerator)=0
 
virtual void doWriteFooter (bool wasZeroIdeal)=0
 
virtual void doWriteEmptyList ()=0
 

Private Attributes

FILE *const _out
 
bool _firstIdeal
 
bool _firstGenerator
 
VarNames _names
 

Detailed Description

Definition at line 28 of file IdealWriter.h.

Constructor & Destructor Documentation

◆ IdealWriter()

IO::IdealWriter::IdealWriter ( FILE *  out)

Definition at line 25 of file IdealWriter.cpp.

Member Function Documentation

◆ beginConsuming()

void IO::IdealWriter::beginConsuming ( )
virtual

Tell the consumer to begin consuming an ideal.

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

Implements BigTermConsumer.

Definition at line 42 of file IdealWriter.cpp.

◆ beginConsumingList()

void IO::IdealWriter::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 from TermConsumer.

Definition at line 38 of file IdealWriter.cpp.

◆ consume() [1/3]

void IO::IdealWriter::consume ( const BigIdeal ideal)
virtual

Reimplemented from BigTermConsumer.

Definition at line 71 of file IdealWriter.cpp.

◆ consume() [2/3]

void IO::IdealWriter::consume ( const Term term,
const TermTranslator translator 
)
virtual

Implements BigTermConsumer.

Definition at line 47 of file IdealWriter.cpp.

◆ consume() [3/3]

void IO::IdealWriter::consume ( const vector< mpz_class > &  term)
virtual

Implements BigTermConsumer.

Definition at line 54 of file IdealWriter.cpp.

◆ consumeRing()

void IO::IdealWriter::consumeRing ( const VarNames names)
virtual

Tell the consumer which ring is being used.

Implements BigTermConsumer.

Definition at line 31 of file IdealWriter.cpp.

◆ doneConsuming()

void IO::IdealWriter::doneConsuming ( )
virtual

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

Implements BigTermConsumer.

Definition at line 61 of file IdealWriter.cpp.

◆ doneConsumingList()

void IO::IdealWriter::doneConsumingList ( )
virtual

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

Reimplemented from TermConsumer.

Definition at line 66 of file IdealWriter.cpp.

◆ doWriteEmptyList()

virtual void IO::IdealWriter::doWriteEmptyList ( )
privatepure virtual

◆ doWriteFooter()

virtual void IO::IdealWriter::doWriteFooter ( bool  wasZeroIdeal)
privatepure virtual

◆ doWriteHeader() [1/2]

virtual void IO::IdealWriter::doWriteHeader ( bool  firstIdeal)
privatepure virtual

◆ doWriteHeader() [2/2]

void IO::IdealWriter::doWriteHeader ( bool  firstIdeal,
size_t  generatorCount 
)
privatevirtual

Reimplemented in IO::Fourti2IdealWriter.

Definition at line 81 of file IdealWriter.cpp.

◆ doWriteTerm() [1/2]

virtual void IO::IdealWriter::doWriteTerm ( const Term term,
const TermTranslator translator,
bool  firstGenerator 
)
privatepure virtual

◆ doWriteTerm() [2/2]

virtual void IO::IdealWriter::doWriteTerm ( const vector< mpz_class > &  term,
bool  firstGenerator 
)
privatepure virtual

◆ getFile()

FILE* IO::IdealWriter::getFile ( )
inline

Definition at line 43 of file IdealWriter.h.

◆ getNames()

const VarNames& IO::IdealWriter::getNames ( )
inline

Definition at line 44 of file IdealWriter.h.

Member Data Documentation

◆ _firstGenerator

bool IO::IdealWriter::_firstGenerator
private

Definition at line 59 of file IdealWriter.h.

◆ _firstIdeal

bool IO::IdealWriter::_firstIdeal
private

Definition at line 58 of file IdealWriter.h.

◆ _names

VarNames IO::IdealWriter::_names
private

Definition at line 60 of file IdealWriter.h.

◆ _out

FILE* const IO::IdealWriter::_out
private

Definition at line 57 of file IdealWriter.h.


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