IOHandler Class Referenceabstract
The Input/Output Module

An IOHandler implements input and output for some format in such a way that client code does not need to know which format is being used. More...

`#include <IOHandler.h>`

Inheritance diagram for IOHandler:

## Public Member Functions

virtual | ~IOHandler ()
void | readIdeal (Scanner &in, InputConsumer &consumer)
| Read an ideal and feed it to the consumer.
void | readIdeals (Scanner &in, InputConsumer &consumer)
| Read a number of ideals and feed them to the consumer.
void | readTerm (Scanner &in, const VarNames &names, vector< mpz_class > &term)
void | readPolynomial (Scanner &in, CoefBigTermConsumer &consumer)
void | readSatBinomIdeal (Scanner &in, SatBinomConsumer &consumer)
void | writeTerm (const vector< mpz_class > &term, const VarNames &names, FILE *out)
bool | hasMoreInput (Scanner &in) const
const char * | getName () const
const char * | getDescription () const
unique_ptr< BigTermConsumer > | createIdealWriter (FILE *out)
unique_ptr< BigTermConsumer > | createIdealListWriter (FILE *out)
unique_ptr< CoefBigTermConsumer > | createPolynomialWriter (FILE *out)
bool | supportsInput (const DataType &type) const
bool | supportsOutput (const DataType &type) const

## Protected Member Functions

virtual BigTermConsumer * | doCreateIdealWriter (FILE *out)=0
virtual CoefBigTermConsumer * | doCreatePolynomialWriter (FILE *out)=0

## Private Member Functions

virtual const char * | doGetName () const =0
virtual const char * | doGetDescription () const =0
virtual void | doReadIdeal (Scanner &in, InputConsumer &consumer)=0
virtual void | doReadIdeals (Scanner &in, InputConsumer &consumer)=0
virtual void | doReadTerm (Scanner &in, InputConsumer &consumer)=0
virtual void | doReadPolynomial (Scanner &in, CoefBigTermConsumer &consumer)=0
virtual void | doReadSatBinomIdeal (Scanner &in, SatBinomConsumer &consumer)=0
virtual void | doWriteTerm (const vector< mpz_class > &term, const VarNames &names, FILE *out)=0
virtual bool | doHasMoreInput (Scanner &in) const =0
virtual bool | doSupportsInput (const DataType &type) const =0
virtual bool | doSupportsOutput (const DataType &type) const =0

## Detailed Description

An IOHandler implements input and output for some format in such a way that client code does not need to know which format is being used.

An IOHandler need have no mutable state of its own. If it needs to track state, that state is either passed through each method call, or the IOHandler returns an object that takes care of further IO and which itself has state.

Definition at line 41 of file IOHandler.h.

## Constructor & Destructor Documentation

## ~IOHandler()

IOHandler::~IOHandler | ( |  | ) |

virtual

Definition at line 39 of file IOHandler.cpp.

## Member Function Documentation

## createIdealListWriter()

unique_ptr< BigTermConsumer > IOHandler::createIdealListWriter | ( | FILE * | out | ) |

Definition at line 98 of file IOHandler.cpp.

## createIdealWriter()

unique_ptr< BigTermConsumer > IOHandler::createIdealWriter | ( | FILE * | out | ) |

Definition at line 89 of file IOHandler.cpp.

## createPolynomialWriter()

unique_ptr< CoefBigTermConsumer > IOHandler::createPolynomialWriter | ( | FILE * | out | ) |

Definition at line 110 of file IOHandler.cpp.

## doCreateIdealWriter()

virtual BigTermConsumer * IOHandler::doCreateIdealWriter | ( | FILE * | out | ) |

protected pure virtual

Implemented in IO::CoCoA4IOHandler, IO::CountingIOHandler, IO::Fourti2IOHandler, IO::IOHandlerImpl, IO::Macaulay2IOHandler, IO::MonosIOHandler, IO::NewMonosIOHandler, IO::NullIOHandler, and IO::SingularIOHandler.

## doCreatePolynomialWriter()

virtual CoefBigTermConsumer * IOHandler::doCreatePolynomialWriter | ( | FILE * | out | ) |

protected pure virtual

Implemented in IO::CoCoA4IOHandler, IO::CountingIOHandler, IO::Fourti2IOHandler, IO::IOHandlerImpl, IO::Macaulay2IOHandler, IO::NullIOHandler, and IO::SingularIOHandler.

## doGetDescription()

virtual const char * IOHandler::doGetDescription | ( |  | ) | const

private pure virtual

Implemented in IO::IOHandlerImpl.

## doGetName()

virtual const char * IOHandler::doGetName | ( |  | ) | const

private pure virtual

Implemented in IO::IOHandlerImpl.

## doHasMoreInput()

