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 <numeric>
50#include <vector>
51
52//---------------------------------
53// Automatic leak detection with Microsoft VisualC++
54// http://msdn.microsoft.com/en-us/library/e5ewb1h3(v=VS.90).aspx
55// http://wiki.wxwidgets.org/Avoiding_Memory_Leaks
56//---------------------------------
57
58#ifdef _DEBUG
59
60#include <stdlib.h>
61#include <wx/debug.h> // wxASSERT
62
63#ifdef __WXMSW__
64#include <crtdbg.h>
65#include <wx/msw/msvcrt.h> // redefines the new() operator
66
67#if !defined(_INC_CRTDBG) || !defined(_CRTDBG_MAP_ALLOC)
68#pragma message("Debug CRT functions have not been included!")
69#endif
70#endif
71
72#ifdef USE_VLD
73#include <vld.h> // Visual Leak Detector (https://vld.codeplex.com/)
74#endif
75
76#endif
77
78//---------------------------------
79// Typedefs
80//---------------------------------
81
82using std::vector;
83typedef std::string string;
84typedef vector<string> vecStr;
85typedef vector<int> vecInt;
86typedef vector<float> vecFloat;
87typedef vector<double> vecDouble;
88typedef vector<double*> vecDoublePt;
89typedef Eigen::ArrayXd axd;
90typedef Eigen::ArrayXi axi;
91typedef Eigen::ArrayXXd axxd;
92typedef vector<Eigen::ArrayXd> vecAxd;
93typedef vector<Eigen::ArrayXXd> vecAxxd;
94
95// A time structure
96typedef struct {
97 int year;
98 int month;
99 int day;
100 int hour;
101 int min;
102 int sec;
103} Time;
104
105//---------------------------------
106// Own exceptions
107//---------------------------------
108
109class NotImplemented : public std::logic_error {
110 public:
112 : std::logic_error("Function not yet implemented") {};
113};
114
115class ShouldNotHappen : public std::logic_error {
116 public:
118 : std::logic_error("This should not happen...") {};
119};
120
121class InvalidArgument : public std::invalid_argument {
122 public:
123 explicit InvalidArgument(const wxString& msg)
124 : std::invalid_argument(msg) {};
125};
126
127class MissingParameter : public std::logic_error {
128 public:
129 explicit MissingParameter(const wxString& msg)
130 : std::logic_error(msg) {};
131};
132
133class ConceptionIssue : public std::logic_error {
134 public:
135 explicit ConceptionIssue(const wxString& msg)
136 : std::logic_error(msg) {};
137};
138
139class NotFound : public std::logic_error {
140 public:
141 explicit NotFound(const wxString& msg)
142 : std::logic_error(msg) {};
143};
144
145//---------------------------------
146// Own classes
147//---------------------------------
148
149#include "Enums.h"
150#include "GlobVars.h"
151#include "TypeDefs.h"
152#include "Utils.h"
153
154#endif // INCLUDES_H
Definition Includes.h:133
Definition Includes.h:121
Definition Includes.h:127
Definition Includes.h:139
Definition Includes.h:109
Definition Includes.h:115
Definition Includes.h:96