46 for (vector<string>::const_iterator name = names.begin();
47 name != names.end(); ++name) {
49 ASSERT(handler.get() != 0);
53 inputFormats += handler->getName();
57 outputFormats += handler->getName();
63 "The format used to read the input. " 64 "This action supports the formats:\n " + inputFormats +
".\n" 67 "\" instructs Frobby to guess the format.\n" 68 "Type 'frobby help io' for more information on input formats.";
72 (
"iformat", desc.c_str(),
79 "The format used to write the output. " 80 "This action supports the formats:\n " + outputFormats +
".\n";
85 +
"\" instructs Frobby to use the input format.\n";
87 desc +=
"Type 'frobby help io' for more information on output formats.";
131 ASSERT(handler.get() != 0);
137 ASSERT(handler.get() != 0);
163 << handler->getName()
164 <<
" format does not support input of "
IOParameters(const DataType &input, const DataType &output)
auto_ptr< IOHandler > createInputHandler() const
void validateFormats() const
const string & getOutputFormat() const
const DataType & _inputType
const string & getFormat() const
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
void autoDetectInputFormat(Scanner &in)
If using the input format, this must be called before validating the ideals, since the auto detect fo...
string getFormatNameIndicatingToGuessTheInputFormat()
Using the returned string in place of an (input) format name indicates to guess the format based on w...
const DataType & _outputType
auto_ptr< StringParameter > _inputFormat
string autoDetectFormat(Scanner &in)
Return the format of what in is reading based on the first non-whitespace character.
void setInputFormat(const string &format)
This class offers an input interface which is more convenient and for some purposes more efficient th...
void getIOHandlerNames(vector< string > &names)
Add the name of each fomat to names.
auto_ptr< IOHandler > createOutputHandler() const
bool isNull() const
Returns true if this object was returned by getNullType().
const string & getInputFormat() const
void addParameter(Parameter *parameter)
void setFormat(const string &format)
static const char * staticGetName()
auto_ptr< StringParameter > _outputFormat
const char * getName() const
Returns the name of the structure.
A facade for input and output of mathematical objects.
string getFormatNameIndicatingToUseInputFormatAsOutputFormat()
Using the returned string in place of an (output) format name indicates to use the input format as th...
void reportError(const string &errorMsg)
A replacement for stringstream.
auto_ptr< IOHandler > createIOHandler(const string &prefix)
Returns an IOHandler for the format whose name has the given prefix.
void setOutputFormat(const string &format)