Home | Develop | Download | Contact
RaDefines.hpp
1 /*
2  * RaDefines.hpp
3  *
4  * Copyright 2018 Fernando Pujaico Rivera <fernando.pujaico.rivera@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301, USA.
20  *
21  */
22 
31 #ifndef __PDS_RADEFINES_HPP__
32 #define __PDS_RADEFINES_HPP__
33 
34 #include <iostream>
35 #include <cstring>
36 #include <cmath>
37 #include <ctime>
38 
39 
52  #ifndef __CURRENT_FILENAME__
56  #define __CURRENT_FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
57  #endif
58 
59  #ifndef pds_print_error_message
64  #define pds_print_error_message(msg) \
65  std::cout<<"----ERROR :: "<<__CURRENT_FILENAME__<<" -- "<<__PRETTY_FUNCTION__<<" -- line "<<__LINE__<<std::endl \
66  <<"----ERROR :: "<<msg<<std::endl
67  #endif
68 
69 
70 
71  #ifndef pds_print_warning_message
76  #define pds_print_warning_message(msg) \
77  std::cout<<"--WARNING :: "<<msg<<std::endl
78  #endif
79 
80 
81  #ifndef pds_print_info_message
86  #define pds_print_info_message(msg) \
87  std::cout<<"-----INFO :: "<<msg<<std::endl
88  #endif
89 
90 
96 namespace Pds{
97 namespace Ra{
98 
107  const double Pi =3.14159265358979323846264338327950288;
108 
112  const double Phi=1.61803398874989484820458683436563811;
113 
117  const unsigned int StringPrecision=14;
118 
122  const double WarningRCond=0.000000001;
123 
127  const double ToRadians =Pi/180.0;
128 
132  const double Nan=nan("");
133 
134 
150  typedef enum {
159  } FormatType;
160 
161 
168 }
169 }
170 
176 #endif /* __PDS_RADEFINES_HPP__ */
const unsigned int StringPrecision
Número de decimales a mostrar cuando se imprime en pantalla o en archivo.
Definition: RaDefines.hpp:117
const double WarningRCond
Valor minimo que puede tener rcond, abajo de este valor será mostrado un mensaje en pantalla.
Definition: RaDefines.hpp:122
const double Phi
Número aureo.
Definition: RaDefines.hpp:112
FormatType
Tipo de dato en la carga de información desde archivo.
Definition: RaDefines.hpp:150
const double Nan
Not A Number.
Definition: RaDefines.hpp:132
const double ToRadians
Factor de conversión de grados a radianes.
Definition: RaDefines.hpp:127
const double Pi
Número PI.
Definition: RaDefines.hpp:107
@ MatFileFormat
Definition: RaDefines.hpp:158
@ TextFormat
Definition: RaDefines.hpp:154
Nombre de espacion para PDS (Procesamiento Digital de Senales)
Definition: RaFile.hpp:47

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed