Arcane  4.2.3.0
User documentation
Loading...
Searching...
No Matches
Arcane::ArcaNetReader Class Reference

Class allowing to read ArcaNet files. More...

#include <arccore/common/ArcaNetReader.h>

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.

Detailed Description

Class allowing to read ArcaNet files.

Definition at line 200 of file ArcaNetReader.h.

Constructor & Destructor Documentation

◆ ArcaNetReader()

Arcane::ArcaNetReader::ArcaNetReader ( const JSONValue & root)

Constructor.

Parameters
rootroot element of ArcaNet file.

Definition at line 29 of file ArcaNetReader.cc.

Member Function Documentation

◆ computePath()

bool Arcane::ArcaNetReader::computePath ( ) const
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.

◆ configPartName()

String Arcane::ArcaNetReader::configPartName ( )
inline

Method allowing to get the final name of program part.

Definition at line 276 of file ArcaNetReader.h.

References Arcane::String::empty().

◆ extractFilePart()

JSONValue Arcane::ArcaNetReader::extractFilePart ( const JSONValue & config_part)

Method allowing to get the file part of a JSONValue (from 'jsonValues()' array).

Parameters
config_partAn element of 'jsonValues()' array.
Returns
The file part.

Definition at line 114 of file ArcaNetReader.cc.

References Arcane::JSONValue::child().

◆ extractPart()

JSONValue Arcane::ArcaNetReader::extractPart ( const String & part_name,
const JSONValue & config_part )

Method allowing to get a part of a JSONValue (from 'jsonValues()' array).

Parameters
part_nameThe name of the part to get.
config_partAn element of 'jsonValues()' array.
Returns
The json part.

Definition at line 139 of file ArcaNetReader.cc.

References Arcane::JSONValue::child().

◆ extractProgPart()

JSONValue Arcane::ArcaNetReader::extractProgPart ( const JSONValue & config_part)

Method allowing to get the program part of a JSONValue (from 'jsonValues()' array).

Parameters
config_partAn element of 'jsonValues()' array.
Returns
The program part.

Definition at line 123 of file ArcaNetReader.cc.

References Arcane::JSONValue::child(), and Arcane::JSONValue::null().

◆ init()

void Arcane::ArcaNetReader::init ( const String & case_and_variations_values,
const String & prog_name )

Method allowing to initialise the file reader.

Parameters
case_and_variations_valuesThe case name with variations values (example : "case1~init:nb_proc=4").
prog_nameProgram 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().

◆ jsonValues()

ArrayView< JSONValue > Arcane::ArcaNetReader::jsonValues ( )
inline

Method allowing to get all JSONValue to read, following the chain of dependencies.

Definition at line 231 of file ArcaNetReader.h.

◆ path()

String Arcane::ArcaNetReader::path ( ) const
inline

Method allowing to get the dependencies path.

Definition at line 271 of file ArcaNetReader.h.

◆ read()

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().


The documentation for this class was generated from the following files: