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

Go to the source code of this file.

Classes

class  OSpectreAbstract
 Store acoustic power values for different frequencies. More...
 
class  OSpectre
 
class  OSpectreComplex
 
class  OSpectreOctave
 

Macros

#define CHECK_FORM_AND_GET_CONCRETE_INSTANCE
 

Typedefs

typedef std::vector< double > OTabFreq
 Frequencies collection. More...
 
typedef std::vector< OSpectreOTabSpectre
 Spectrums vector. More...
 
typedef std::vector< std::vector< OSpectre > > OTab2DSpectre
 Spectrums 2D array. More...
 
typedef std::vector< OSpectreComplexOTabSpectreComplex
 OTabSpectreComplex vector. More...
 
typedef std::vector< std::vector< OSpectreComplex > > OTab2DSpectreComplex
 OTabSpectreComplex 2D array. More...
 

Enumerations

enum  TYSpectreType {
  SPECTRE_TYPE_ATT , SPECTRE_TYPE_ABSO , SPECTRE_TYPE_LW , SPECTRE_TYPE_LP ,
  SPECTRE_TYPE_AUTRE
}
 Spectrum type. More...
 
enum  TYSpectreForm { SPECTRE_FORM_TIERS , SPECTRE_FORM_OCT , SPECTRE_FORM_CST_DF , SPECTRE_FORM_UNSHAPED }
 Spectrum representation. More...
 
enum  TYSpectreEtat { SPECTRE_ETAT_DB , SPECTRE_ETAT_LIN }
 Spectrum state (dB/Physical Measure). More...
 

Functions

::std::ostream & operator<< (::std::ostream &os, const OSpectre &s)
 

Macro Definition Documentation

◆ CHECK_FORM_AND_GET_CONCRETE_INSTANCE

#define CHECK_FORM_AND_GET_CONCRETE_INSTANCE
Value:
\
if (this->getForm() != spectre.getForm()) \
{ \
throw tympan::invalid_data("Spectrums must be same form") << tympan_source_loc; \
} \
OSpectreAbstract* sp = getConcreteInstance(); \
OSpectreAbstract& s = *sp;
NxReal s
Definition: NxVec3.cpp:317
#define tympan_source_loc
This macro build a source_loc object to be attached to a tympan::Exception.
Definition: exceptions.h:76
The base exception class for errors due to invalid data.
Definition: exceptions.h:60

Macro to check spectrum forms are consistent and to return concrete instance to operate on. Throws tympan::invalid_data if forms are inconsistent

Definition at line 66 of file spectre.h.

Typedef Documentation

◆ OTab2DSpectre

typedef std::vector<std::vector<OSpectre> > OTab2DSpectre

Spectrums 2D array.

Definition at line 473 of file spectre.h.

◆ OTab2DSpectreComplex

typedef std::vector<std::vector<OSpectreComplex> > OTab2DSpectreComplex

OTabSpectreComplex 2D array.

Definition at line 581 of file spectre.h.

◆ OTabFreq

typedef std::vector<double> OTabFreq

Frequencies collection.

Definition at line 59 of file spectre.h.

◆ OTabSpectre

typedef std::vector<OSpectre> OTabSpectre

Spectrums vector.

Definition at line 472 of file spectre.h.

◆ OTabSpectreComplex

typedef std::vector<OSpectreComplex> OTabSpectreComplex

OTabSpectreComplex vector.

Definition at line 580 of file spectre.h.

Enumeration Type Documentation

◆ TYSpectreEtat

Spectrum state (dB/Physical Measure).

Enumerator
SPECTRE_ETAT_DB 
SPECTRE_ETAT_LIN 

Definition at line 43 of file spectre.h.

◆ TYSpectreForm

Spectrum representation.

Enumerator
SPECTRE_FORM_TIERS 
SPECTRE_FORM_OCT 
SPECTRE_FORM_CST_DF 
SPECTRE_FORM_UNSHAPED 

Definition at line 35 of file spectre.h.

◆ TYSpectreType

Spectrum type.

Enumerator
SPECTRE_TYPE_ATT 
SPECTRE_TYPE_ABSO 
SPECTRE_TYPE_LW 
SPECTRE_TYPE_LP 
SPECTRE_TYPE_AUTRE 

Definition at line 26 of file spectre.h.

Function Documentation

◆ operator<<()

::std::ostream& operator<< ( ::std::ostream &  os,
const OSpectre s 
)

Definition at line 1127 of file spectre.cpp.