51 return toString().substr(0, maxWidth);
59 :
TableEntry(), data_(value), precision_(precision)
64 std::ostringstream toss;
65 toss << std::setprecision(precision_) << data_;
79 std::ostringstream toss;
103 CompoundEntryWithParentheses
106 bool spaceBeforeParens)
110 spaceBeforeParens_(spaceBeforeParens)
115 std::ostringstream toss;
117 toss << first_->toString();
118 if (spaceBeforeParens_) toss <<
" ";
119 toss <<
"(" << second_->toString() <<
")";
virtual std::string toString() const =0
Return a std::string representation of this entry.
An entry, perhaps compound, to be written into a table.
virtual std::string toChoppedString(int maxWidth) const
Return a std::string representation of this entry, truncated if necessary to fit within the given col...
DoubleEntry(const double &value, int precision)
Construct with a value and a precision.
virtual std::string toString() const
Write the specified entry to a std::string.
Base class for representing compound entries in a printed table of data. "Compound" means that each e...
virtual std::string toString() const
Write the specified entry to a std::string.
virtual std::string toString() const
Write the specified entry to a std::string.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos, as well as a number of utility routines.
virtual std::string toString() const
Write the specified entry to a std::string.
Smart reference counting pointer class for automatic garbage collection.
IntEntry(int value)
Construct with a value.
StringEntry(std::string value)
Construct with a value.