Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ISimpleTableOutput.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/* ISimpleTableOutput.h (C) 2000-2025 */
9/* */
10/* Interface for simple table output services. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ISIMPLETABLEOUTPUT_H
13#define ARCANE_CORE_ISIMPLETABLEOUTPUT_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/ISimpleTableInternalMng.h"
18#include "arcane/core/ISimpleTableWriterHelper.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
33class ARCANE_CORE_EXPORT ISimpleTableOutput
34{
35 public:
36
37 virtual ~ISimpleTableOutput() = default;
38
39 public:
40
44 virtual bool init() = 0;
50 virtual bool init(const String& table_name) = 0;
57 virtual bool init(const String& table_name, const String& directory_name) = 0;
58
59 /*---------------------------------------------------------------------------*/
60 /*---------------------------------------------------------------------------*/
61
65 virtual void clear() = 0;
66
67 /*---------------------------------------------------------------------------*/
68 /*---------------------------------------------------------------------------*/
69
76 virtual Integer addRow(const String& row_name) = 0;
88 virtual Integer addRow(const String& row_name, ConstArrayView<Real> elements) = 0;
96 virtual bool addRows(StringConstArrayView rows_names) = 0;
97
98 /*---------------------------------------------------------------------------*/
99 /*---------------------------------------------------------------------------*/
100
107 virtual Integer addColumn(const String& column_name) = 0;
119 virtual Integer addColumn(const String& column_name, ConstArrayView<Real> elements) = 0;
127 virtual bool addColumns(StringConstArrayView columns_names) = 0;
128
129 /*---------------------------------------------------------------------------*/
130 /*---------------------------------------------------------------------------*/
131
140 virtual bool addElementInRow(Integer position, Real element) = 0;
151 virtual bool addElementInRow(const String& row_name, Real element, bool create_if_not_exist = true) = 0;
163
164 /*---------------------------------------------------------------------------*/
165 /*---------------------------------------------------------------------------*/
166
179 virtual bool addElementsInRow(Integer position, ConstArrayView<Real> elements) = 0;
194 virtual bool addElementsInRow(const String& row_name, ConstArrayView<Real> elements, bool create_if_not_exist = true) = 0;
210 virtual bool addElementsInSameRow(ConstArrayView<Real> elements) = 0;
211
212 /*---------------------------------------------------------------------------*/
213 /*---------------------------------------------------------------------------*/
214
223 virtual bool addElementInColumn(Integer position, Real element) = 0;
234 virtual bool addElementInColumn(const String& column_name, Real element, bool create_if_not_exist = true) = 0;
246
247 /*---------------------------------------------------------------------------*/
248 /*---------------------------------------------------------------------------*/
249
262 virtual bool addElementsInColumn(Integer position, ConstArrayView<Real> elements) = 0;
277 virtual bool addElementsInColumn(const String& column_name, ConstArrayView<Real> elements, bool create_if_not_exist = true) = 0;
294
295 /*---------------------------------------------------------------------------*/
296 /*---------------------------------------------------------------------------*/
297
310 virtual bool editElementUp(Real element, bool update_last_position = true) = 0;
326 virtual bool editElementDown(Real element, bool update_last_position = true) = 0;
339 virtual bool editElementLeft(Real element, bool update_last_position = true) = 0;
355 virtual bool editElementRight(Real element, bool update_last_position = true) = 0;
356
357 /*---------------------------------------------------------------------------*/
358 /*---------------------------------------------------------------------------*/
359
370 virtual Real elementUp(bool update_last_position = false) = 0;
381 virtual Real elementDown(bool update_last_position = false) = 0;
392 virtual Real elementLeft(bool update_last_position = false) = 0;
403 virtual Real elementRight(bool update_last_position = false) = 0;
404
405 /*---------------------------------------------------------------------------*/
406 /*---------------------------------------------------------------------------*/
407
421 virtual bool editElement(Real element) = 0;
431 virtual bool editElement(Integer position_x, Integer position_y, Real element) = 0;
441 virtual bool editElement(const String& column_name, const String& row_name, Real element) = 0;
442
443 /*---------------------------------------------------------------------------*/
444 /*---------------------------------------------------------------------------*/
445
453 virtual Real element() = 0;
462 virtual Real element(Integer position_x, Integer position_y, bool update_last_position = false) = 0;
471 virtual Real element(const String& column_name, const String& row_name, bool update_last_position = false) = 0;
472
473 /*---------------------------------------------------------------------------*/
474 /*---------------------------------------------------------------------------*/
475
482 virtual RealUniqueArray row(Integer position) = 0;
489 virtual RealUniqueArray row(const String& row_name) = 0;
490
497 virtual RealUniqueArray column(Integer position) = 0;
504 virtual RealUniqueArray column(const String& column_name) = 0;
505
506 /*---------------------------------------------------------------------------*/
507 /*---------------------------------------------------------------------------*/
508
516 virtual Integer rowSize(Integer position) = 0;
524 virtual Integer rowSize(const String& row_name) = 0;
525
533 virtual Integer columnSize(Integer position) = 0;
541 virtual Integer columnSize(const String& column_name) = 0;
542
543 /*---------------------------------------------------------------------------*/
544 /*---------------------------------------------------------------------------*/
545
552 virtual Integer rowPosition(const String& row_name) = 0;
559 virtual Integer columnPosition(const String& column_name) = 0;
560
561 /*---------------------------------------------------------------------------*/
562 /*---------------------------------------------------------------------------*/
563
570 virtual Integer numberOfRows() = 0;
578
579 /*---------------------------------------------------------------------------*/
580 /*---------------------------------------------------------------------------*/
581
582 virtual String rowName(Integer position) = 0;
583 virtual String columnName(Integer position) = 0;
584
585 /*---------------------------------------------------------------------------*/
586 /*---------------------------------------------------------------------------*/
587
596 virtual bool editRowName(Integer position, const String& new_name) = 0;
605 virtual bool editRowName(const String& row_name, const String& new_name) = 0;
606
615 virtual bool editColumnName(Integer position, const String& new_name) = 0;
624 virtual bool editColumnName(const String& column_name, const String& new_name) = 0;
625
633 virtual Integer addAverageColumn(const String& column_name) = 0;
634
635 /*---------------------------------------------------------------------------*/
636 /*---------------------------------------------------------------------------*/
644 virtual void print(Integer rank = 0) = 0;
645
646 virtual bool writeFile(const Directory& root_directory, Integer rank) = 0;
647
658 virtual bool writeFile(Integer rank = -1) = 0;
673 virtual bool writeFile(const String& directory, Integer rank = -1) = 0;
674
675 /*---------------------------------------------------------------------------*/
676 /*---------------------------------------------------------------------------*/
677
684 virtual Integer precision() = 0;
700 virtual void setPrecision(Integer precision) = 0;
701
709 virtual bool isFixed() = 0;
731 virtual void setFixed(bool fixed) = 0;
732
750 virtual void setForcedToUseScientificNotation(bool use_scientific) = 0;
751
760 virtual String outputDirectory() = 0;
769 virtual void setOutputDirectory(const String& directory) = 0;
770
778 virtual String tableName() = 0;
786 virtual void setTableName(const String& name) = 0;
787
795 virtual String fileName() = 0;
796
806 virtual Directory outputPath() = 0;
807
817 virtual Directory rootPath() = 0;
818
827 virtual bool isOneFileByRanksPermited() = 0;
828
834 virtual String fileType() = 0;
835
843
851};
852
853/*---------------------------------------------------------------------------*/
854/*---------------------------------------------------------------------------*/
855
856} // End namespace Arcane
857
858/*---------------------------------------------------------------------------*/
859/*---------------------------------------------------------------------------*/
860
861#endif
Constant view of an array of type T.
Class managing a directory.
Definition Directory.h:36
Interface representing a simple table output.
virtual bool addElementsInColumn(Integer position, ConstArrayView< Real > elements)=0
Method to add multiple elements to a column.
virtual bool addElementsInRow(Integer position, ConstArrayView< Real > elements)=0
Method to add multiple elements to a row.
virtual void setTableName(const String &name)=0
Accessor allowing definition of the array name.
virtual Real elementDown(bool update_last_position=false)=0
Method to retrieve an element below the last element manipulated (row below/same column).
virtual bool init(const String &table_name)=0
Method to initialize the table.
virtual bool editElementDown(Real element, bool update_last_position=true)=0
Method to edit an element below the last element manipulated (row below/same column).
virtual void setPrecision(Integer precision)=0
Method allowing modification of the print precision.
virtual bool addElementInRow(Integer position, Real element)=0
Method to add an element to a row.
virtual Ref< SimpleTableInternal > internal()=0
Method allowing retrieval of a reference to the SimpleTableInternal object used.
virtual String fileType()=0
Method allowing knowledge of the service's file type.
virtual bool init(const String &table_name, const String &directory_name)=0
Method to initialize the table.
virtual Integer rowSize(Integer position)=0
Method allowing retrieval of the size of a row. Including hypothetical 'gaps' in the row.
virtual String fileName()=0
Accessor allowing retrieval of the file name.
virtual bool addElementInColumn(const String &column_name, Real element, bool create_if_not_exist=true)=0
Method to add an element to a column.
virtual Integer columnSize(const String &column_name)=0
Method allowing retrieval of the size of a column. Including hypothetical 'gaps' in the column.
virtual Integer numberOfRows()=0
Method allowing retrieval of the number of rows in the array. This is, in a way, the maximum number o...
virtual bool editColumnName(Integer position, const String &new_name)=0
Method allowing changing the name of a column.
virtual bool addElementInColumn(Integer position, Real element)=0
Method to add an element to a column.
virtual bool editElementRight(Real element, bool update_last_position=true)=0
Method to edit an element to the right of the last element manipulated (same row/column to the right)...
virtual bool writeFile(Integer rank=-1)=0
Method allowing writing the array to a file. Method performing collective operations....
virtual void setOutputDirectory(const String &directory)=0
Accessor allowing definition of the directory in which the arrays will be saved.
virtual bool editElementUp(Real element, bool update_last_position=true)=0
Method to edit an element above the last element manipulated (row above/same column).
virtual RealUniqueArray column(Integer position)=0
Method allowing retrieval of a copy of a column.
virtual Integer rowPosition(const String &row_name)=0
Method allowing retrieval of the position of a row.
virtual bool addElementsInRow(const String &row_name, ConstArrayView< Real > elements, bool create_if_not_exist=true)=0
Method to add multiple elements to a row.
virtual String outputDirectory()=0
Accessor allowing retrieval of the name of the directory where the arrays will be placed.
virtual bool addElementInSameRow(Real element)=0
Method to add an element to the last manipulated row.
virtual Real elementRight(bool update_last_position=false)=0
Method to retrieve an element to the right of the last element manipulated (same row/column to the ri...
virtual Integer addRow(const String &row_name)=0
Method to add a row.
virtual Integer addColumn(const String &column_name)=0
Method to add a column.
virtual bool editColumnName(const String &column_name, const String &new_name)=0
Method allowing changing the name of a column.
virtual bool editElement(Integer position_x, Integer position_y, Real element)=0
Method to modify an element in the table.
virtual Real elementLeft(bool update_last_position=false)=0
Method to retrieve an element to the left of the last element manipulated (same row/column to the lef...
virtual bool addColumns(StringConstArrayView columns_names)=0
Method to add multiple columns.
virtual bool editRowName(const String &row_name, const String &new_name)=0
Method allowing changing the name of a row.
virtual RealUniqueArray row(const String &row_name)=0
Method allowing retrieval of a copy of a row.
virtual bool addElementInSameColumn(Real element)=0
Method to add an element to the last manipulated column.
virtual Integer addRow(const String &row_name, ConstArrayView< Real > elements)=0
Method to add a row.
virtual Ref< ISimpleTableReaderWriter > readerWriter()=0
Method allowing retrieval of a reference to the ISimpleTableReaderWriter object used.
virtual RealUniqueArray row(Integer position)=0
Method allowing retrieval of a copy of a row.
virtual Integer columnPosition(const String &column_name)=0
Method allowing retrieval of the position of a column.
virtual Integer precision()=0
Method allowing retrieval of the precision currently used for writing values.
virtual String tableName()=0
Accessor allowing retrieval of the name of the arrays.
virtual void print(Integer rank=0)=0
Method allowing display of the array. Method performing collective operations.
virtual Integer numberOfColumns()=0
Method allowing retrieval of the number of columns in the array. This is, in a way,...
virtual bool addElementsInSameRow(ConstArrayView< Real > elements)=0
Method to add multiple elements to the last manipulated row.
virtual RealUniqueArray column(const String &column_name)=0
Method allowing retrieval of a copy of a column.
virtual Integer addAverageColumn(const String &column_name)=0
Method allowing creation of a column containing the average of the elements of each row.
virtual Real elementUp(bool update_last_position=false)=0
Method to retrieve an element above the last element manipulated (row above/same column).
virtual bool isForcedToUseScientificNotation()=0
Method allowing knowledge of whether the 'std::scientific' flag is active or not for writing values.
virtual bool writeFile(const String &directory, Integer rank=-1)=0
Method allowing writing the array to a file. Method performing collective operations....
virtual bool addElementsInColumn(const String &column_name, ConstArrayView< Real > elements, bool create_if_not_exist=true)=0
Method to add multiple elements to a column.
virtual Real element(Integer position_x, Integer position_y, bool update_last_position=false)=0
Method allowing retrieval of a copy of an element.
virtual Real element(const String &column_name, const String &row_name, bool update_last_position=false)=0
Method allowing retrieval of a copy of an element.
virtual Real element()=0
Method allowing retrieval of a copy of an element.
virtual bool init()=0
Method to initialize the table.
virtual bool editElement(Real element)=0
Method to modify an element in the table.
virtual bool isFixed()=0
Method allowing knowledge of whether the 'std::fixed' flag is active or not for writing values.
virtual Integer rowSize(const String &row_name)=0
Method allowing retrieval of the size of a row. Including hypothetical 'gaps' in the row.
virtual bool addElementInRow(const String &row_name, Real element, bool create_if_not_exist=true)=0
Method to add an element to a row.
virtual void clear()=0
Method to clear the tables.
virtual void setFixed(bool fixed)=0
Method allowing setting the 'std::fixed' flag or not.
virtual bool addElementsInSameColumn(ConstArrayView< Real > elements)=0
Method to add multiple elements to the last manipulated column.
virtual bool addRows(StringConstArrayView rows_names)=0
Method to add multiple rows.
virtual bool editRowName(Integer position, const String &new_name)=0
Method allowing changing the name of a row.
virtual Directory rootPath()=0
Accessor allowing retrieval of the path where the implementation saves these arrays.
virtual bool isOneFileByRanksPermited()=0
Method allowing knowledge of whether the parameters currently held by the implementation allow it to ...
virtual Directory outputPath()=0
Accessor allowing retrieval of the path where the arrays will be saved.
virtual bool editElement(const String &column_name, const String &row_name, Real element)=0
Method allowing modification of an element in the array.
virtual Integer columnSize(Integer position)=0
Method allowing retrieval of the size of a column. Including hypothetical 'gaps' in the column.
virtual Integer addColumn(const String &column_name, ConstArrayView< Real > elements)=0
Method to add a column.
virtual void setForcedToUseScientificNotation(bool use_scientific)=0
Method allowing setting the 'std::scientific' flag or not.
virtual bool editElementLeft(Real element, bool update_last_position=true)=0
Method to edit an element to the left of the last element manipulated (same row/column to the left).
Reference to an instance.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ConstArrayView< String > StringConstArrayView
C equivalent of a 1D array of strings.
Definition UtilsTypes.h:492
Int32 Integer
Type representing an integer.
UniqueArray< Real > RealUniqueArray
Dynamic 1D array of reals.
Definition UtilsTypes.h:349
double Real
Type representing a real number.