Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ISimpleTableWriterHelper.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/* ISimpleTableWriterHelper.h (C) 2000-2025 */
9/* */
10/* Interface representing a simple writer using an */
11/* ISimpleTableReaderWriter. */
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_CORE_ISIMPLETABLEWRITERHELPER_H
14#define ARCANE_CORE_ISIMPLETABLEWRITERHELPER_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
18#include "arcane/core/ISimpleTableInternalMng.h"
19#include "arcane/core/ISimpleTableReaderWriter.h"
20
21#include "arcane/core/Directory.h"
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane
28{
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
53class ARCANE_CORE_EXPORT ISimpleTableWriterHelper
54{
55 public:
56
57 virtual ~ISimpleTableWriterHelper() = default;
58
59 public:
60
69 virtual bool init(const Directory& root_directory, const String& table_name, const String& directory_name) = 0;
70
71 /*---------------------------------------------------------------------------*/
72 /*---------------------------------------------------------------------------*/
73
80 virtual void print(Integer rank = 0) = 0;
81
96 virtual bool writeFile(const Directory& root_directory, Integer rank) = 0;
97
111 virtual bool writeFile(Integer rank = -1) = 0;
112
113 /*---------------------------------------------------------------------------*/
114 /*---------------------------------------------------------------------------*/
115
122 virtual Integer precision() = 0;
139 virtual void setPrecision(Integer precision) = 0;
140
148 virtual bool isFixed() = 0;
169 virtual void setFixed(bool fixed) = 0;
170
189 virtual void setForcedToUseScientificNotation(bool use_scientific) = 0;
190
200
211 virtual String outputDirectory() = 0;
220 virtual void setOutputDirectory(const String& directory) = 0;
221
231
241 virtual String tableName() = 0;
247 virtual void setTableName(const String& name) = 0;
248
258 virtual String fileName() = 0;
259
269 virtual Directory outputPath() = 0;
270
280 virtual Directory rootPath() = 0;
281
290 virtual bool isOneFileByRanksPermited() = 0;
291
297 virtual String fileType() = 0;
298
306
314
321 virtual void setReaderWriter(const Ref<ISimpleTableReaderWriter>& simple_table_reader_writer) = 0;
322};
323
324/*---------------------------------------------------------------------------*/
325/*---------------------------------------------------------------------------*/
326
327} // End namespace Arcane
328
329/*---------------------------------------------------------------------------*/
330/*---------------------------------------------------------------------------*/
331
332#endif
Declarations of types on entities.
Class managing a directory.
Definition Directory.h:36
Class interface for writing a file using ISimpleTableReaderWriter. Provides methods for managing para...
virtual String outputDirectory()=0
Method to retrieve the directory name where the tables will be placed.
virtual bool isForcedToUseScientificNotation()=0
Method to check if the 'std::scientific' flag is active for writing values.
virtual Directory rootPath()=0
Method to retrieve the path where the implementation saves these tables.
virtual Ref< ISimpleTableReaderWriter > readerWriter()=0
Method to retrieve a reference to the ISimpleTableReaderWriter object used.
virtual String fileName()=0
Method to retrieve the file name.
virtual void setForcedToUseScientificNotation(bool use_scientific)=0
Method to set or unset the 'std::scientific' flag.
virtual void setOutputDirectory(const String &directory)=0
Method to set the directory where the tables should be saved.
virtual void print(Integer rank=0)=0
Method to display the table.
virtual void setPrecision(Integer precision)=0
Method to modify the print precision.
virtual bool writeFile(Integer rank=-1)=0
Method to write the table to a file. If rank != -1, processes other than rank return true.
virtual String tableNameWithoutComputation()=0
Method to retrieve the table name as it was previously provided.
virtual String tableName()=0
Method to retrieve the table name.
virtual Integer precision()=0
Method to retrieve the precision currently used for writing values.
virtual Ref< SimpleTableInternal > internal()=0
Method to retrieve a reference to the SimpleTableInternal object used.
virtual bool init(const Directory &root_directory, const String &table_name, const String &directory_name)=0
Method to initialize the object. Specifically, the table name and the directory name that will contai...
virtual Directory outputPath()=0
Method to retrieve the path where the tables will be saved.
virtual bool writeFile(const Directory &root_directory, Integer rank)=0
Method to write the table to a file. If rank != -1, processes other than rank return true.
virtual String fileType()=0
Method to know the file type that will be used.
virtual void setReaderWriter(const Ref< ISimpleTableReaderWriter > &simple_table_reader_writer)=0
Method to set a reference to an ISimpleTableReaderWriter.
virtual String outputDirectoryWithoutComputation()=0
Method to retrieve the directory name as it was previously provided.
virtual void setTableName(const String &name)=0
Method to set the table name.
virtual bool isOneFileByRanksPermited()=0
Method to check if the parameters currently held by the implementation allow it to write a file per p...
virtual void setFixed(bool fixed)=0
Method to set or unset the 'std::fixed' flag.
virtual bool isFixed()=0
Method to check if the 'std::fixed' flag is active for writing values.
Reference to an instance.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.