21#include <Interprete_bloc.h>
28int Objet_U::static_obj_counter_=0;
37static int object_id_to_track = -1;
44static void object_trap(
int obj_id)
46 Cerr <<
"Objet_U::Objet_U() : object_id_=" << obj_id << finl;
55 object_id_(static_obj_counter_++)
57 int obj_id = object_id_;
58 if (obj_id == object_id_to_track)
63 _num_obj_ = memoire.
add(
this);
72 object_id_(static_obj_counter_++)
74 int obj_id = object_id_;
75 if (obj_id == object_id_to_track)
80 _num_obj_ = memoire.
add(
this);
117 Cerr <<
"The method " << __func__ <<
" must be overloaded in " <<
que_suis_je() <<
" !!!!" << finl;
157 static Nom nom_du_cas_;
168 return ref_cast_non_const(
Objet_U,obj);
172 return ref_cast_non_const(
Objet_U,obj);
182 return _num_obj_=new_ones[_num_obj_];
213 return interprete_bidon();
219 return interprete_bidon();
255 memoire.
suppr(_num_obj_);
319 static Nom inconnu=
"neant";
339 Cerr <<
"The method " << __func__ <<
" must be overloaded in " <<
que_suis_je() <<
" !!!!" << finl;
353 Cerr <<
"The method " << __func__ <<
" must be overloaded in " <<
que_suis_je() <<
" !!!!" << finl;
Base class for "interpreter" objects.
Keyword to read an object, typically from a data file.
static Memoire & Instance()
Returns a pointer to the memory instance. Creates a new memory object if no instance has been created...
int suppr(int)
Removes from memory the Objet_U with index num. The Objet_U itself is not deleted; only its pointer i...
int add(Objet_U *)
Adds an Objet_U to the TRUST memory.
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
friend int operator!=(const Objet_U &, const Objet_U &)
Returns 1 - x.est_egal_a(y).
const Objet_U & operator=(const Objet_U &)
Assignment operator: does nothing (the number and identifier are preserved).
virtual int lire_motcle_non_standard(const Motcle &motlu, Entree &is)
Reads non-simple-type parameters of an Objet_U from an input stream.
virtual int associer_(Objet_U &)
Associates the Objet_U with another Objet_U. Virtual method to override.
static const Type_info * info()
Returns type information for the Objet_U (static version).
int numero() const
Returns the index of the object in Memoire::data.
const Interprete & interprete() const
static bool disable_TU
Flag to disable or not the writing of the .TU files.
virtual void nommer(const Nom &)
Assigns a name to the Objet_U. Virtual method to override.
const Nom & que_suis_je() const
Returns the string identifying the class.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
friend int operator==(const Objet_U &, const Objet_U &)
Returns x.est_egal_a(y).
static double precision_geom
static bool stat_per_proc_perf_log
Flag to enable the writing of the statistics detailed per processor in _csv.TU file.
static const Objet_U & self_cast(const Objet_U &)
Method added for casting in Python.
static const Nom & nom_du_cas()
Returns a constant reference to the case name. This method is static.
virtual int change_num(const int *const)
Changes the internal number of the Objet_U.
virtual int est_egal_a(const Objet_U &) const
Returns 1 if x and *this are the same instance (same memory address).
const char * le_type() const
Returns the type name of the Objet_U.
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
virtual const Nom & le_nom() const
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
static int format_precision_geom
virtual int reprendre(Entree &)
Restores an Objet_U from an input stream. Virtual method to override.
static int DEACTIVATE_SIGINT_CATCH
static Type_info info_obj
static Nom & get_set_nom_du_cas()
Returns a non-constant reference to the case name (to allow modification). This method is static.
int get_object_id() const
Returns the unique identifier of the object (object_id_).
~Objet_U() override
Destructor. Removes the object from the list of objects registered in "memory".
virtual const Type_info * get_info() const
Returns type information for the Objet_U.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
virtual int sauvegarder(Sortie &) const
Saves an Objet_U to an output stream. Virtual method to override.
Base class of TRUST (in particular Objet_U).
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Models type information for Objet_U objects.