52 "The \"LIST\" statement lists a named table.") {
54 (
"TABLE",
"Name of table to be listed");
56 (
"FILE",
"Name of file to receive output",
"LIST");
58 (
"ALL",
"Set true to list all columns");
60 (
"COLUMN",
"Column specifiers");
87 if(fileName ==
"TERM") {
88 list(std::cout, table);
90 std::ofstream os(fileName.c_str());
95 "Unable to open output stream \"" +
101 "Table \"" + tableName +
"\" not found.");
118 std::vector<std::list<Token> > columns =
121 for(std::vector<std::list<Token> >
::iterator i = columns.begin();
122 i != columns.end(); ++i) {
123 std::list<Token> tokenList = *i;
126 int width = 12, prec = 8;
135 "Invalid <precision> for table column \"" +
141 "Invalid <width> for table column \"" +
146 if(width < prec + 6) width = prec + 6;
PtrToScalar< double > parseTableExpression(Statement &, const Table *)
Parse table expression (depends on a table's rows).
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
Attribute makeTokenListArray(const std::string &name, const std::string &help)
Make token list attribute.
bool getBool(const Attribute &attr)
Return logical value.
std::string getString(const Attribute &attr)
Get string value.
std::vector< std::list< Token > > getTokenListArray(const Attribute &attr)
Return token list array value.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
std::string::iterator iterator
The base class for all OPAL actions.
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
const std::string & getOpalName() const
Return object name.
std::vector< Attribute > itsAttr
The object attributes.
The base class for all OPAL tables.
virtual void printTable(std::ostream &, const CellArray &) const =0
Print list for the table.
virtual CellArray getDefault() const =0
Return the default print columns.
std::vector< Cell > CellArray
An array of cell descriptors.
static Table * find(const std::string &name)
Find named Table.
Descriptor for printing a table cell.
A simple input statement in token form.
bool integer(int &value)
Return signed integer.
bool delimiter(char c)
Test for delimiter.
void start()
Return to start.
virtual List * clone(const std::string &name)
Make clone.
List()
Exemplar constructor.
void list(std::ostream &, Table *)
virtual void execute()
Execute the command.
The base class for all OPAL exceptions.