TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Fichier_Lata Class Reference

#include <Fichier_Lata.h>

Inheritance diagram for Fichier_Lata:
[legend]
Collaboration diagram for Fichier_Lata:
[legend]

Public Types

enum  Mode { ERASE , APPEND }

Public Member Functions

 Fichier_Lata (const char *basename, const char *extension, Mode mode_append, Format_Post_Lata::Format format, Format_Post_Lata::Options_Para parallel)
 Builds a file of type EcrFicPartage(Bin) or EcrFicPrive(Bin), binary or not depending on the "format" parameter.
virtual ~Fichier_Lata ()
virtual SFichierget_SFichier ()
virtual const Nomget_filename () const
 Returns the file name with its path.
virtual int is_master () const
 If the file is of shared type, returns 1 if me() equals the group master, 0 otherwise.
virtual void syncfile ()
 If the file is of shared type, calls the syncfile() method; otherwise does nothing.

Protected Attributes

Nom filename_
SFichierfichier_
int is_parallel_

Detailed Description

Definition at line 29 of file Fichier_Lata.h.

Member Enumeration Documentation

◆ Mode

Enumerator
ERASE 
APPEND 

Definition at line 32 of file Fichier_Lata.h.

Constructor & Destructor Documentation

◆ Fichier_Lata()

Fichier_Lata::Fichier_Lata ( const char * basename,
const char * extension,
Mode mode_append,
Format_Post_Lata::Format format,
Format_Post_Lata::Options_Para parallel )

Builds a file of type EcrFicPartage(Bin) or EcrFicPrive(Bin), binary or not depending on the "format" parameter.

If parallel==MULTIPLE_FILES, the file is of type EcrFicPrive(Bin). In this case, each processor opens a different file named "basename_XXXXXextension", where XXXXX equals Process::me(). All processors will return is_master() == 1. If parallel==SINGLE_FILE is non-zero, the file is of type EcrFicPartage(Bin). Only the master processor opens the file; the file name is "basenameextension". is_master() returns 1 on the master, 0 on other processors.

Parameters
(basename)beginning of the file name
(extension)end of the file name
(mode_append)If mode_append==ERASE, opens in write mode; if mode_append==APPEND, opens in append mode.
(format)Determines whether to open in binary mode or not. (possible values: Format_Post_Lata::ASCII or Format_Post_Lata::BINAIRE)
(parallel)single shared file or multiple private files...

Definition at line 37 of file Fichier_Lata.cpp.

◆ ~Fichier_Lata()

Fichier_Lata::~Fichier_Lata ( )
virtual

Definition at line 126 of file Fichier_Lata.cpp.

Member Function Documentation

◆ get_filename()

const Nom & Fichier_Lata::get_filename ( ) const
virtual

Returns the file name with its path.

Definition at line 144 of file Fichier_Lata.cpp.

◆ get_SFichier()

SFichier & Fichier_Lata::get_SFichier ( )
virtual

Definition at line 135 of file Fichier_Lata.cpp.

◆ is_master()

int Fichier_Lata::is_master ( ) const
virtual

If the file is of shared type, returns 1 if me() equals the group master, 0 otherwise.

If the file is private, returns 1 on all processors.

Definition at line 154 of file Fichier_Lata.cpp.

◆ syncfile()

void Fichier_Lata::syncfile ( )
virtual

If the file is of shared type, calls the syncfile() method; otherwise does nothing.

Definition at line 174 of file Fichier_Lata.cpp.

Member Data Documentation

◆ fichier_

SFichier* Fichier_Lata::fichier_
protected

Definition at line 44 of file Fichier_Lata.h.

◆ filename_

Nom Fichier_Lata::filename_
protected

Definition at line 43 of file Fichier_Lata.h.

◆ is_parallel_

int Fichier_Lata::is_parallel_
protected

Definition at line 45 of file Fichier_Lata.h.


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