PandA-2024.02
|
Class describing the characteristic of a column of latex table. More...
Public Types | |
using | TextFormat = enum { BOOST_PP_SEQ_FOR_EACH(TF_ENUM, BOOST_PP_EMPTY, TEXT_FORMAT) } |
Text format. More... | |
using | ComparisonOperator = enum { BOOST_PP_SEQ_FOR_EACH(CO_ENUM, BOOST_PP_EMPTY, COMPARISON_OPERATOR) } |
Comparison operator. More... | |
using | TotalFormat = enum { BOOST_PP_SEQ_FOR_EACH(TOF_ENUM, BOOST_PP_EMPTY, TOTAL_FORMAT) } |
Total format. More... | |
Public Member Functions | |
LatexColumnFormat () | |
Constructor. More... | |
Static Public Member Functions | |
static TextFormat | get_TF (const std::string &string) |
Given a string return the corresponding enum. More... | |
static ComparisonOperator | get_CO (const std::string &string) |
Given a string return the corresponding enum. More... | |
static TotalFormat | GetTotalFormat (const std::string &string) |
Given a string return the corresponding enum. More... | |
static bool | Compare (const long double A, const ComparisonOperator comparator, const long double B) |
Return A operator B. More... | |
Data Fields | |
std::string | column_name |
The name of the column. More... | |
std::vector< std::string > | columns_prefix |
The prefix of the columns. More... | |
std::string | source_name |
The xml name of this column. More... | |
std::string | column_alignment |
The alignment of the column. More... | |
TextFormat | text_format |
The text format of the column. More... | |
std::streamsize | precision |
The precision of the number. More... | |
CustomUnorderedSet< std::string > | compared_columns |
The columns with which this has to be compared. More... | |
ComparisonOperator | comparison_operator |
The operator of the comparison. More... | |
TotalFormat | total_format |
The format of the total of this column. More... | |
Static Private Attributes | |
static CustomUnorderedMap< std::string, TextFormat > | string_to_TF |
Map string->enum for text format. More... | |
static CustomUnorderedMap< std::string, ComparisonOperator > | string_to_CO |
Map string->enum for comparison operator. More... | |
static CustomUnorderedMap< std::string, TotalFormat > | string_to_TOF |
Map string->enum for total format. More... | |
Class describing the characteristic of a column of latex table.
Definition at line 93 of file translator.hpp.
using Translator::LatexColumnFormat::ComparisonOperator = enum { BOOST_PP_SEQ_FOR_EACH(CO_ENUM, BOOST_PP_EMPTY, COMPARISON_OPERATOR) } |
Comparison operator.
Definition at line 100 of file translator.hpp.
using Translator::LatexColumnFormat::TextFormat = enum { BOOST_PP_SEQ_FOR_EACH(TF_ENUM, BOOST_PP_EMPTY, TEXT_FORMAT) } |
Text format.
Definition at line 97 of file translator.hpp.
using Translator::LatexColumnFormat::TotalFormat = enum { BOOST_PP_SEQ_FOR_EACH(TOF_ENUM, BOOST_PP_EMPTY, TOTAL_FORMAT) } |
Total format.
Definition at line 103 of file translator.hpp.
Translator::LatexColumnFormat::LatexColumnFormat | ( | ) |
Constructor.
Definition at line 97 of file translator.cpp.
References BOOST_PP_SEQ_FOR_EACH, CO_NAME, COMPARISON_OPERATOR, string_to_CO, string_to_TF, string_to_TOF, TEXT_FORMAT, TF_NAME, THROW_ASSERT, TOF_NAME, and TOTAL_FORMAT.
|
static |
Return A operator B.
A | is the first operand |
comparator | is the operator to be applied |
B | is the second operand |
Definition at line 154 of file translator.cpp.
References STR, and THROW_UNREACHABLE.
Referenced by Translator::write_to_latex().
|
static |
Given a string return the corresponding enum.
string | is the string to be analyzed |
Referenced by Translator::read_column_formats().
|
static |
Given a string return the corresponding enum.
string | is the string to be analyzed |
Referenced by Translator::read_column_formats().
|
static |
Given a string return the corresponding enum.
string | is the string to be analyzed |
Referenced by Translator::read_column_formats().
std::string Translator::LatexColumnFormat::column_alignment |
The alignment of the column.
Definition at line 126 of file translator.hpp.
std::string Translator::LatexColumnFormat::column_name |
The name of the column.
Definition at line 117 of file translator.hpp.
Referenced by Translator::read_column_formats().
std::vector<std::string> Translator::LatexColumnFormat::columns_prefix |
The prefix of the columns.
Definition at line 120 of file translator.hpp.
CustomUnorderedSet<std::string> Translator::LatexColumnFormat::compared_columns |
The columns with which this has to be compared.
Definition at line 135 of file translator.hpp.
ComparisonOperator Translator::LatexColumnFormat::comparison_operator |
The operator of the comparison.
Definition at line 138 of file translator.hpp.
std::streamsize Translator::LatexColumnFormat::precision |
The precision of the number.
Definition at line 132 of file translator.hpp.
std::string Translator::LatexColumnFormat::source_name |
The xml name of this column.
Definition at line 123 of file translator.hpp.
|
staticprivate |
Map string->enum for comparison operator.
Definition at line 110 of file translator.hpp.
Referenced by LatexColumnFormat().
|
staticprivate |
Map string->enum for text format.
Definition at line 107 of file translator.hpp.
Referenced by LatexColumnFormat().
|
staticprivate |
Map string->enum for total format.
Definition at line 113 of file translator.hpp.
Referenced by LatexColumnFormat().
TextFormat Translator::LatexColumnFormat::text_format |
The text format of the column.
Definition at line 129 of file translator.hpp.
TotalFormat Translator::LatexColumnFormat::total_format |
The format of the total of this column.
Definition at line 141 of file translator.hpp.