44 #include "Teuchos_Assert.hpp"
52 std::ostringstream toss;
53 for (
int i=0; i<pageWidth_; i++)
64 std::ostringstream toss;
65 for (
int i=0; i<pageWidth_; i++)
75 std::ostringstream toss;
76 for (
int i=0; i<size; i++)
85 const std::string& name,
89 int rtn = name.length();
91 for (
int i=0; i<column.numRows(); i++)
93 int x = column.entry(i)->toString().length();
94 rtn = std::max(rtn, x);
97 return rtn + columnSpacing_;
107 && columnWidths_.
size() != 0);
111 int cw = defaultColumnWidth();
112 if (columnWidths_.
size() != 0) cw = columnWidths_[i];
114 out << std::left << std::setw(cw) << entries[i]->
toString();
129 entries[i] = columns[i].entry(rowIndex);
138 const std::string& header,
148 int cw = defaultColumnWidth();
149 if (columnWidths_.
size() != 0) cw = columnWidths_[i];
157 int numBlanks = (pageWidth_ - header.length())/2;
158 out <<
blanks(numBlanks) << header << std::endl;
164 int cw = defaultColumnWidth();
165 if (columnWidths_.
size() != 0) cw = columnWidths_[i];
167 out << std::left << std::setw(cw) << columnNames[i];
172 int numRows = columns[0].numRows();
179 for (
int i=0; i<numRows; i++)
181 if (i % lineInterval_ == 0)
182 out << std::left <<
thinline() << std::endl;
std::string toString() const
Convert an Array to an std::string
Smart reference counting pointer class for automatic garbage collection.
#define TEUCHOS_ASSERT_EQUALITY(val1, val2)
This macro is checks that to numbers are equal and if not then throws an exception with a good error ...
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
This macro is designed to be a short version of TEUCHOS_TEST_FOR_EXCEPTION() that is easier to call...
Memory-safe templated array class that encapsulates std::vector.