TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Char_ptr Class Reference

class Char_ptr A character string to name TRUST objects. More...

#include <Char_ptr.h>

Public Member Functions

 Char_ptr ()
 Default constructor.
 Char_ptr (const char *nom)
 Constructs a name from a character string. The string is copied.
 Char_ptr (const Char_ptr &)
 Copy constructor of a name.
virtual ~Char_ptr ()
 Destructor.
void allocate (int n)
 operator char * () const
 Returns a pointer to the character string of the name.
int longueur () const
 Returns the number of characters in the Char_ptr string including the terminating null character.
Char_ptroperator= (const char *)
 Copies the string nom.
Char_ptroperator= (const Char_ptr &)
 Copies the Char_ptr nom.
char * getChar ()
const char * getChar () const

Protected Attributes

char * nom_

Detailed Description

class Char_ptr A character string to name TRUST objects.

See also
Motcle, .CONTRAINTES, .INVARIANTS, .HTML, .EPS

Definition at line 27 of file Char_ptr.h.

Constructor & Destructor Documentation

◆ Char_ptr() [1/3]

Char_ptr::Char_ptr ( )

Default constructor.

Creates the string "??"

Definition at line 28 of file Char_ptr.cpp.

◆ Char_ptr() [2/3]

Char_ptr::Char_ptr ( const char * nom)

Constructs a name from a character string. The string is copied.

Parameters
(constchar* nom) the character string to use

Definition at line 42 of file Char_ptr.cpp.

◆ Char_ptr() [3/3]

Char_ptr::Char_ptr ( const Char_ptr & nom)

Copy constructor of a name.

Parameters
(constChar_ptr& nom) the name to use

Definition at line 52 of file Char_ptr.cpp.

◆ ~Char_ptr()

Char_ptr::~Char_ptr ( )
virtual

Destructor.

Definition at line 61 of file Char_ptr.cpp.

Member Function Documentation

◆ allocate()

void Char_ptr::allocate ( int n)

Definition at line 119 of file Char_ptr.cpp.

◆ getChar() [1/2]

char * Char_ptr::getChar ( )
inline

Definition at line 39 of file Char_ptr.h.

◆ getChar() [2/2]

const char * Char_ptr::getChar ( ) const
inline

Definition at line 43 of file Char_ptr.h.

◆ longueur()

int Char_ptr::longueur ( ) const

Returns the number of characters in the Char_ptr string including the terminating null character.

Example: Char_ptr("hello").longueur() == 6

Definition at line 73 of file Char_ptr.cpp.

◆ operator char *()

Char_ptr::operator char * ( ) const

Returns a pointer to the character string of the name.

Returns
(char*) pointer to the character string of the name

Definition at line 113 of file Char_ptr.cpp.

◆ operator=() [1/2]

Char_ptr & Char_ptr::operator= ( const char * nom)

Copies the string nom.

Modified by BM so that nom can point to a sub-part of nom_

Definition at line 83 of file Char_ptr.cpp.

◆ operator=() [2/2]

Char_ptr & Char_ptr::operator= ( const Char_ptr & nom)

Copies the Char_ptr nom.

Parameters
(constChar_ptr& nom) the name to copy
Returns
(Char_ptr&) reference to this, representing the string of Char_ptr nom

Definition at line 103 of file Char_ptr.cpp.

Member Data Documentation

◆ nom_

char* Char_ptr::nom_
protected

Definition at line 49 of file Char_ptr.h.


The documentation for this class was generated from the following files:
  • /home/docs/trust-code/src/Kernel/Utilitaires/Char_ptr.h
  • /home/docs/trust-code/src/Kernel/Utilitaires/Char_ptr.cpp