hydrobricks
Loading...
Searching...
No Matches
Includes.h
1#ifndef INCLUDES_H
2#define INCLUDES_H
3
4//---------------------------------
5// Standard wxWidgets headers
6//---------------------------------
7
8// For compilers that support precompilation, includes "wx/wx.h".
9#include <wx/wxprec.h>
10
11#ifdef __BORLANDC__
12#pragma hdrstop
13#endif
14
15// For all others, include the necessary headers
16#ifndef WX_PRECOMP
17#include <wx/wx.h>
18#endif
19
20//---------------------------------
21// Eigen library
22//---------------------------------
23
24#include <Eigen/Dense>
25
26//---------------------------------
27// wxWidgets library - frequently used classes
28//---------------------------------
29
30#ifndef WX_PRECOMP
31#include <wx/arrstr.h>
32#include <wx/fileconf.h>
33#include <wx/log.h>
34#include <wx/string.h>
35#include <wx/utils.h>
36#endif
37
38#if defined(__WIN32__)
39#include <wx/msw/regconf.h> // wxRegConfig class
40#endif
41
42//---------------------------------
43// Standard library
44//---------------------------------
45
46#include <algorithm>
47#include <cmath>
48#include <exception>
49#include <memory>
50#include <numeric>
51#include <vector>
52
53//---------------------------------
54// Automatic leak detection with Microsoft VisualC++
55// http://msdn.microsoft.com/en-us/library/e5ewb1h3(v=VS.90).aspx
56// http://wiki.wxwidgets.org/Avoiding_Memory_Leaks
57//---------------------------------
58
59#ifdef _DEBUG
60
61#include <stdlib.h>
62#include <wx/debug.h> // wxASSERT
63
64#ifdef __WXMSW__
65#include <crtdbg.h>
66#include <wx/msw/msvcrt.h> // redefines the new() operator
67
68#if !defined(_INC_CRTDBG) || !defined(_CRTDBG_MAP_ALLOC)
69#pragma message("Debug CRT functions have not been included!")
70#endif
71#endif
72
73#ifdef USE_VLD
74#include <vld.h> // Visual Leak Detector (https://vld.codeplex.com/)
75#endif
76
77#endif
78
79//---------------------------------
80// Typedefs
81//---------------------------------
82
83using std::vector;
84typedef std::string string;
85typedef vector<string> vecStr;
86typedef vector<int> vecInt;
87typedef vector<float> vecFloat;
88typedef vector<double> vecDouble;
89typedef vector<double*> vecDoublePt;
90typedef Eigen::ArrayXd axd;
91typedef Eigen::ArrayXi axi;
92typedef Eigen::ArrayXXd axxd;
93typedef vector<Eigen::ArrayXd> vecAxd;
94typedef vector<Eigen::ArrayXXd> vecAxxd;
95
96// A time structure
97typedef struct {
98 int year;
99 int month;
100 int day;
101 int hour;
102 int min;
103 int sec;
104} Time;
105
106//---------------------------------
107// Own exceptions
108//---------------------------------
109
110class NotImplemented : public std::logic_error {
111 public:
113 : std::logic_error("Function not yet implemented") {};
114};
115
116class ShouldNotHappen : public std::logic_error {
117 public:
119 : std::logic_error("This should not happen...") {};
120};
121
122class InvalidArgument : public std::invalid_argument {
123 public:
124 explicit InvalidArgument(const wxString& msg)
125 : std::invalid_argument(msg) {};
126};
127
128class MissingParameter : public std::logic_error {
129 public:
130 explicit MissingParameter(const wxString& msg)
131 : std::logic_error(msg) {};
132};
133
134class ConceptionIssue : public std::logic_error {
135 public:
136 explicit ConceptionIssue(const wxString& msg)
137 : std::logic_error(msg) {};
138};
139
140class NotFound : public std::logic_error {
141 public:
142 explicit NotFound(const wxString& msg)
143 : std::logic_error(msg) {};
144};
145
146//---------------------------------
147// Own classes
148//---------------------------------
149
150#include "Enums.h"
151#include "GlobVars.h"
152#include "TypeDefs.h"
153#include "Utils.h"
154
155#endif // INCLUDES_H
Definition Includes.h:134
Definition Includes.h:122
Definition Includes.h:128
Definition Includes.h:140
Definition Includes.h:110
Definition Includes.h:116
Definition Includes.h:97