DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Common.h
1 
17 #pragma once
18 
33 #if defined(Common_RECURSES)
34 #error Recursive header files inclusion detected in Common.h
35 #else // defined(Common_RECURSES)
36 
37 #define Common_RECURSES
38 
39 #if !defined Common_h
40 #define Common_h
41 
43 // Inclusions
44 
45 #ifdef WITH_VISU3D_QGLVIEWER
46 #include <QGLViewer/qglviewer.h>
47 #include <QGLWidget>
48 #include <QKeyEvent>
49 #endif
50 
51 #include <iostream>
52 #include <exception>
53 #include <algorithm>
54 #include <boost/concept_check.hpp>
55 #include <boost/static_assert.hpp>
56 #include <boost/concept/assert.hpp>
57 #include <boost/concept/requires.hpp>
58 #include <boost/iterator/iterator_concepts.hpp>
59 #include <boost/concept_archetype.hpp>
60 #include <boost/static_assert.hpp>
61 
62 #ifdef _MSC_VER
63 #define NOMINMAX
64 #include <windows.h>
65 #ifdef M_PI
66 #undef M_PI
67 #endif
68 //C++ exception specification ignored except
69 //to indicate a function is not __declspec(nothrow)
70 #pragma warning(disable : 4290)
71 //C++ Perf Warning int <- bool
72 #pragma warning(disable : 4800)
73 #endif
74 
75 #ifdef _MSC_VER
76 #if defined( max )
77 #undef max
78 #define _HAS_MSVC_MAX_ true
79 #endif
80 #if defined( min )
81 #undef min
82 #define _HAS_MSVC_MIN_ true
83 #endif
84 #endif
85 
86 #ifdef _MSC_VER
87 #define random rand
88 #endif
89 
90 #if defined( WIN32 )
91 #define _USE_MATH_DEFINES
92 #include <math.h>
93 #else
94 #include <cmath>
95 #endif //win32
96 
97 
98 #if defined( WIN32 )
99 #define secured_sprintf sprintf_s
100 #else
101 #include <stdio.h>
102 #define secured_sprintf snprintf
103 #endif // defined( WIN32 )
104 
105 #include "DGtal/base/Config.h"
106 #include "DGtal/base/Trace.h"
107 #include "DGtal/base/TraceWriterTerm.h"
108 #include "DGtal/base/TraceWriterFile.h"
109 #include "DGtal/base/Assert.h"
110 #include "DGtal/base/ConceptUtils.h"
111 #include "DGtal/base/BasicTypes.h"
112 #include "DGtal/base/BasicFunctors.h"
113 #include "DGtal/base/BasicArchetypes.h"
114 #include "DGtal/base/GlobalFunctions.h"
115 #include "DGtal/base/Exceptions.h"
116 
117 
119 
121 namespace DGtal
122 {
123 
128 
132  enum Orientation { INSIDE = 0, ON = 1, OUTSIDE = 2};
133 
134 
135 
140  extern Trace trace;
141 
142  class Board2D;
143 
144  class Display3D;
145 
157  virtual void setStyle( Display3D & ) const {}
158  };
159 
160 
161 
162 
174  virtual void setStyle( Board2D & ) const {}
175  };
176 
177 } // namespace DGtal
178 
179 
180 // //
182 
183 #endif // !defined Common_h
184 
185 #undef Common_RECURSES
186 #endif // else defined(Common_RECURSES)