Frobby  0.9.5
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
IOHandler Class Referenceabstract

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:
IO::IOHandlerImpl IO::CountingIOHandler IO::Fourti2IOHandler IO::IOHandlerCommon IO::NewMonosIOHandler IO::NullIOHandler IO::CoCoA4IOHandler IO::Macaulay2IOHandler IO::MonosIOHandler IO::SingularIOHandler

Public Member Functions

virtual ~IOHandler ()
 
void readIdeal (Scanner &in, InputConsumer &consumer)
 Read an ideal and feed it to the consumer. More...
 
void readIdeals (Scanner &in, InputConsumer &consumer)
 Read a number of ideals and feed them to the consumer. More...
 
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
 
auto_ptr< BigTermConsumercreateIdealWriter (FILE *out)
 
auto_ptr< BigTermConsumercreateIdealListWriter (FILE *out)
 
auto_ptr< CoefBigTermConsumercreatePolynomialWriter (FILE *out)
 
bool supportsInput (const DataType &type) const
 
bool supportsOutput (const DataType &type) const
 

Protected Member Functions

virtual BigTermConsumerdoCreateIdealWriter (FILE *out)=0
 
virtual CoefBigTermConsumerdoCreatePolynomialWriter (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()

auto_ptr< BigTermConsumer > IOHandler::createIdealListWriter ( FILE *  out)

Definition at line 98 of file IOHandler.cpp.

◆ createIdealWriter()

auto_ptr< BigTermConsumer > IOHandler::createIdealWriter ( FILE *  out)

Definition at line 89 of file IOHandler.cpp.

◆ createPolynomialWriter()

auto_ptr< CoefBigTermConsumer > IOHandler::createPolynomialWriter ( FILE *  out)

Definition at line 110 of file IOHandler.cpp.

◆ doCreateIdealWriter()

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

◆ doCreatePolynomialWriter()

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

◆ doGetDescription()

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

Implemented in IO::IOHandlerImpl.

◆ doGetName()

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

Implemented in IO::IOHandlerImpl.

◆ doHasMoreInput()

virtual bool IOHandler::doHasMoreInput ( Scanner in) const
privatepure virtual

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

◆ doReadIdeal()

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

◆ doReadIdeals()

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

◆ doReadPolynomial()

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

◆ doReadSatBinomIdeal()

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

◆ doReadTerm()

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

◆ doSupportsInput()

virtual bool IOHandler::doSupportsInput ( const DataType type) const
privatepure virtual

Implemented in IO::IOHandlerImpl.

◆ doSupportsOutput()

virtual bool IOHandler::doSupportsOutput ( const DataType type) const
privatepure virtual

Implemented in IO::IOHandlerImpl.

◆ doWriteTerm()

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

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