Class allowing to read ArcaNet files. More...
Public Member Functions | |
| ArcaNetReader (const JSONValue &root) | |
| Constructor. | |
| void | init (const String &case_and_variations_values, const String &prog_name) |
| Method allowing to initialise the file reader. | |
| void | read () |
| Method allowing to read the file and fill the chain of dependencies. First, you need to call 'init()' method. | |
| ArrayView< JSONValue > | jsonValues () |
| Method allowing to get all JSONValue to read, following the chain of dependencies. | |
| JSONValue | extractFilePart (const JSONValue &config_part) |
| Method allowing to get the file part of a JSONValue (from 'jsonValues()' array). | |
| JSONValue | extractProgPart (const JSONValue &config_part) |
| Method allowing to get the program part of a JSONValue (from 'jsonValues()' array). | |
| JSONValue | extractPart (const String &part_name, const JSONValue &config_part) |
| Method allowing to get a part of a JSONValue (from 'jsonValues()' array). | |
| bool | computePath () const |
| Method allowing to determining if the path is recorded. To enable the recording, you can set ARCCORE_ARCANET_PATH environment variable. | |
| String | path () const |
| Method allowing to get the dependencies path. | |
| String | configPartName () |
| Method allowing to get the final name of program part. | |
Private Member Functions | |
| void | _readDependPart (const JSONValue &depend_part) |
| void | _readConfigPart (const JSONValue &config_part, const String &node_name) |
| void | _addElemInPath (const String &elem) |
| void | _readFileBeforePart (const JSONValue &config_part) |
| void | _readFileAfterPart (const JSONValue &config_part) |
| void | _readArcanePart (const JSONValue &config_part) |
Private Attributes | |
| bool | m_build_path = false |
| StringBuilder | m_path |
| Integer | m_level_path = 0 |
| const JSONValue & | m_root |
| UniqueArray< String > | m_explored |
| UniqueArray< String > | m_variations_key_resolved |
| UniqueArray< String > | m_variations_value_resolved |
| String | m_prog_part_name |
| String | m_prog_custom_part_name |
| UniqueArray< JSONValue > | m_values |
| String | m_case_name |
Class allowing to read ArcaNet files.
Definition at line 200 of file ArcaNetReader.h.
| Arcane::ArcaNetReader::ArcaNetReader | ( | const JSONValue & | root | ) |
Constructor.
| root | root element of ArcaNet file. |
Definition at line 29 of file ArcaNetReader.cc.
|
private |
Definition at line 270 of file ArcaNetReader.cc.
|
private |
Definition at line 302 of file ArcaNetReader.cc.
|
private |
Definition at line 246 of file ArcaNetReader.cc.
|
private |
Definition at line 148 of file ArcaNetReader.cc.
|
private |
Definition at line 292 of file ArcaNetReader.cc.
|
private |
Definition at line 282 of file ArcaNetReader.cc.
|
inline |
Method allowing to determining if the path is recorded. To enable the recording, you can set ARCCORE_ARCANET_PATH environment variable.
Definition at line 266 of file ArcaNetReader.h.
|
inline |
Method allowing to get the final name of program part.
Definition at line 276 of file ArcaNetReader.h.
References Arcane::String::empty().
Method allowing to get the file part of a JSONValue (from 'jsonValues()' array).
| config_part | An element of 'jsonValues()' array. |
Definition at line 114 of file ArcaNetReader.cc.
References Arcane::JSONValue::child().
| JSONValue Arcane::ArcaNetReader::extractPart | ( | const String & | part_name, |
| const JSONValue & | config_part ) |
Method allowing to get a part of a JSONValue (from 'jsonValues()' array).
| part_name | The name of the part to get. |
| config_part | An element of 'jsonValues()' array. |
Definition at line 139 of file ArcaNetReader.cc.
References Arcane::JSONValue::child().
Method allowing to get the program part of a JSONValue (from 'jsonValues()' array).
| config_part | An element of 'jsonValues()' array. |
Definition at line 123 of file ArcaNetReader.cc.
References Arcane::JSONValue::child(), and Arcane::JSONValue::null().
| void Arcane::ArcaNetReader::init | ( | const String & | case_and_variations_values, |
| const String & | prog_name ) |
Method allowing to initialise the file reader.
| case_and_variations_values | The case name with variations values (example : "case1~init:nb_proc=4"). |
| prog_name | Program name to read in file (example : "arcane'). |
Definition at line 39 of file ArcaNetReader.cc.
References Arcane::Array< T >::add(), ARCCORE_FATAL, Arcane::String::empty(), Arcane::AbstractArray< T >::size(), and Arcane::String::split().
Method allowing to get all JSONValue to read, following the chain of dependencies.
Definition at line 231 of file ArcaNetReader.h.
|
inline |
Method allowing to get the dependencies path.
Definition at line 271 of file ArcaNetReader.h.
| void Arcane::ArcaNetReader::read | ( | ) |
Method allowing to read the file and fill the chain of dependencies. First, you need to call 'init()' method.
Definition at line 84 of file ArcaNetReader.cc.
References ARCCORE_FATAL, Arcane::JSONValue::child(), Arcane::JSONValue::isNull(), and Arcane::JSONValue::null().
|
private |
Definition at line 289 of file ArcaNetReader.h.
|
private |
Definition at line 299 of file ArcaNetReader.h.
|
private |
Definition at line 293 of file ArcaNetReader.h.
|
private |
Definition at line 291 of file ArcaNetReader.h.
|
private |
Definition at line 290 of file ArcaNetReader.h.
|
private |
Definition at line 297 of file ArcaNetReader.h.
|
private |
Definition at line 296 of file ArcaNetReader.h.
|
private |
Definition at line 292 of file ArcaNetReader.h.
|
private |
Definition at line 298 of file ArcaNetReader.h.
|
private |
Definition at line 294 of file ArcaNetReader.h.
|
private |
Definition at line 295 of file ArcaNetReader.h.