12#ifndef ARCANE_STD_SIMPLECSVOUTPUTSERVICE_H
13#define ARCANE_STD_SIMPLECSVOUTPUTSERVICE_H
17#include "arcane/core/ISimpleTableOutput.h"
19#include "arcane/std/SimpleCsvReaderWriter.h"
20#include "arcane/std/SimpleTableInternalMng.h"
21#include "arcane/std/SimpleTableWriterHelper.h"
23#include "arcane/core/Directory.h"
24#include "arcane/core/IMesh.h"
26#include "arcane/std/SimpleCsvOutput_axl.h"
37class SimpleCsvOutputService
44 , m_is_already_init(
false)
55 void clear()
override;
59 return m_simple_table_internal_mng.addRow(row_name);
63 return m_simple_table_internal_mng.addRow(row_name, elements);
67 return m_simple_table_internal_mng.addRows(rows_names);
71 return m_simple_table_internal_mng.addColumn(column_name);
75 return m_simple_table_internal_mng.addColumn(column_name, elements);
79 return m_simple_table_internal_mng.addColumns(columns_names);
83 return m_simple_table_internal_mng.addElementInRow(position,
element);
87 return m_simple_table_internal_mng.addElementInRow(row_name,
element, create_if_not_exist);
91 return m_simple_table_internal_mng.addElementInSameRow(
element);
95 return m_simple_table_internal_mng.addElementsInRow(position, elements);
99 return m_simple_table_internal_mng.addElementsInRow(row_name, elements, create_if_not_exist);
103 return m_simple_table_internal_mng.addElementsInSameRow(elements);
107 return m_simple_table_internal_mng.addElementInColumn(position,
element);
111 return m_simple_table_internal_mng.addElementInColumn(column_name,
element, create_if_not_exist);
115 return m_simple_table_internal_mng.addElementInSameColumn(
element);
120 return m_simple_table_internal_mng.addElementsInColumn(position, elements);
124 return m_simple_table_internal_mng.addElementsInColumn(column_name, elements, create_if_not_exist);
128 return m_simple_table_internal_mng.addElementsInSameColumn(elements);
133 return m_simple_table_internal_mng.editElementUp(
element, update_last_position);
137 return m_simple_table_internal_mng.editElementDown(
element, update_last_position);
141 return m_simple_table_internal_mng.editElementLeft(
element, update_last_position);
145 return m_simple_table_internal_mng.editElementRight(
element, update_last_position);
150 return m_simple_table_internal_mng.elementUp(update_last_position);
154 return m_simple_table_internal_mng.elementDown(update_last_position);
158 return m_simple_table_internal_mng.elementLeft(update_last_position);
162 return m_simple_table_internal_mng.elementRight(update_last_position);
167 return m_simple_table_internal_mng.editElement(
element);
171 return m_simple_table_internal_mng.editElement(position_x, position_y,
element);
175 return m_simple_table_internal_mng.editElement(column_name, row_name,
element);
180 return m_simple_table_internal_mng.element();
184 return m_simple_table_internal_mng.element(position_x, position_y, update_last_position);
188 return m_simple_table_internal_mng.element(column_name, row_name, update_last_position);
193 return m_simple_table_internal_mng.row(position);
197 return m_simple_table_internal_mng.column(position);
202 return m_simple_table_internal_mng.row(row_name);
206 return m_simple_table_internal_mng.column(column_name);
211 return m_simple_table_internal_mng.rowSize(position);
215 return m_simple_table_internal_mng.columnSize(position);
220 return m_simple_table_internal_mng.rowSize(row_name);
224 return m_simple_table_internal_mng.columnSize(column_name);
229 return m_simple_table_internal_mng.rowPosition(row_name);
233 return m_simple_table_internal_mng.columnPosition(column_name);
238 return m_simple_table_internal_mng.numberOfRows();
242 return m_simple_table_internal_mng.numberOfColumns();
247 return m_simple_table_internal_mng.
rowName(position);
249 String columnName(
Integer position)
override
251 return m_simple_table_internal_mng.
columnName(position);
256 return m_simple_table_internal_mng.editRowName(position, new_name);
260 return m_simple_table_internal_mng.editRowName(row_name, new_name);
265 return m_simple_table_internal_mng.editColumnName(position, new_name);
269 return m_simple_table_internal_mng.editColumnName(column_name, new_name);
274 return m_simple_table_internal_mng.addAverageColumn(column_name);
279 return m_simple_table_output_mng.print(rank);
283 return m_simple_table_output_mng.writeFile(rank);
287 return m_simple_table_output_mng.
writeFile(root_directory, rank);
294 return m_simple_table_output_mng.setPrecision(
precision);
297 bool isFixed()
override {
return m_simple_table_output_mng.isFixed(); }
298 void setFixed(
bool fixed)
override {
return m_simple_table_output_mng.setFixed(fixed); };
302 return m_simple_table_output_mng.isForcedToUseScientificNotation();
306 return m_simple_table_output_mng.setForcedToUseScientificNotation(use_scientific);
311 return m_simple_table_output_mng.outputDirectory();
315 return m_simple_table_output_mng.setOutputDirectory(directory);
320 return m_simple_table_output_mng.tableName();
324 return m_simple_table_output_mng.setTableName(name);
328 return m_simple_table_output_mng.fileName();
333 return m_simple_table_output_mng.outputPath();
337 return m_simple_table_output_mng.rootPath();
342 return m_simple_table_output_mng.fileType();
347 return m_simple_table_output_mng.isOneFileByRanksPermited();
353 return m_simple_csv_reader_writer;
364 bool m_is_already_init;
ArcaneSimpleCsvOutputObject(const Arcane::ServiceBuildInfo &sbi)
Constructeur.
Constant view of an array of type T.
Class managing a directory.
Reference to an instance.
eServiceType creationType() const
Type of service that can be created by this instance.
Structure containing the information to create a service.
Integer precision() override
Method allowing retrieval of the precision currently used for writing values.
void setOutputDirectory(const String &directory) override
Accessor allowing definition of the directory in which the arrays will be saved.
String tableName() override
Accessor allowing retrieval of the name of the arrays.
bool editElementRight(Real element, bool update_last_position) override
Method to edit an element to the right of the last element manipulated (same row/column to the right)...
bool editColumnName(Integer position, const String &new_name) override
Method allowing changing the name of a column.
bool editRowName(Integer position, const String &new_name) override
Method allowing changing the name of a row.
Integer numberOfColumns() override
Method allowing retrieval of the number of columns in the array. This is, in a way,...
bool addElementsInRow(const String &row_name, ConstArrayView< Real > elements, bool create_if_not_exist) override
Method to add multiple elements to a row.
void clear() override
Method to clear the tables.
Directory rootPath() override
Accessor allowing retrieval of the path where the implementation saves these arrays.
RealUniqueArray column(Integer position) override
Method allowing retrieval of a copy of a column.
Real element(Integer position_x, Integer position_y, bool update_last_position) override
Method allowing retrieval of a copy of an element.
bool addElementInSameRow(Real element) override
Method to add an element to the last manipulated row.
bool editRowName(const String &row_name, const String &new_name) override
Method allowing changing the name of a row.
bool addElementInRow(const String &row_name, Real element, bool create_if_not_exist) override
Method to add an element to a row.
RealUniqueArray row(const String &row_name) override
Method allowing retrieval of a copy of a row.
bool isForcedToUseScientificNotation() override
Method allowing knowledge of whether the 'std::scientific' flag is active or not for writing values.
Real elementRight(bool update_last_position) override
Method to retrieve an element to the right of the last element manipulated (same row/column to the ri...
void print(Integer rank) override
Method allowing display of the array. Method performing collective operations.
bool isFixed() override
Method allowing knowledge of whether the 'std::fixed' flag is active or not for writing values.
void setFixed(bool fixed) override
Method allowing setting the 'std::fixed' flag or not.
bool addElementInColumn(const String &column_name, Real element, bool create_if_not_exist) override
Method to add an element to a column.
bool addElementsInSameRow(ConstArrayView< Real > elements) override
Method to add multiple elements to the last manipulated row.
Integer columnPosition(const String &column_name) override
Method allowing retrieval of the position of a column.
Integer addColumn(const String &column_name) override
Method to add a column.
bool addElementsInColumn(Integer position, ConstArrayView< Real > elements) override
Method to add multiple elements to a column.
Directory outputPath() override
Accessor allowing retrieval of the path where the arrays will be saved.
Real elementLeft(bool update_last_position) override
Method to retrieve an element to the left of the last element manipulated (same row/column to the lef...
void setForcedToUseScientificNotation(bool use_scientific) override
Method allowing setting the 'std::scientific' flag or not.
Integer rowSize(const String &row_name) override
Method allowing retrieval of the size of a row. Including hypothetical 'gaps' in the row.
bool addElementsInSameColumn(ConstArrayView< Real > elements) override
Method to add multiple elements to the last manipulated column.
bool editElement(const String &column_name, const String &row_name, Real element) override
Method allowing modification of an element in the array.
Real elementDown(bool update_last_position) override
Method to retrieve an element below the last element manipulated (row below/same column).
bool addRows(StringConstArrayView rows_names) override
Method to add multiple rows.
bool addElementsInRow(Integer position, ConstArrayView< Real > elements) override
Method to add multiple elements to a row.
Integer addRow(const String &row_name) override
Method to add a row.
Integer rowSize(Integer position) override
Method allowing retrieval of the size of a row. Including hypothetical 'gaps' in the row.
bool editColumnName(const String &column_name, const String &new_name) override
Method allowing changing the name of a column.
Real elementUp(bool update_last_position) override
Method to retrieve an element above the last element manipulated (row above/same column).
bool editElement(Integer position_x, Integer position_y, Real element) override
Method to modify an element in the table.
Real element() override
Method allowing retrieval of a copy of an element.
Integer columnSize(const String &column_name) override
Method allowing retrieval of the size of a column. Including hypothetical 'gaps' in the column.
RealUniqueArray column(const String &column_name) override
Method allowing retrieval of a copy of a column.
Integer addAverageColumn(const String &column_name) override
Method allowing creation of a column containing the average of the elements of each row.
String outputDirectory() override
Accessor allowing retrieval of the name of the directory where the arrays will be placed.
bool addElementInRow(Integer position, Real element) override
Method to add an element to a row.
Integer addRow(const String &row_name, ConstArrayView< Real > elements) override
Method to add a row.
bool editElement(Real element) override
Method to modify an element in the table.
bool editElementUp(Real element, bool update_last_position) override
Method to edit an element above the last element manipulated (row above/same column).
Integer addColumn(const String &column_name, ConstArrayView< Real > elements) override
Method to add a column.
bool writeFile(Integer rank) override
Method allowing writing the array to a file. Method performing collective operations....
bool editElementDown(Real element, bool update_last_position) override
Method to edit an element below the last element manipulated (row below/same column).
Integer columnSize(Integer position) override
Method allowing retrieval of the size of a column. Including hypothetical 'gaps' in the column.
RealUniqueArray row(Integer position) override
Method allowing retrieval of a copy of a row.
Real element(const String &column_name, const String &row_name, bool update_last_position) override
Method allowing retrieval of a copy of an element.
bool addElementInColumn(Integer position, Real element) override
Method to add an element to a column.
Ref< SimpleTableInternal > internal() override
Method allowing retrieval of a reference to the SimpleTableInternal object used.
Integer numberOfRows() override
Method allowing retrieval of the number of rows in the array. This is, in a way, the maximum number o...
bool addColumns(StringConstArrayView columns_names) override
Method to add multiple columns.
bool editElementLeft(Real element, bool update_last_position) override
Method to edit an element to the left of the last element manipulated (same row/column to the left).
String fileName() override
Accessor allowing retrieval of the file name.
bool init() override
Method to initialize the table.
String fileType() override
Method allowing knowledge of the service's file type.
bool isOneFileByRanksPermited() override
Method allowing knowledge of whether the parameters currently held by the implementation allow it to ...
void setTableName(const String &name) override
Accessor allowing definition of the array name.
Ref< ISimpleTableReaderWriter > readerWriter() override
Method allowing retrieval of a reference to the ISimpleTableReaderWriter object used.
Integer rowPosition(const String &row_name) override
Method allowing retrieval of the position of a row.
void setPrecision(Integer precision) override
Method allowing modification of the print precision.
bool addElementsInColumn(const String &column_name, ConstArrayView< Real > elements, bool create_if_not_exist) override
Method to add multiple elements to a column.
bool addElementInSameColumn(Real element) override
Method to add an element to the last manipulated column.
String columnName(Integer position) override
Method allowing retrieval of the name of a column from its position.
String rowName(Integer position) override
Method allowing retrieval of the name of a row from its position.
bool writeFile(Integer rank) override
Unicode character string.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ConstArrayView< String > StringConstArrayView
C equivalent of a 1D array of strings.
Int32 Integer
Type representing an integer.
@ ST_CaseOption
The service is used at the dataset level.
UniqueArray< Real > RealUniqueArray
Dynamic 1D array of reals.
double Real
Type representing a real number.