16#ifndef Objet_U_ptr_included
17#define Objet_U_ptr_included
32 Declare_base_sans_constructeur_ni_destructeur(
Objet_U_ptr);
39 explicit operator bool() const noexcept
42 return (cle_ >= 0) ? true :
false;
45 [[deprecated(
"Do not use naming logic on OWN_PTR, Trust_Deriv, Objet_U_ptr. Will be removed")]]
48 throw std::logic_error(
"Error: le_nom() called on Objet_U_ptr\nDo not use naming logic on OWN_PTR, Trust_Deriv, Objet_U_ptr. Will be removed");
51 [[deprecated(
"Do not use naming logic on OWN_PTR, Trust_Deriv, Objet_U_ptr. Will be removed")]]
54 throw std::logic_error(
"Error: nommer() called on Objet_U_ptr\nDo not use naming logic on OWN_PTR, Trust_Deriv, Objet_U_ptr. Will be removed");
89 int ptr_object_id_ = -1;
class Nom: a character string for naming TRUST objects.
int associer_(Objet_U &objet) override
Associates the Objet_U with another Objet_U. Virtual method to override.
static constexpr bool HAS_POINTER
int change_num(const int *const) override
Updates keys when Objet_U objects have been renumbered.
Objet_U * get_Objet_U_ptr_check() const
Checks if the pointer is valid.
virtual void set_Objet_U_ptr(Objet_U *)
Makes *this point to the object *ptr. The address may be null (null pointer).
void recopie(const Objet_U &)
Duplicates the Objet_U obj and then changes the pointer to this copy.
int check_Objet_U_ptr_type(const Objet_U *ptr) const
Verifies that the object pointed to by ptr is of an acceptable type for the pointer (via get_info_ptr...
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
Objet_U_ptr(const Objet_U_ptr &)=delete
~Objet_U_ptr() override
Destructor.
void nommer(const Nom &) override
Assigns a name to the Objet_U. Virtual method to override.
Objet_U_ptr()
Builds a null pointer (key set to -1).
const Objet_U_ptr & operator=(const Objet_U_ptr &)=delete
Objet_U * typer(const char *nom_type)
Tries to create an instance of type "type".
virtual Objet_U * get_Objet_U_ptr() const
Returns a pointer to the associated Objet_U. WARNING: the address may be null (if the pointer is null...
virtual const Type_info & get_info_ptr() const =0
Base class for TRUST objects (Objet_U).
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
Models type information for Objet_U objects.