12#ifndef ARCANE_STD_SIMPLETABLEINTERNALCOMPARATOR_H
13#define ARCANE_STD_SIMPLETABLEINTERNALCOMPARATOR_H
17#include "arcane/core/ISimpleTableInternalComparator.h"
18#include "arcane/core/ISimpleTableInternalMng.h"
19#include "arcane/core/ISimpleTableReaderWriter.h"
21#include "arcane/std/SimpleTableInternalMng.h"
22#include "arcane/utils/Array.h"
23#include "arcane/utils/FatalErrorException.h"
36class SimpleTableInternalComparator
42 : m_simple_table_internal_reference(sti_ref)
43 , m_simple_table_internal_to_compare(sti_to_compare)
44 , m_simple_table_internal_mng_reference(m_simple_table_internal_reference)
45 , m_simple_table_internal_mng_to_compare(m_simple_table_internal_to_compare)
47 , m_is_excluding_regex_rows(
false)
49 , m_is_excluding_regex_columns(
false)
50 , m_is_excluding_array_rows(
false)
51 , m_is_excluding_array_columns(
false)
56 ARCANE_FATAL(
"The reference passed as a parameter is Null.");
59 SimpleTableInternalComparator()
60 : m_simple_table_internal_reference()
61 , m_simple_table_internal_to_compare()
62 , m_simple_table_internal_mng_reference()
63 , m_simple_table_internal_mng_to_compare()
65 , m_is_excluding_regex_rows(
false)
67 , m_is_excluding_regex_columns(
false)
68 , m_is_excluding_array_rows(
false)
69 , m_is_excluding_array_columns(
false)
75 virtual ~SimpleTableInternalComparator() =
default;
79 bool compare(
bool compare_dimension_too)
override;
121 bool m_is_excluding_regex_rows;
124 bool m_is_excluding_regex_columns;
127 bool m_is_excluding_array_rows;
130 bool m_is_excluding_array_columns;
132 std::map<String, Real> m_epsilons_column;
133 std::map<String, Real> m_epsilons_row;
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
Class interface representing a SimpleTableInternal comparator (aka STI).
bool isNull() const
Indicates if the counter references a non-null instance.
Reference to an instance.
bool compare(bool compare_dimension_too) override
Method allowing comparison of the values of the two STIs.
Ref< SimpleTableInternal > internalRef() override
Method allowing retrieval of a reference to the used "reference" SimpleTableInternal object.
bool _exploreColumn(const String &column_name)
Method to determine whether the column named column_name should be explored or not.
void setInternalToCompare(const Ref< SimpleTableInternal > &simple_table_internal) override
Method allowing definition of a reference to the "to compare" SimpleTableInternal.
void isAnArrayExclusiveRows(bool is_exclusive) override
Method allowing definition of whether the row array represents rows to include in the comparison (fal...
void setInternalRef(const Ref< SimpleTableInternal > &simple_table_internal) override
Method allowing definition of a reference to a "reference" SimpleTableInternal.
void isAnArrayExclusiveColumns(bool is_exclusive) override
Method allowing definition of whether the column array represents columns to include in the compariso...
Ref< SimpleTableInternal > internalToCompare() override
Method allowing retrieval of a reference to the used "to compare" SimpleTableInternal object.
bool addEpsilonRow(const String &row_name, Real epsilon) override
Method allowing the definition of an epsilon for a given row. This epsilon must be positive to be con...
bool addRowForComparing(const String &row_name) override
Method allowing the addition of a row to the list of rows to compare.
bool _exploreRows(const String &row_name)
Method to determine whether the row named column_name should be explored or not.
bool compareElem(const String &column_name, const String &row_name) override
Method allowing comparison of a single element. Both SimpleTableInternals are represented by Refs,...
void isARegexExclusiveRows(bool is_exclusive) override
Method allowing specification that the regular expression excludes rows instead of including them.
bool addColumnForComparing(const String &column_name) override
Method allowing the addition of a column to the list of columns to compare.
void editRegexColumns(const String ®ex_column) override
Method allowing the addition of a regular expression to determine the columns to compare.
void editRegexRows(const String ®ex_row) override
Method allowing the addition of a regular expression to determine the rows to compare.
void isARegexExclusiveColumns(bool is_exclusive) override
Method allowing specification that the regular expression excludes columns instead of including them.
void clearComparator() override
Method allowing the clearing of comparison arrays and regular expressions. Does not affect the STIs.
bool addEpsilonColumn(const String &column_name, Real epsilon) override
Method allowing the definition of an epsilon for a given column. This epsilon must be positive to be ...
Unicode character string.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
double Real
Type representing a real number.
UniqueArray< String > StringUniqueArray
Dynamic 1D array of strings.