Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_TableColumn.cpp
1// @HEADER
2// *****************************************************************************
3// Teuchos: Common Tools Package
4//
5// Copyright 2004 NTESS and the Teuchos contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
11
12using namespace Teuchos;
13
14
16 : data_(vals.size())
17{
18 for (Array<std::string>::size_type i=0; i<vals.size(); i++)
19 {
20 data_[i] = rcp(new StringEntry(vals[i]));
21 }
22}
23
24
26 int precision,
27 const std::ios_base::fmtflags& flags)
28 : data_(vals.size())
29{
30 for (Array<double>::size_type i=0; i<vals.size(); i++)
31 {
32 data_[i] = rcp(new DoubleEntry(vals[i], precision, flags));
33 }
34}
35
36
38 const Array<double>& second,
39 int precision,
40 const std::ios_base::fmtflags& flags,
42 : data_(first.size())
43{
44 std::ios_base::fmtflags fixedflags = flags;
45 fixedflags &= ~std::cout.scientific; // unset scientific
46 fixedflags &= ~std::cout.fixed; // unset fixed
47 for (Array<double>::size_type i=0; i<first.size(); i++)
48 {
49 RCP<DoubleEntry> x1 = rcp(new DoubleEntry(first[i], precision, flags));
50 RCP<DoubleEntry> x2 = rcp(new DoubleEntry(second[i], precision, fixedflags));
51 data_[i]
54 }
55}
56
57void TableColumn::addEntry(const RCP<TableEntry>& entry_in)
58{
59 data_.append(entry_in);
60}
61
62
63
A column of TableEntry objects.
An entry containing two subentries, with the second to be written in parentheses after the first....
A table entry that is a simple double-precision number.
Smart reference counting pointer class for automatic garbage collection.
A table entry that is a simple std::string.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.