Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ISimpleTableComparator.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* ISimpleTableComparator.h (C) 2000-2025 */
9/* */
10/* Interface for services allowing the comparison of an ISimpleTableOutput */
11/* and a reference file. */
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_CORE_ISIMPLETABLECOMPARATOR_H
14#define ARCANE_CORE_ISIMPLETABLECOMPARATOR_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
18#include "arcane/core/ISimpleTableOutput.h"
19
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
46class ARCANE_CORE_EXPORT ISimpleTableComparator
47{
48 public:
49
50 virtual ~ISimpleTableComparator() = default;
51
52 public:
53
65 virtual void init(ISimpleTableOutput* simple_table_output_ptr) = 0;
66
72 virtual void clear() = 0;
73
79 virtual void print(Integer rank = 0) = 0;
80
91 virtual void editRootDirectory(const Directory& root_directory) = 0;
92
107 virtual bool writeReferenceFile(Integer rank = -1) = 0;
108
119 virtual bool readReferenceFile(Integer rank = -1) = 0;
120
128 virtual bool isReferenceExist(Integer rank = -1) = 0;
129
139 virtual bool compareWithReference(Integer rank = -1, bool compare_dimension_too = false) = 0;
140
156 virtual bool compareElemWithReference(const String& column_name, const String& row_name, Integer rank = -1) = 0;
157
171 virtual bool compareElemWithReference(Real elem, const String& column_name, const String& row_name, Integer rank = -1) = 0;
172
181 virtual bool addColumnForComparing(const String& column_name) = 0;
190 virtual bool addRowForComparing(const String& row_name) = 0;
191
201 virtual void isAnArrayExclusiveColumns(bool is_exclusive) = 0;
202
212 virtual void isAnArrayExclusiveRows(bool is_exclusive) = 0;
213
220 virtual void editRegexColumns(const String& regex_column) = 0;
227 virtual void editRegexRows(const String& regex_row) = 0;
228
235 virtual void isARegexExclusiveColumns(bool is_exclusive) = 0;
242 virtual void isARegexExclusiveRows(bool is_exclusive) = 0;
243
257 virtual bool addEpsilonColumn(const String& column_name, Real epsilon) = 0;
258
272 virtual bool addEpsilonRow(const String& row_name, Real epsilon) = 0;
273};
274
275/*---------------------------------------------------------------------------*/
276/*---------------------------------------------------------------------------*/
277
278} // End namespace Arcane
279
280/*---------------------------------------------------------------------------*/
281/*---------------------------------------------------------------------------*/
282
283#endif
Declarations of types on entities.
Class managing a directory.
Definition Directory.h:36
Class interface representing a table comparator. To be used with a service implementing ISimpleTableO...
virtual bool readReferenceFile(Integer rank=-1)=0
Method allowing reference files to be read.
virtual void editRegexRows(const String &regex_row)=0
Method allowing a regular expression to be added to determine the rows to compare.
virtual void isAnArrayExclusiveRows(bool is_exclusive)=0
Method allowing definition whether the array of rows represents the rows to include in the comparison...
virtual void editRootDirectory(const Directory &root_directory)=0
Method allowing the root directory to be modified. This allows writing or searching for reference fil...
virtual bool compareWithReference(Integer rank=-1, bool compare_dimension_too=false)=0
Method allowing the ISimpleTableOutput object to be compared to the reference files.
virtual bool addEpsilonColumn(const String &column_name, Real epsilon)=0
Method allowing an epsilon to be defined for a given column. This epsilon must be positive to be take...
virtual void isARegexExclusiveColumns(bool is_exclusive)=0
Method allowing to request that the regular expression excludes columns instead of including them.
virtual void clear()=0
Method allowing the data read by readReferenceFile() to be cleared.
virtual bool addColumnForComparing(const String &column_name)=0
Method allowing a column to be added to the list of columns to be compared.
virtual void editRegexColumns(const String &regex_column)=0
Method allowing a regular expression to be added to determine the columns to compare.
virtual bool isReferenceExist(Integer rank=-1)=0
Method allowing to check if the reference files exist.
virtual bool writeReferenceFile(Integer rank=-1)=0
Method allowing reference files to be written.
virtual void isAnArrayExclusiveColumns(bool is_exclusive)=0
Method allowing definition whether the array of columns represents the columns to include in the comp...
virtual bool compareElemWithReference(Real elem, const String &column_name, const String &row_name, Integer rank=-1)=0
Method allowing a value to be compared with a value from the reference table. This method does not ne...
virtual bool addRowForComparing(const String &row_name)=0
Method allowing a row to be added to the list of rows to be compared.
virtual void isARegexExclusiveRows(bool is_exclusive)=0
Method allowing to request that the regular expression excludes rows instead of including them.
virtual void print(Integer rank=0)=0
Method allowing the read table to be displayed.
virtual void init(ISimpleTableOutput *simple_table_output_ptr)=0
Method allowing the service to be initialized.
virtual bool compareElemWithReference(const String &column_name, const String &row_name, Integer rank=-1)=0
Method allowing only an element to be compared. Both SimpleTableInternals are represented by Refs,...
virtual bool addEpsilonRow(const String &row_name, Real epsilon)=0
Method allowing an epsilon to be defined for a given row. This epsilon must be positive to be taken i...
Interface representing a simple table output.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
double Real
Type representing a real number.