![]() |
Reference documentation for deal.II version 8.5.1
|
#include <deal.II/base/table_handler.h>
Public Member Functions | |
| TableEntry () | |
| template<typename T > | |
| TableEntry (const T &t) | |
| template<typename T > | |
| T | get () const |
| double | get_numeric_value () const |
| void | cache_string (bool scientific, unsigned int precision) const |
| const std::string & | get_cached_string () const |
| TableEntry | get_default_constructed_copy () const |
| template<class Archive > | |
| void | save (Archive &ar, const unsigned int version) const |
| template<class Archive > | |
| void | load (Archive &ar, const unsigned int version) |
Private Types | |
| typedef boost::variant< int, unsigned int, unsigned long long int, double, std::string > | value_type |
Private Attributes | |
| value_type | value |
| std::string | cached_value |
A TableEntry stores the value of a table entry. It can either be of type int, unsigned int, double or std::string. In essence, this structure is the same as boost::variant<int,unsigned int,double,std::string> but we wrap this object in a structure for which we can write a function that can serialize it. This is also why the function is not in fact of type boost::any.
Definition at line 51 of file table_handler.h.
|
private |
Abbreviation for the data type stored by this object.
Definition at line 126 of file table_handler.h.
| internal::TableEntry::TableEntry | ( | ) |
Default constructor.
Definition at line 34 of file table_handler.cc.
| internal::TableEntry::TableEntry | ( | const T & | t | ) |
Constructor. Initialize this table element with the value t.
Definition at line 696 of file table_handler.h.
| T internal::TableEntry::get | ( | ) | const |
Return the value stored by this object. The template type T must be one of int,unsigned int,double,std::string and it must match the data type of the object originally stored in this TableEntry object.
Definition at line 703 of file table_handler.h.
| double internal::TableEntry::get_numeric_value | ( | ) | const |
Return the numeric value of this object if data has been stored in it either as an integer, an unsigned integer, or a double.
Definition at line 38 of file table_handler.cc.
| void internal::TableEntry::cache_string | ( | bool | scientific, |
| unsigned int | precision | ||
| ) | const |
Cache the contained value with the given formatting and return it. The given parameters from the column definition are used for the formatting. The value is cached as a string internally in cached_value. The cache needs to be invalidated with this routine if the formatting of the column changes.
Definition at line 76 of file table_handler.cc.
| const std::string & internal::TableEntry::get_cached_string | ( | ) | const |
Return the value cached using cache_string(). This is just a wrapper around cached_value.
Definition at line 94 of file table_handler.cc.
| TableEntry internal::TableEntry::get_default_constructed_copy | ( | ) | const |
Return a TableEntry object that has the same data type of the stored value but with a value that is default constructed for this data type. This is used to pad columns below previously set ones.
Definition at line 114 of file table_handler.cc.
| void internal::TableEntry::save | ( | Archive & | ar, |
| const unsigned int | version | ||
| ) | const |
Write the data of this object to a stream for the purpose of serialization.
Definition at line 725 of file table_handler.h.
| void internal::TableEntry::load | ( | Archive & | ar, |
| const unsigned int | version | ||
| ) |
Read the data of this object from a stream for the purpose of serialization.
Definition at line 763 of file table_handler.h.
|
private |
Stored value.
Definition at line 131 of file table_handler.h.
|
mutableprivate |
Cache the current value as a string.
Definition at line 136 of file table_handler.h.
1.8.13