16#include <communications_array.h>
17#include <Lec_Diffuse_base.h>
43 Cerr <<
"Error in Lec_Diffuse_base & operator=(const Lec_Diffuse_base & is)" << finl;
70 int ok = is.
get(buf, bufsize);
72 l = (int)strlen(buf) + 1;
76 Cerr <<
"Lec_Diffuse_base::get(...) can't be used with diffuse_=0 on non master process." << finl;
81 envoyer_broadcast(l, 0);
83 envoyer_broadcast_array(buf, l, 0);
96 if (
diffuse_) envoyer_broadcast(flag, 0);
108 if (
diffuse_) envoyer_broadcast(flag, 0);
120 if (
diffuse_) envoyer_broadcast(flag, 0);
136 if (
diffuse_) envoyer_broadcast(bin, 0);
File for reading. This class is to the C++ ifstream class what the Entree class is to the.
Class defining operators and methods for all reading operation in an input flow (file,...
int error_handle(int fail_flag)
virtual int get(int *ob, std::streamsize n)
void set_bin(bool bin) override
Changes the file write mode.
Error_Action get_error_action()
Returns error_action_ for this input (allows modifying it and restoring the previous value afterwards...
virtual void set_check_types(bool flag)
Indicates whether the stream should verify the types of read objects (ints and floating-point numbers...
Base class for diffused inputs: the master processor reads data from get_entree_master() and broadcas...
virtual Entree & get_entree_master()=0
int get(int *ob, std::streamsize n) override
void set_check_types(bool flag) override
Calls get_entree_master().
Entree & operator>>(int &ob) override
Lec_Diffuse_base()
Does nothing (protected constructor since this is a base class).
void set_bin(bool bin) override
Calls get_entree_master().
void set_diffuse(bool diffuse) override
Sets the diffuse flag for this input stream.
Lec_Diffuse_base & operator=(const Lec_Diffuse_base &)
Error.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
static int je_suis_maitre()
Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
Base class for output streams.