Class interface for writing a file using ISimpleTableReaderWriter. Provides methods for managing parallel writing and name symbols. More...
#include <arcane/core/ISimpleTableWriterHelper.h>
Public Member Functions | |
| 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 contain the files (the tables directory/directory_name). | |
| virtual void | print (Integer rank=0)=0 |
| Method to display the table. | |
| 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 bool | writeFile (Integer rank=-1)=0 |
| Method to write the table to a file. If rank != -1, processes other than rank return true. | |
| virtual Integer | precision ()=0 |
| Method to retrieve the precision currently used for writing values. | |
| virtual void | setPrecision (Integer precision)=0 |
| Method to modify the print precision. | |
| virtual bool | isFixed ()=0 |
| Method to check if the 'std::fixed' flag is active for writing values. | |
| virtual void | setFixed (bool fixed)=0 |
| Method to set or unset the 'std::fixed' flag. | |
| virtual bool | isForcedToUseScientificNotation ()=0 |
| Method to check if the 'std::scientific' flag is active for writing values. | |
| virtual void | setForcedToUseScientificNotation (bool use_scientific)=0 |
| Method to set or unset the 'std::scientific' flag. | |
| virtual String | outputDirectoryWithoutComputation ()=0 |
| Method to retrieve the directory name as it was previously provided. | |
| virtual String | outputDirectory ()=0 |
| Method to retrieve the directory name where the tables will be placed. | |
| virtual void | setOutputDirectory (const String &directory)=0 |
| Method to set the directory where the tables should be saved. | |
| 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 void | setTableName (const String &name)=0 |
| Method to set the table name. | |
| virtual String | fileName ()=0 |
| Method to retrieve the file name. | |
| virtual Directory | outputPath ()=0 |
| Method to retrieve the path where the tables will be saved. | |
| virtual Directory | rootPath ()=0 |
| Method to retrieve the path where the implementation saves these tables. | |
| virtual bool | isOneFileByRanksPermited ()=0 |
| Method to check if the parameters currently held by the implementation allow it to write a file per process, especially thanks to name symbols. | |
| virtual String | fileType ()=0 |
| Method to know the file type that will be used. | |
| virtual Ref< SimpleTableInternal > | internal ()=0 |
| Method to retrieve a reference to the SimpleTableInternal object used. | |
| virtual Ref< ISimpleTableReaderWriter > | readerWriter ()=0 |
| Method to retrieve a reference to the ISimpleTableReaderWriter object used. | |
| virtual void | setReaderWriter (const Ref< ISimpleTableReaderWriter > &simple_table_reader_writer)=0 |
| Method to set a reference to an ISimpleTableReaderWriter. | |
Class interface for writing a file using ISimpleTableReaderWriter. Provides methods for managing parallel writing and name symbols.
This class is, in a way, a wrapper around ISimpleTableReaderWriter, which is quite basic. ISimpleTableWriterHelper is here to simplify the use of ISimpleTableReaderWriter.
In the SimpleTable part, name symbols are keywords surrounded by at signs () that will be replaced by their meaning during execution. In the SimpleTableWriterHelper implementation, there are currently two supported name symbols:
Definition at line 53 of file ISimpleTableWriterHelper.h.
|
pure virtual |
Method to retrieve the file name.
May be different for each process (depending on the implementation).
Name symbols have been resolved and the extension is added here.
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to know the file type that will be used.
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to initialize the object. Specifically, the table name and the directory name that will contain the files (the tables directory/directory_name).
| table_name | The table name (and the output file name). |
| directory_name | The folder name where the tables will be saved. |
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to retrieve a reference to the SimpleTableInternal object used.
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to check if the 'std::fixed' flag is active for writing values.
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to check if the 'std::scientific' flag is active for writing values.
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to check if the parameters currently held by the implementation allow it to write a file per process, especially thanks to name symbols.
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to retrieve the directory name where the tables will be placed.
May be different for each process (depending on the implementation).
Name symbols have been resolved here.
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to retrieve the directory name as it was previously provided.
Name symbols are still present here.
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to retrieve the path where the tables will be saved.
Example (relative): ./output/csv/[directory_name]/
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to retrieve the precision currently used for writing values.
Implemented in Arcane::SimpleTableWriterHelper.
Referenced by setPrecision().
|
pure virtual |
Method to display the table.
| rank | The process ID that should display the table (-1 to signify "all processes"). |
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to retrieve a reference to the ISimpleTableReaderWriter object used.
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to retrieve the path where the implementation saves these tables.
Example (relative): ./output/csv/
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to set or unset the 'std::fixed' flag.
Applicable to both the 'print()' method and the 'writeFile()' methods.
This flag allows 'forcing' the number of digits after the comma to the desired precision. For example, if 'setPrecision(4)' was called, and 'setFixed(true)' is called, the print of '6.1' will output '6.1000'.
| fixed | Whether the 'std::fixed' flag should be set or not. |
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to set or unset the 'std::scientific' flag.
Applicable to both the 'print()' method and the 'writetable()' method.
This flag allows 'forcing' the display of values in scientific notation.
| use_scientific | Whether the 'std::scientific' flag should be set or not. |
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to set the directory where the tables should be saved.
May be different for each process (depending on the implementation).
| directory | The directory. |
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to modify the print precision.
Applicable to both the 'print()' method and the 'writeFile()' methods.
| precision | The new precision. |
Implemented in Arcane::SimpleTableWriterHelper.
References precision().
|
pure virtual |
Method to set a reference to an ISimpleTableReaderWriter.
| simple_table_reader_writer | The reference to an ISimpleTableReaderWriter. |
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to set the table name.
| name | The name. |
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to retrieve the table name.
May be different for each process (depending on the implementation).
Name symbols have been resolved here.
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to retrieve the table name as it was previously provided.
Name symbols are still present here.
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to write the table to a file. If rank != -1, processes other than rank return true.
For example, in the SimpleTableWriterHelper implementation, the file(s) will be written in the directory: root_directory/[directory_name]/[table_name].[ISimpleTableReaderWriter.fileType()]
| root_directory | The root directory where the tables directory should be created. |
| rank | The process ID that should write the table to a file (-1 to signify "all processes"). |
Implemented in Arcane::SimpleTableWriterHelper.
|
pure virtual |
Method to write the table to a file. If rank != -1, processes other than rank return true.
For example, in the SimpleTableWriterHelper implementation, the file(s) will be written in the directory: ./[output]/[directory_name]/[table_name].[ISimpleTableReaderWriter.fileType()]
| rank | The process ID that should write the table to a file (-1 to signify "all processes"). |
Implemented in Arcane::SimpleTableWriterHelper.