Char_ptr#

#include <Char_ptr.h>

class Char_ptr Une chaine de caractere pour nommer les objets de TRUST

How to cite this class in this doc#

:ref:`Char\_ptr <class-char-ptr>`
[Char\_ptr](#class-char-ptr)

Detailed description#

List of Public Methods#

Complete Member Function Documentation#

allocate
void Char_ptr::allocate(int n)
References
Referenced By
How to cite in this doc:
:ref:`void Char_ptr::allocate(int n) <public-void-char-ptr-allocate-int-n>`
[void Char_ptr::allocate(int n)](#public-void-char-ptr-allocate-int-n)
Char_ptr
Char_ptr::Char_ptr()

Constructeur par defaut.

Cree la chaine “??”

References
How to cite in this doc:
:ref:`Char_ptr::Char_ptr() <public-char-ptr-char-ptr>`
[Char_ptr::Char_ptr()](#public-char-ptr-char-ptr)
Char_ptr
Char_ptr::Char_ptr(const char *nom)

Construction d’un nom a partir d’une chaine de caracteres La chaine est copiee.

References
How to cite in this doc:
:ref:`Char_ptr::Char_ptr(const char *nom) <public-char-ptr-char-ptr-const-char-ptr-nom>`
[Char_ptr::Char_ptr(const char *nom)](#public-char-ptr-char-ptr-const-char-ptr-nom)
Char_ptr
Char_ptr::Char_ptr(const Char_ptr &)

Constructeur par copie d’un nom.

References
How to cite in this doc:
:ref:`Char_ptr::Char_ptr(const Char_ptr &) <public-char-ptr-char-ptr-const-char-ptr-ref>`
[Char_ptr::Char_ptr(const Char_ptr &)](#public-char-ptr-char-ptr-const-char-ptr-ref)
getChar
char * Char_ptr::getChar()
References
Referenced By
How to cite in this doc:
:ref:`char * Char_ptr::getChar() <public-char-ptr-char-ptr-getchar>`
[char * Char_ptr::getChar()](#public-char-ptr-char-ptr-getchar)
getChar
const char * Char_ptr::getChar() const
References
How to cite in this doc:
:ref:`const char * Char_ptr::getChar() const <public-const-char-ptr-char-ptr-getchar-const>`
[const char * Char_ptr::getChar() const](#public-const-char-ptr-char-ptr-getchar-const)
longueur
int Char_ptr::longueur() const

Renvoie le nombre de caracteres de la chaine du Char_ptr y compris le caractere zero de fin de chaine.

Exemple : Char_ptr (“hello”). longueur() = = 6

References
How to cite in this doc:
:ref:`int Char_ptr::longueur() const <public-int-char-ptr-longueur-const>`
[int Char_ptr::longueur() const](#public-int-char-ptr-longueur-const)
operator char *
Char_ptr::operator char *() const

Retourne un pointeur sur la chaine de caractere du nom.

How to cite in this doc:
:ref:`Char_ptr::operator char *() const <public-char-ptr-operator-char-ptr-const>`
[Char_ptr::operator char *() const](#public-char-ptr-operator-char-ptr-const)
operator =
Char_ptr & Char_ptr::operator=(const char *)

Copie la chaine nom.

Modif BM pour que nom puisse pointer sur une sous - partie de nom_

References
Referenced By
How to cite in this doc:
:ref:`Char_ptr & Char_ptr::operator=(const char *) <public-char-ptr-ref-char-ptr-operator-equal-const-char-ptr>`
[Char_ptr & Char_ptr::operator=(const char *)](#public-char-ptr-ref-char-ptr-operator-equal-const-char-ptr)
operator =
Char_ptr & Char_ptr::operator=(const Char_ptr &)

Copie le Char_ptr nom.

References
How to cite in this doc:
:ref:`Char_ptr & Char_ptr::operator=(const Char_ptr &) <public-char-ptr-ref-char-ptr-operator-equal-const-char-ptr-ref>`
[Char_ptr & Char_ptr::operator=(const Char_ptr &)](#public-char-ptr-ref-char-ptr-operator-equal-const-char-ptr-ref)
~Char_ptr
Char_ptr::~Char_ptr()

Destructeur.

References
How to cite in this doc:
:ref:`Char_ptr::~Char_ptr() <public-char-ptr-dtor-char-ptr>`
[Char_ptr::~Char_ptr()](#public-char-ptr-dtor-char-ptr)

Attributes Documentation#

nom_ (protected)
char* Char_ptr::nom_