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

Class allowing to read ArcaNet files. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/ArcaNetReader.h>

Collaboration diagram for Arcane::ArcaNetReader:

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

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

◆ _addElemInPath()

void Arcane::ArcaNetReader::_addElemInPath ( const String & elem)
private

Definition at line 270 of file ArcaNetReader.cc.

◆ _readArcanePart()

void Arcane::ArcaNetReader::_readArcanePart ( const JSONValue & config_part)
private

Definition at line 302 of file ArcaNetReader.cc.

◆ _readConfigPart()

void Arcane::ArcaNetReader::_readConfigPart ( const JSONValue & config_part,
const String & node_name )
private

Definition at line 246 of file ArcaNetReader.cc.

◆ _readDependPart()

void Arcane::ArcaNetReader::_readDependPart ( const JSONValue & depend_part)
private

Definition at line 148 of file ArcaNetReader.cc.

◆ _readFileAfterPart()

void Arcane::ArcaNetReader::_readFileAfterPart ( const JSONValue & config_part)
private

Definition at line 292 of file ArcaNetReader.cc.

◆ _readFileBeforePart()

void Arcane::ArcaNetReader::_readFileBeforePart ( const JSONValue & config_part)
private

Definition at line 282 of file ArcaNetReader.cc.

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

Member Data Documentation

◆ m_build_path

bool Arcane::ArcaNetReader::m_build_path = false
private

Definition at line 289 of file ArcaNetReader.h.

◆ m_case_name

String Arcane::ArcaNetReader::m_case_name
private

Definition at line 299 of file ArcaNetReader.h.

◆ m_explored

UniqueArray<String> Arcane::ArcaNetReader::m_explored
private

Definition at line 293 of file ArcaNetReader.h.

◆ m_level_path

Integer Arcane::ArcaNetReader::m_level_path = 0
private

Definition at line 291 of file ArcaNetReader.h.

◆ m_path

StringBuilder Arcane::ArcaNetReader::m_path
private

Definition at line 290 of file ArcaNetReader.h.

◆ m_prog_custom_part_name

String Arcane::ArcaNetReader::m_prog_custom_part_name
private

Definition at line 297 of file ArcaNetReader.h.

◆ m_prog_part_name

String Arcane::ArcaNetReader::m_prog_part_name
private

Definition at line 296 of file ArcaNetReader.h.

◆ m_root

const JSONValue& Arcane::ArcaNetReader::m_root
private

Definition at line 292 of file ArcaNetReader.h.

◆ m_values

UniqueArray<JSONValue> Arcane::ArcaNetReader::m_values
private

Definition at line 298 of file ArcaNetReader.h.

◆ m_variations_key_resolved

UniqueArray<String> Arcane::ArcaNetReader::m_variations_key_resolved
private

Definition at line 294 of file ArcaNetReader.h.

◆ m_variations_value_resolved

UniqueArray<String> Arcane::ArcaNetReader::m_variations_value_resolved
private

Definition at line 295 of file ArcaNetReader.h.


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