Public Member Functions | |
| SimpleTableWriterHelper (const Ref< ISimpleTableReaderWriter > &simple_table_reader_writer) | |
| bool | init (const Directory &root_directory, const String &table_name, const String &directory_name) override |
| Method to initialize the object. Specifically, the table name and the directory name that will contain the files (the tables directory/directory_name). | |
| void | print (Integer rank) override |
| Method to display the table. | |
| bool | writeFile (Integer rank) override |
| bool | writeFile (const Directory &root_directory, Integer rank) override |
| Integer | precision () override |
| Method to retrieve the precision currently used for writing values. | |
| void | setPrecision (Integer precision) override |
| Method to modify the print precision. | |
| bool | isFixed () override |
| Method to check if the 'std::fixed' flag is active for writing values. | |
| void | setFixed (bool fixed) override |
| Method to set or unset the 'std::fixed' flag. | |
| bool | isForcedToUseScientificNotation () override |
| Method to check if the 'std::scientific' flag is active for writing values. | |
| void | setForcedToUseScientificNotation (bool use_scientific) override |
| Method to set or unset the 'std::scientific' flag. | |
| String | outputDirectory () override |
| Method to retrieve the directory name where the tables will be placed. | |
| String | outputDirectoryWithoutComputation () override |
| Method to retrieve the directory name as it was previously provided. | |
| void | setOutputDirectory (const String &directory) override |
| Method to set the directory where the tables should be saved. | |
| String | tableName () override |
| Method to retrieve the table name. | |
| String | tableNameWithoutComputation () override |
| Method to retrieve the table name as it was previously provided. | |
| void | setTableName (const String &name) override |
| Method to set the table name. | |
| String | fileName () override |
| Method to retrieve the file name. | |
| Directory | outputPath () override |
| Method to retrieve the path where the tables will be saved. | |
| Directory | rootPath () override |
| Method to retrieve the path where the implementation saves these tables. | |
| String | fileType () override |
| Method to know the file type that will be used. | |
| bool | isOneFileByRanksPermited () override |
| Method to check if the parameters currently held by the implementation allow it to write a file per process, especially thanks to name symbols. | |
| Ref< SimpleTableInternal > | internal () override |
| Method to retrieve a reference to the SimpleTableInternal object used. | |
| Ref< ISimpleTableReaderWriter > | readerWriter () override |
| Method to retrieve a reference to the ISimpleTableReaderWriter object used. | |
| void | setReaderWriter (const Ref< ISimpleTableReaderWriter > &simple_table_reader_writer) override |
| Method to set a reference to an ISimpleTableReaderWriter. | |
Protected Member Functions | |
| void | _computeTableName () |
| void | _computeOutputDirectory () |
| String | _computeName (String name, bool &one_file_by_ranks_permited) |
| Method allowing replacement of name symbols by their value. | |
Definition at line 35 of file SimpleTableWriterHelper.h.
|
inline |
Definition at line 40 of file SimpleTableWriterHelper.h.
|
inline |
Definition at line 55 of file SimpleTableWriterHelper.h.
|
protected |
Method allowing replacement of name symbols by their value.
| name | [IN] The name to modify. |
| one_file_by_ranks_permited | [OUT] True if the name contains the symbol '@proc_id@' allowing differentiation of files written by different processes. |
Definition at line 282 of file SimpleTableWriterHelper.cc.
References Arcane::StringBuilder::append(), Arcane::AbstractArray< T >::size(), Arcane::Array< T >::span(), Arcane::String::split(), Arcane::String::startsWith(), and Arcane::StringBuilder::toString().
|
protected |
Definition at line 264 of file SimpleTableWriterHelper.cc.
|
protected |
Definition at line 255 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
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.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 193 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
Method to know the file type that will be used.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 222 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
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. |
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 34 of file SimpleTableWriterHelper.cc.
References setOutputDirectory(), and setTableName().
|
overridevirtual |
Method to retrieve a reference to the SimpleTableInternal object used.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 231 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
Method to check if the 'std::fixed' flag is active for writing values.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 118 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
Method to check if the 'std::scientific' flag is active for writing values.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 130 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
Method to check if the parameters currently held by the implementation allow it to write a file per process, especially thanks to name symbols.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 213 of file SimpleTableWriterHelper.cc.
Referenced by writeFile().
|
overridevirtual |
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.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 145 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
Method to retrieve the directory name as it was previously provided.
Name symbols are still present here.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 152 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
Method to retrieve the path where the tables will be saved.
Example (relative): ./output/csv/[directory_name]/
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 200 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
Method to retrieve the precision currently used for writing values.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 106 of file SimpleTableWriterHelper.cc.
Referenced by setPrecision().
|
overridevirtual |
Method to display the table.
| rank | The process ID that should display the table (-1 to signify "all processes"). |
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 50 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
Method to retrieve a reference to the ISimpleTableReaderWriter object used.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 237 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
Method to retrieve the path where the implementation saves these tables.
Example (relative): ./output/csv/
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 207 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
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. |
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 124 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
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. |
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 136 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
Method to set the directory where the tables should be saved.
May be different for each process (depending on the implementation).
| directory | The directory. |
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 158 of file SimpleTableWriterHelper.cc.
Referenced by init().
|
overridevirtual |
Method to modify the print precision.
Applicable to both the 'print()' method and the 'writeFile()' methods.
| precision | The new precision. |
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 112 of file SimpleTableWriterHelper.cc.
References precision().
|
overridevirtual |
Method to set a reference to an ISimpleTableReaderWriter.
| simple_table_reader_writer | The reference to an ISimpleTableReaderWriter. |
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 243 of file SimpleTableWriterHelper.cc.
References ARCANE_FATAL, and Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::isNull().
|
overridevirtual |
Method to set the table name.
| name | The name. |
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 182 of file SimpleTableWriterHelper.cc.
Referenced by init().
|
overridevirtual |
Method to retrieve the table name.
May be different for each process (depending on the implementation).
Name symbols have been resolved here.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 169 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
Method to retrieve the table name as it was previously provided.
Name symbols are still present here.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 176 of file SimpleTableWriterHelper.cc.
|
overridevirtual |
Method performing collective operations.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 61 of file SimpleTableWriterHelper.cc.
References Arcane::SimpleTableReaderWriterUtils::createDirectoryOnlyProcess0(), and isOneFileByRanksPermited().
|
overridevirtual |
Method performing collective operations.
Implements Arcane::ISimpleTableWriterHelper.
Definition at line 97 of file SimpleTableWriterHelper.cc.
References writeFile().
Referenced by writeFile().
|
protected |
Definition at line 120 of file SimpleTableWriterHelper.h.
|
protected |
Definition at line 127 of file SimpleTableWriterHelper.h.
|
protected |
Definition at line 133 of file SimpleTableWriterHelper.h.
|
protected |
Definition at line 121 of file SimpleTableWriterHelper.h.
|
protected |
Definition at line 126 of file SimpleTableWriterHelper.h.
|
protected |
Definition at line 132 of file SimpleTableWriterHelper.h.
|
protected |
Definition at line 122 of file SimpleTableWriterHelper.h.
|
protected |
Definition at line 124 of file SimpleTableWriterHelper.h.
|
protected |
Definition at line 117 of file SimpleTableWriterHelper.h.
|
protected |
Definition at line 118 of file SimpleTableWriterHelper.h.