TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Fichier_Lata.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 Fichier_Lata_included
17#define Fichier_Lata_included
18
19#include <Format_Post_Lata.h>
20
21/*! @brief : Cette classe contient un fichier de type EcrFicPartage ou EcrFicPrive,
22 *
23 * en ASCII ou en BINAIRE selon le format specifie dans le constructeur.
24 * Voir la doc du constructeur.
25 *
26 */
27class SFichier;
28
30{
31public:
32 enum Mode {ERASE, APPEND};
33 Fichier_Lata(const char * basename, const char * extension,
34 Mode mode_append,
37 virtual ~Fichier_Lata();
38 virtual SFichier& get_SFichier();
39 virtual const Nom& get_filename() const;
40 virtual int is_master() const;
41 virtual void syncfile();
42protected:
46};
47
48/*! @brief : Specialisation du Fichier_Lata pour le fichier maitre: toujours en ASCII.
49 *
50 * On peut utiliser une precision differente si on veut
51 *
52 */
54{
55public:
56 Fichier_Lata_maitre(const char * basename, const char * extension,
57 Mode mode_append,
59};
60
61#endif /* Fichier_Lata_included */
Fichier_Lata_maitre(const char *basename, const char *extension, Mode mode_append, Format_Post_Lata::Options_Para parallel)
virtual int is_master() const
Si le fichier est de type partage, renvoie 1 si me() est egal au master du groupe et 0 sinon,...
virtual SFichier & get_SFichier()
SFichier * fichier_
Fichier_Lata(const char *basename, const char *extension, Mode mode_append, Format_Post_Lata::Format format, Format_Post_Lata::Options_Para parallel)
Construit un fichier de type EcrFicPartage(Bin) ou EcrFicPrive(Bin), binaire ou pas selon le parametr...
virtual ~Fichier_Lata()
virtual const Nom & get_filename() const
Renvoie le nom du fichier avec le path.
virtual void syncfile()
Si le fichier est de type partage, appelle la methode syncfile(), sinon ne fait rien.
Format
Options_Para
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Cette classe est a la classe C++ ofstream ce que la classe Sortie est a la classe C++ ostream Elle re...
Definition SFichier.h:27