virtual bool IOHandler::doHasMoreInput | ( | Scanner & | in | ) | const

private pure virtual

Implemented in IO::IOHandlerImpl, and IO::NullIOHandler.

## doReadIdeal()

virtual void IOHandler::doReadIdeal | ( | Scanner & | in,
|  | InputConsumer & | consumer )

private pure virtual

Implemented in IO::Fourti2IOHandler, IO::IOHandlerCommon, IO::IOHandlerImpl, IO::NewMonosIOHandler, and IO::NullIOHandler.

## doReadIdeals()

virtual void IOHandler::doReadIdeals | ( | Scanner & | in,
|  | InputConsumer & | consumer )

private pure virtual

Implemented in IO::Fourti2IOHandler, IO::IOHandlerCommon, IO::IOHandlerImpl, IO::NewMonosIOHandler, and IO::NullIOHandler.

## doReadPolynomial()

virtual void IOHandler::doReadPolynomial | ( | Scanner & | in,
|  | CoefBigTermConsumer & | consumer )

private pure virtual

Implemented in IO::Fourti2IOHandler, IO::IOHandlerCommon, IO::IOHandlerImpl, and IO::NullIOHandler.

## doReadSatBinomIdeal()

virtual void IOHandler::doReadSatBinomIdeal | ( | Scanner & | in,
|  | SatBinomConsumer & | consumer )

private pure virtual

Implemented in IO::Fourti2IOHandler, IO::IOHandlerImpl, and IO::NullIOHandler.

## doReadTerm()

virtual void IOHandler::doReadTerm | ( | Scanner & | in,
|  | InputConsumer & | consumer )

private pure virtual

Implemented in IO::CoCoA4IOHandler, IO::Fourti2IOHandler, IO::IOHandlerImpl, IO::Macaulay2IOHandler, IO::MonosIOHandler, IO::NewMonosIOHandler, IO::NullIOHandler, and IO::SingularIOHandler.

## doSupportsInput()

virtual bool IOHandler::doSupportsInput | ( | const DataType & | type | ) | const

private pure virtual

Implemented in IO::IOHandlerImpl.

## doSupportsOutput()

virtual bool IOHandler::doSupportsOutput | ( | const DataType & | type | ) | const

private pure virtual

Implemented in IO::IOHandlerImpl.

## doWriteTerm()

virtual void IOHandler::doWriteTerm | ( | const vector< mpz_class > & | term,
|  | const VarNames & | names,
|  | FILE * | out )

private pure virtual

Implemented in IO::CoCoA4IOHandler, IO::CountingIOHandler, IO::Fourti2IOHandler, IO::Macaulay2IOHandler, IO::MonosIOHandler, IO::NewMonosIOHandler, IO::NullIOHandler, and IO::SingularIOHandler.

## getDescription()

const char * IOHandler::getDescription | ( |  | ) | const

Definition at line 85 of file IOHandler.cpp.

## getName()

const char * IOHandler::getName | ( |  | ) | const

Definition at line 81 of file IOHandler.cpp.

## hasMoreInput()

bool IOHandler::hasMoreInput | ( | Scanner & | in | ) | const

Definition at line 77 of file IOHandler.cpp.

## readIdeal()

void IOHandler::readIdeal | ( | Scanner & | in,
|  | InputConsumer & | consumer )

Read an ideal and feed it to the consumer.

Definition at line 42 of file IOHandler.cpp.

## readIdeals()

void IOHandler::readIdeals | ( | Scanner & | in,
|  | InputConsumer & | consumer )

Read a number of ideals and feed them to the consumer.

Definition at line 46 of file IOHandler.cpp.

## readPolynomial()

void IOHandler::readPolynomial | ( | Scanner & | in,
|  | CoefBigTermConsumer & | consumer )

Definition at line 64 of file IOHandler.cpp.

## readSatBinomIdeal()

void IOHandler::readSatBinomIdeal | ( | Scanner & | in,
|  | SatBinomConsumer & | consumer )

Definition at line 68 of file IOHandler.cpp.

## readTerm()

void IOHandler::readTerm | ( | Scanner & | in,
|  | const VarNames & | names,
|  | vector< mpz_class > & | term )

Definition at line 50 of file IOHandler.cpp.

## supportsInput()

bool IOHandler::supportsInput | ( | const DataType & | type | ) | const

Definition at line 119 of file IOHandler.cpp.

## supportsOutput()

bool IOHandler::supportsOutput | ( | const DataType & | type | ) | const

Definition at line 123 of file IOHandler.cpp.

## writeTerm()

void IOHandler::writeTerm | ( | const vector< mpz_class > & | term,
|  | const VarNames & | names,
|  | FILE * | out )

Definition at line 72 of file IOHandler.cpp.

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

- src/IOHandler.h
- src/IOHandler.cpp