Type_info#
#include <Type_info.h>
modelise une information de type pour les Objet_U
How to reference this class#
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`Type\_info <class-type-info>`
[Type\_info](#class-type-info)
Detailed description#
Member Functions: Public#
Member Functions: Static Public#
Member Functions: Private#
Member Functions: Static Private#
Complete Member Function Documentation#
bases#
Sortie & Type_info::bases(Sortie &) const
Ecriture des bases du type considere sur un flot de sortie.
Detailed description
References
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`Sortie & Type_info::bases(Sortie &) const <type-info-public-sortie-ref-type-info-bases-sortie-ref-const>`
[Sortie & Type_info::bases(Sortie &) const](#type-info-public-sortie-ref-type-info-bases-sortie-ref-const)
can_cast#
int Type_info::can_cast(const Type_info *p) const
Exploration de la hierarchie des types retourne 1 si p pointe sur un sous type du type considere.
Detailed description
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`int Type_info::can_cast(const Type_info *p) const <type-info-public-int-type-info-can-cast-const-type-info-ptr-p-const>`
[int Type_info::can_cast(const Type_info *p) const](#type-info-public-int-type-info-can-cast-const-type-info-ptr-p-const)
has_base#
int Type_info::has_base(const Nom &, int direct=0) const
Test d’appartenance d’un type dans les types de bases du type considere Le type a rechercher est identifie par son nom.
Detailed description
si direct = = 0 renvoie 1 si le type de nom name fait partie des bases de (*this) renvoie 0 sinon. si direct ! = 0 renvoie 1 si le type de nom name fait partie des bases de (*this) ou des meres directes ou non de (*this) renvoie 0 sinon.
References
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`int Type_info::has_base(const Nom &, int direct=0) const <type-info-public-int-type-info-has-base-const-nom-ref-int-direct-equal-0-const>`
[int Type_info::has_base(const Nom &, int direct=0) const](#type-info-public-int-type-info-has-base-const-nom-ref-int-direct-equal-0-const)
has_base#
int Type_info::has_base(const Type_info *p, int direct=0) const
Test d’appartenance d’un type dans les types de bases du type considere si direct = = 0.
Detailed description
renvoie 1 si (*p) fait partie des bases de (*this) renvoie 0 sinon. si direct ! = 0 renvoie 1 si (*p) fait partie des bases de (*this) ou des meres directes ou non de (*this) renvoie 0 sinon.
References
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`int Type_info::has_base(const Type_info *p, int direct=0) const <type-info-public-int-type-info-has-base-const-type-info-ptr-p-int-direct-equal-0-const>`
[int Type_info::has_base(const Type_info *p, int direct=0) const](#type-info-public-int-type-info-has-base-const-type-info-ptr-p-int-direct-equal-0-const)
instance#
Objet_U * Type_info::instance() const
Cree une instance de la classe associee au type_info.
Detailed description
References
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`Objet_U * Type_info::instance() const <type-info-public-objet-u-ptr-type-info-instance-const>`
[Objet_U * Type_info::instance() const](#type-info-public-objet-u-ptr-type-info-instance-const)
instanciable#
int Type_info::instanciable() const
Renvoie 1 si le type associe est instanciable (cree_instance non nul) renvoie 0 sinon.
Detailed description
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`int Type_info::instanciable() const <type-info-public-int-type-info-instanciable-const>`
[int Type_info::instanciable() const](#type-info-public-int-type-info-instanciable-const)
name#
const Nom & Type_info::name() const
Detailed description
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`const Nom & Type_info::name() const <type-info-public-const-nom-ref-type-info-name-const>`
[const Nom & Type_info::name() const](#type-info-public-const-nom-ref-type-info-name-const)
same#
int Type_info::same(const Nom &) const
Comparaison sur le nom d’un type Retourne 1 si les chaines de caracteres des noms du type considere et du nom indique sont identiques.
Detailed description
Retour 0 sinon
References
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`int Type_info::same(const Nom &) const <type-info-public-int-type-info-same-const-nom-ref-const>`
[int Type_info::same(const Nom &) const](#type-info-public-int-type-info-same-const-nom-ref-const)
same#
int Type_info::same(const Type_info *p) const
Renvoie 1 si this = = p, 0 sinon.
Detailed description
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`int Type_info::same(const Type_info *p) const <type-info-public-int-type-info-same-const-type-info-ptr-p-const>`
[int Type_info::same(const Type_info *p) const](#type-info-public-int-type-info-same-const-type-info-ptr-p-const)
Type_info#
Type_info::Type_info(const char *name, int nb_bases=0, const Type_info **bases=0)
Constructeur par un nom, un tableau de meres.
Detailed description
References
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`Type_info::Type_info(const char *name, int nb_bases=0, const Type_info **bases=0) <type-info-public-type-info-type-info-const-char-ptr-name-int-nb-bases-equal-0-const-type-info-ptr-ptr-bases-equal-0>`
[Type_info::Type_info(const char *name, int nb_bases=0, const Type_info **bases=0)](#type-info-public-type-info-type-info-const-char-ptr-name-int-nb-bases-equal-0-const-type-info-ptr-ptr-bases-equal-0)
Type_info#
Type_info::Type_info(const char *name, Objet_U *(*f)(), int nb_bases=0, const Type_info **bases=0)
Constructeur par un nom, une fonction et un tableau de meres.
Detailed description
La fonction permet de creer une instance du bon type.
References
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`Type_info::Type_info(const char *name, Objet_U *(*f)(), int nb_bases=0, const Type_info **bases=0) <type-info-public-type-info-type-info-const-char-ptr-name-objet-u-ptr-ptr-f-int-nb-bases-equal-0-const-type-info-ptr-ptr-bases-equal-0>`
[Type_info::Type_info(const char *name, Objet_U *(*f)(), int nb_bases=0, const Type_info **bases=0)](#type-info-public-type-info-type-info-const-char-ptr-name-objet-u-ptr-ptr-f-int-nb-bases-equal-0-const-type-info-ptr-ptr-bases-equal-0)
~Type_info#
Type_info::~Type_info()
Detailed description
References
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`Type_info::~Type_info() <type-info-public-type-info-dtor-type-info>`
[Type_info::~Type_info()](#type-info-public-type-info-dtor-type-info)
est_un_type#
int Type_info::est_un_type(const char *)
Test d’existence d’une classe du type indique si il existe une classe T dont le Type_info a.
Detailed description
le nom nom, alors est_un_type renvoie 1 renvoie le pointeur nul sinon.
References
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`int Type_info::est_un_type(const char *) <type-info-public-static-int-type-info-est-un-type-const-char-ptr>`
[int Type_info::est_un_type(const char *)](#type-info-public-static-int-type-info-est-un-type-const-char-ptr)
hierarchie#
Sortie & Type_info::hierarchie(Sortie &)
Ecriture de toute la hierarchie du type considere sur un flix de sortie.
Detailed description
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`Sortie & Type_info::hierarchie(Sortie &) <type-info-public-static-sortie-ref-type-info-hierarchie-sortie-ref>`
[Sortie & Type_info::hierarchie(Sortie &)](#type-info-public-static-sortie-ref-type-info-hierarchie-sortie-ref)
instance#
Objet_U * Type_info::instance(const char *typ)
Detailed description
le nom typ, alors instance renvoie un pointeur sur une nouvelle instance de T. renvoie le pointeur nul sinon.
References
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`Objet_U * Type_info::instance(const char *typ) <type-info-public-static-objet-u-ptr-type-info-instance-const-char-ptr-typ>`
[Objet_U * Type_info::instance(const char *typ)](#type-info-public-static-objet-u-ptr-type-info-instance-const-char-ptr-typ)
les_sous_types#
int Type_info::les_sous_types(const Nom &, Noms &sous_types)
Donne les noms des sous - types, un type mere etant donne par son nom.
Detailed description
References
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`int Type_info::les_sous_types(const Nom &, Noms &sous_types) <type-info-public-static-int-type-info-les-sous-types-const-nom-ref-noms-ref-sous-types>`
[int Type_info::les_sous_types(const Nom &, Noms &sous_types)](#type-info-public-static-int-type-info-les-sous-types-const-nom-ref-noms-ref-sous-types)
les_sous_types#
int Type_info::les_sous_types(const Type_info &, Noms &sous_types)
Donne les noms des sous - types, un type mere etant donne.
Detailed description
References
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`int Type_info::les_sous_types(const Type_info &, Noms &sous_types) <type-info-public-static-int-type-info-les-sous-types-const-type-info-ref-noms-ref-sous-types>`
[int Type_info::les_sous_types(const Type_info &, Noms &sous_types)](#type-info-public-static-int-type-info-les-sous-types-const-type-info-ref-noms-ref-sous-types)
type_info_from_name#
const Type_info * Type_info::type_info_from_name(const char *type_name)
Methode statique qui renvoie un pointeur vers le Type_info dont le nom est “type_name”.
Detailed description
Si type_name n’est pas un type, renvoie un pointeur nul.
Referenced By
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`const Type_info * Type_info::type_info_from_name(const char *type_name) <type-info-public-static-const-type-info-ptr-type-info-type-info-from-name-const-char-ptr-type-name>`
[const Type_info * Type_info::type_info_from_name(const char *type_name)](#type-info-public-static-const-type-info-ptr-type-info-type-info-from-name-const-char-ptr-type-name)
ajouter_type#
void Type_info::ajouter_type(const Type_info &type_info)
Methode statique appelee par les constructeurs de Type_info pour ajouter un nouveau type a la liste des types enregistres.
Detailed description
Verifie que le nom du type n’existe pas encore.
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`void Type_info::ajouter_type(const Type_info &type_info) <type-info-private-void-type-info-ajouter-type-const-type-info-ref-type-info>`
[void Type_info::ajouter_type(const Type_info &type_info)](#type-info-private-void-type-info-ajouter-type-const-type-info-ref-type-info)
operator =#
Type_info & Type_info::operator=(Type_info &)
Detailed description
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`Type_info & Type_info::operator=(Type_info &) <type-info-private-type-info-ref-type-info-operator-equal-type-info-ref>`
[Type_info & Type_info::operator=(Type_info &)](#type-info-private-type-info-ref-type-info-operator-equal-type-info-ref)
Type_info#
Type_info::Type_info(Type_info &)
Detailed description
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`Type_info::Type_info(Type_info &) <type-info-private-type-info-type-info-type-info-ref>`
[Type_info::Type_info(Type_info &)](#type-info-private-type-info-type-info-type-info-ref)
search_type_info_name#
int Type_info::search_type_info_name(const char *nom, int &index)
Recherche le type de nom “nom” dans la liste de types enregistres par une recherche binaire.
Detailed description
On compare les chaines converties en majuscules. On range dans “index” l’indice du type, s’il a ete trouve et sinon l’indice du type juste apres (dans ce cas, on a les_types[index - 1] - >n <nom <les_types[index] - >n ) Si le type a ete trouve on renvoie 1, sinon 0.
How to reference this method:
Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):
:ref:`int Type_info::search_type_info_name(const char *nom, int &index) <type-info-private-static-int-type-info-search-type-info-name-const-char-ptr-nom-int-ref-index>`
[int Type_info::search_type_info_name(const char *nom, int &index)](#type-info-private-static-int-type-info-search-type-info-name-const-char-ptr-nom-int-ref-index)
Attributes Documentation#
const Type_info** Type_info::b = nullptr
Objet_U *(* Type_info::cree_instance) () = nullptr
Nom* Type_info::name_ = nullptr
const char* Type_info::names_ = "rien"
int Type_info::nb_bases_ = - 1
Synonyme_info* Type_info::synonym_ = nullptr
Nom* Type_info::synonym_name_ = nullptr
const Type_info ** Type_info::les_types = 0
int Type_info::les_types_memsize = 0
int Type_info::nb_classes = 0
int * Type_info::types_homonymes = 0