PandA-2024.02
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Static Private Attributes
Translator::LatexColumnFormat Class Reference

Class describing the characteristic of a column of latex table. More...

Collaboration diagram for Translator::LatexColumnFormat:
Collaboration graph
[legend]

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, TextFormatstring_to_TF
 Map string->enum for text format. More...
 
static CustomUnorderedMap< std::string, ComparisonOperatorstring_to_CO
 Map string->enum for comparison operator. More...
 
static CustomUnorderedMap< std::string, TotalFormatstring_to_TOF
 Map string->enum for total format. More...
 

Detailed Description

Class describing the characteristic of a column of latex table.

Definition at line 93 of file translator.hpp.

Member Typedef Documentation

◆ ComparisonOperator

Comparison operator.

Definition at line 100 of file translator.hpp.

◆ TextFormat

Text format.

Definition at line 97 of file translator.hpp.

◆ TotalFormat

Total format.

Definition at line 103 of file translator.hpp.

Constructor & Destructor Documentation

◆ LatexColumnFormat()

Translator::LatexColumnFormat::LatexColumnFormat ( )

Member Function Documentation

◆ Compare()

bool Translator::LatexColumnFormat::Compare ( const long double  A,
const ComparisonOperator  comparator,
const long double  B 
)
static

Return A operator B.

Parameters
Ais the first operand
comparatoris the operator to be applied
Bis the second operand
Returns
true if A operator B

Definition at line 154 of file translator.cpp.

References STR, and THROW_UNREACHABLE.

Referenced by Translator::write_to_latex().

Here is the caller graph for this function:

◆ get_CO()

static ComparisonOperator Translator::LatexColumnFormat::get_CO ( const std::string &  string)
static

Given a string return the corresponding enum.

Parameters
stringis the string to be analyzed

Referenced by Translator::read_column_formats().

Here is the caller graph for this function:

◆ get_TF()

static TextFormat Translator::LatexColumnFormat::get_TF ( const std::string &  string)
static

Given a string return the corresponding enum.

Parameters
stringis the string to be analyzed

Referenced by Translator::read_column_formats().

Here is the caller graph for this function:

◆ GetTotalFormat()

static TotalFormat Translator::LatexColumnFormat::GetTotalFormat ( const std::string &  string)
static

Given a string return the corresponding enum.

Parameters
stringis the string to be analyzed

Referenced by Translator::read_column_formats().

Here is the caller graph for this function:

Field Documentation

◆ column_alignment

std::string Translator::LatexColumnFormat::column_alignment

The alignment of the column.

Definition at line 126 of file translator.hpp.

◆ column_name

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().

◆ columns_prefix

std::vector<std::string> Translator::LatexColumnFormat::columns_prefix

The prefix of the columns.

Definition at line 120 of file translator.hpp.

◆ compared_columns

CustomUnorderedSet<std::string> Translator::LatexColumnFormat::compared_columns

The columns with which this has to be compared.

Definition at line 135 of file translator.hpp.

◆ comparison_operator

ComparisonOperator Translator::LatexColumnFormat::comparison_operator

The operator of the comparison.

Definition at line 138 of file translator.hpp.

◆ precision

std::streamsize Translator::LatexColumnFormat::precision

The precision of the number.

Definition at line 132 of file translator.hpp.

◆ source_name

std::string Translator::LatexColumnFormat::source_name

The xml name of this column.

Definition at line 123 of file translator.hpp.

◆ string_to_CO

CustomUnorderedMap< std::string, Translator::LatexColumnFormat::ComparisonOperator > Translator::LatexColumnFormat::string_to_CO
staticprivate

Map string->enum for comparison operator.

Definition at line 110 of file translator.hpp.

Referenced by LatexColumnFormat().

◆ string_to_TF

CustomUnorderedMap< std::string, Translator::LatexColumnFormat::TextFormat > Translator::LatexColumnFormat::string_to_TF
staticprivate

Map string->enum for text format.

Definition at line 107 of file translator.hpp.

Referenced by LatexColumnFormat().

◆ string_to_TOF

CustomUnorderedMap< std::string, Translator::LatexColumnFormat::TotalFormat > Translator::LatexColumnFormat::string_to_TOF
staticprivate

Map string->enum for total format.

Definition at line 113 of file translator.hpp.

Referenced by LatexColumnFormat().

◆ text_format

TextFormat Translator::LatexColumnFormat::text_format

The text format of the column.

Definition at line 129 of file translator.hpp.

◆ total_format

TotalFormat Translator::LatexColumnFormat::total_format

The format of the total of this column.

Definition at line 141 of file translator.hpp.


The documentation for this class was generated from the following files:

Generated on Mon Feb 12 2024 13:04:06 for PandA-2024.02 by doxygen 1.8.13