TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
EcritureLectureSpecial.h
1/****************************************************************************
2* Copyright (c) 2023, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef EcritureLectureSpecial_included
17#define EcritureLectureSpecial_included
18
19#include <TRUSTTabs_forward.h>
20#include <Interprete.h>
21#include <Motcle.h>
22
23/*! @brief classe EcritureLetureSpecial Classe static qui permet de faire une sauvegarde ou/et une lecture
24 *
25 * particuliere :
26 * un seul fichier binaire contenant les positions + les valeurs
27 * Permet de faire une reprise sur un nbre different de proc
28 *
29 * @sa Si le format est active (en lecture ou en ecriture) sur un probleme, il doit l'etre sur tous.
30 */
31
32class Sortie;
33class Entree;
34class Domaine_VF;
35class Champ_base;
36
38{
39 Declare_instanciable(EcritureLectureSpecial);
40public:
41 Entree& interpreter(Entree& fich) override;
42 static void lecture_special(Champ_base& ch, Entree& fich);
43 static void lecture_special(const Domaine_VF& zvf, Entree& fich, DoubleTab& val);
44 static int ecriture_special(const Champ_base& ch, Sortie& fich);
45 static int ecriture_special(const Domaine_VF& zvf, Sortie& fich, const DoubleTab& val);
46
47 static int is_lecture_special();
48 static int is_ecriture_special(int& special,int& a_faire);
49
50 static int Active;
51 static int mode_ecr;
52 static int mode_lec;
53 static Nom Input;
54 static Nom Output;
55 static Nom& get_Output();
56};
57
58#endif
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
class Domaine_VF
Definition Domaine_VF.h:44
static Nom & get_Output()
Renvoie le mode d'ecriture utilise (pour pouvoir le modifier).
static int is_ecriture_special(int &special, int &a_faire)
indique si le format special a ete demande en lecture active par sauvegarde xyz .
static int is_lecture_special()
indique si le format special a ete demande en lecture active par reprise xyz .
Entree & interpreter(Entree &fich) override
static int ecriture_special(const Champ_base &ch, Sortie &fich)
simple appel a EcritureLectureSpecial::ecriture_special (const Domaine_VF& zvf,Sortie& fich,...
static void lecture_special(Champ_base &ch, Entree &fich)
simple appel a EcritureLectureSpecial::lecture_special (const Domaine_VF& zvf,Entree& fich,...
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Classe de base des objets "interprete".
Definition Interprete.h:38
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:76
friend class Sortie
Definition Objet_U.h:75
Classe de base des flux de sortie.
Definition Sortie.h:52