Go to the documentation of this file.
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 "
void setOutputFormat(const string &format)
string getFormatNameIndicatingToGuessTheInputFormat()
Using the returned string in place of an (input) format name indicates to guess the format based on w...
This class offers an input interface which is more convenient and for some purposes more efficient th...
void validateFormats() const
auto_ptr< StringParameter > _outputFormat
auto_ptr< IOHandler > createInputHandler() const
void autoDetectInputFormat(Scanner &in)
If using the input format, this must be called before validating the ideals, since the auto detect fo...
static const char * staticGetName()
void getIOHandlerNames(vector< string > &names)
Add the name of each fomat to names.
void setInputFormat(const string &format)
const DataType & _inputType
auto_ptr< IOHandler > createIOHandler(const string &prefix)
Returns an IOHandler for the format whose name has the given prefix.
IOParameters(const DataType &input, const DataType &output)
const string & getOutputFormat() const
void reportError(const string &errorMsg)
const char * getName() const
Returns the name of the structure.
A replacement for stringstream.
const string & getInputFormat() const
bool isNull() const
Returns true if this object was returned by getNullType().
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
auto_ptr< IOHandler > createOutputHandler() const
const DataType & _outputType
void addParameter(Parameter *parameter)
string autoDetectFormat(Scanner &in)
Return the format of what in is reading based on the first non-whitespace character.
string getFormatNameIndicatingToUseInputFormatAsOutputFormat()
Using the returned string in place of an (output) format name indicates to use the input format as th...
const string & getFormat() const
auto_ptr< StringParameter > _inputFormat
void setFormat(const string &format)
A facade for input and output of mathematical objects.