33 "Display this help screen.",
34 "Typing `frobby help' displays a list of the available actions.\n" 35 "Typing `frobby help ACTION' displays a detailed description of that " 37 "As an example, typing `frobby help irrdecom' will yield detailed " 39 "about the irrdecom action.",
61 out <<
"Displaying information on action: " << action.
getName() <<
"\n\n";
64 vector<Parameter*> parameters;
66 sort(parameters.begin(), parameters.end(), paramCmp);
70 if (!parameters.empty()) {
71 fprintf(stderr,
"\nThe parameters accepted by %s are as follows.\n",
74 typedef vector<Parameter*>::const_iterator cit;
75 for (cit it = parameters.begin(); it != parameters.end(); ++it) {
76 string defaultValue = (*it)->getValueAsString();
77 fprintf(stderr,
"\n -%s %s (default is %s)\n",
78 (*it)->getName().c_str(),
79 (*it)->getArgumentType().c_str(),
80 (*it)->getValueAsString().c_str());
81 display((*it)->getDescription(),
" ");
88 (
"Displaying information on topic: io\n" 90 "Frobby understands several file formats. These are not documented, " 91 "but they are simple enough that seeing an example should be enough " 92 "to figure them out. Getting an example is as simple as making " 93 "Frobby produce output in that format. " 95 "It is true of all the formats that white-space is insignificant, " 96 "but other than that Frobby is quite fuzzy about how the input " 97 "must look. E.g. a Macaulay 2 file containing a monomial ideal " 98 "must start with \"R = \", so writing \"r = \" with a lower-case r " 99 "is an error. To help with this, Frobby tries to say what is wrong " 100 "if there is an error." 102 "If no input format is specified, Frobby will guess at the format, " 103 "and it will guess correctly if there are no errors in the input. " 104 "If no output format is specified, Frobby will use the same format " 105 "for output as for input. If you want to force Frobby to use a " 106 "specific format, use the -iformat and -oformat options. Using " 107 "these with the transform action allows translation between formats. " 109 "The formats available in Frobby and the types of data they " 110 "support are as follows. " 113 vector<string> names;
115 for (vector<string>::const_iterator name = names.begin();
116 name != names.end(); ++name) {
118 ASSERT(handler.get() != 0);
120 fprintf(stderr,
"\n* The format %s: %s\n",
122 handler->getDescription());
126 for (vector<const DataType*>::const_iterator typeIt = types.begin();
127 typeIt != types.end(); ++typeIt) {
130 bool input = handler->supportsInput(type);
131 bool output = handler->supportsOutput(type);
133 const char* formatStr =
"";
135 formatStr =
" - supports input and output of %s.\n";
137 formatStr =
" - supports input of %s.\n";
139 formatStr =
" - supports output of %s.\n";
141 fprintf(stderr, formatStr, type.
getName());
159 <<
" Copyright (C) 2007 Bjarke Hammersholt Roune\n";
161 "Frobby performs a number of computations related to monomial " 162 "ideals.\nYou run it by typing `frobby ACTION', where ACTION is " 163 "one of the following. " 170 vector<string> names;
172 for (vector<string>::const_iterator it = names.begin();
173 it != names.end(); ++it) {
175 if (action->displayAction()) {
176 printer[0] << action->getName() <<
'\n';
177 printer[1] << action->getShortDescription() <<
'\n';
183 "\nType 'frobby help ACTION' to get more details on a specific action.\n" 184 "Note that all input and output is done via the standard streams.\n" 185 "Type 'frobby help io' for more information on input and output formats.\n" 186 "See www.broune.com for further information and new versions of Frobby.\n" 188 "Frobby is free software and you are welcome to redistribute it under certain " 189 "conditions. Frobby comes with ABSOLUTELY NO WARRANTY. See the GNU General " 190 "Public License version 2.0 in the file COPYING for details.\n";
const char * getDescription() const
static auto_ptr< Action > createActionWithPrefix(const string &prefix)
void addColumn(bool flushLeft=true, const string &prefix=" ", const string &suffix="")
void displayActionHelp(Action &action)
virtual void processNonParameter(const char *str)
virtual void obtainParameters(vector< Parameter *> ¶meters)
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
This file contains functions for printing strings to standard error.
const char *const version
void getIOHandlerNames(vector< string > &names)
Add the name of each fomat to names.
virtual bool displayAction() const
Returns whether this action should be shown to the user by the help action.
virtual void obtainParameters(vector< Parameter *> ¶meters)
const char * getName() const
static vector< const DataType * > getTypes()
Returns a vector of all types except null.
const char * getName() const
Returns the name of the structure.
static void getActionNames(vector< string > &names)
void print(ostream &out) const
const string & getName() const
static const char * staticGetName()
A replacement for stringstream.
auto_ptr< IOHandler > createIOHandler(const string &prefix)
Returns an IOHandler for the format whose name has the given prefix.
void display(const string &msg, const string &prepend)
Display msg to standard error with automatic line breaking.