Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Macros | Typedefs | Functions
macros.h File Reference
#include <assert.h>
#include <complex>
#include "Tympan/core/defines.h"
Include dependency graph for macros.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CPLX_UN   TYComplex(1.0, 0.0)
 
#define CPLX_MUN   TYComplex(-1.0, 0.0)
 
#define CPLX_J   TYComplex(0.0, 1.0)
 
#define SAFE_DELETE(_p)
 
#define SAFE_DELETE_LIST(_p)
 

Typedefs

typedef std::complex< double > TYComplex
 

Functions

TYComplex cotanh (const TYComplex &valeur)
 
std::string indentNbToStr (int indentNb)
 
std::string uintToStr (unsigned int val)
 
std::string uintToStr (size_t val)
 
std::string uintToStr (unsigned long val)
 
std::string intToStr (int val)
 
std::string floatToStr (float val)
 
std::string doubleToStr (double val)
 
std::string doubleToStrPre (double val, int precision=2)
 
template<class T >
fromString (const std::string &str, std::ios_base &(*f)(std::ios_base &)=std::dec)
 

Macro Definition Documentation

◆ CPLX_J

#define CPLX_J   TYComplex(0.0, 1.0)

Definition at line 29 of file macros.h.

◆ CPLX_MUN

#define CPLX_MUN   TYComplex(-1.0, 0.0)

Definition at line 28 of file macros.h.

◆ CPLX_UN

#define CPLX_UN   TYComplex(1.0, 0.0)

Definition at line 27 of file macros.h.

◆ SAFE_DELETE

#define SAFE_DELETE (   _p)
Value:
{ \
if ((_p) != NULL) \
{ \
delete (_p); \
(_p) = NULL; \
} \
}

Delete propre sur un objet.

Definition at line 225 of file macros.h.

◆ SAFE_DELETE_LIST

#define SAFE_DELETE_LIST (   _p)
Value:
{ \
if ((_p) != NULL) \
{ \
delete[] (_p); \
(_p) = NULL; \
} \
}

Delete propre sur un tableau.

Definition at line 239 of file macros.h.

Typedef Documentation

◆ TYComplex

typedef std::complex<double> TYComplex

Definition at line 25 of file macros.h.

Function Documentation

◆ cotanh()

TYComplex cotanh ( const TYComplex valeur)
inline

Calcul de la cotangente hyperbolique d'un complexe.

Definition at line 34 of file macros.h.

Here is the caller graph for this function:

◆ doubleToStr()

std::string doubleToStr ( double  val)
inline

Convertit un double en une chaine de caractere. Avec une precision apres la virgule par defaut de 6 digits.

Parameters
valLa valeur a convertir.
Returns
La valeur convertie.

Definition at line 188 of file macros.h.

Here is the caller graph for this function:

◆ doubleToStrPre()

std::string doubleToStrPre ( double  val,
int  precision = 2 
)
inline

Convertit un double en une chaine de caractere avec une precision donnee. La valeur est arrondie en fonction de sa precision.

Parameters
valLa valeur a convertir.
precisionLa precision pour la conversion.
Returns
La valeur convertie.

Definition at line 205 of file macros.h.

Here is the caller graph for this function:

◆ floatToStr()

std::string floatToStr ( float  val)
inline

Convertit un float en une chaine de caractere. Avec une precision apres la virgule par defaut de 6 digits.

Parameters
valLa valeur a convertir.
Returns
La valeur convertie.

Definition at line 173 of file macros.h.

Here is the caller graph for this function:

◆ fromString()

template<class T >
T fromString ( const std::string &  str,
std::ios_base &(*)(std::ios_base &)  f = std::dec 
)
inline

Definition at line 213 of file macros.h.

◆ indentNbToStr()

std::string indentNbToStr ( int  indentNb)
inline

Retourne autant de tabulations que d'indentations demandees.

Parameters
indentNbLe nombre d'indentation demandees.
Returns
Une chaine de caractere composee de tabulations.

Definition at line 66 of file macros.h.

◆ intToStr()

std::string intToStr ( int  val)
inline

Convertit un int en une chaine de caractere.

Parameters
valLa valeur a convertir.
Returns
La valeur convertie.

Definition at line 158 of file macros.h.

Here is the caller graph for this function:

◆ uintToStr() [1/3]

std::string uintToStr ( size_t  val)
inline

Convertit un size_t en une chaine de caractere.

Parameters
valLa valeur a convertir.
Returns
La valeur convertie.

Definition at line 100 of file macros.h.

◆ uintToStr() [2/3]

std::string uintToStr ( unsigned int  val)
inline

Convertit un unsigned int en une chaine de caractere.

Parameters
valLa valeur a convertir.
Returns
La valeur convertie.

Definition at line 86 of file macros.h.

Here is the caller graph for this function:

◆ uintToStr() [3/3]

std::string uintToStr ( unsigned long  val)
inline

Convertit un unsigned long en une chaine de caractere.

Parameters
valLa valeur a convertir.
Returns
La valeur convertie.

Definition at line 114 of file macros.h.