Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal 2.0.0
Common.h
1
16
17#pragma once
18
32
33#if defined(Common_RECURSES)
34#error Recursive header files inclusion detected in Common.h
35#else // defined(Common_RECURSES)
37#define Common_RECURSES
38
39#if !defined Common_h
40#define Common_h
41
43// Inclusions
44#include <iostream>
45#include <exception>
46#include <boost/version.hpp>
47#include <boost/concept_check.hpp>
48#include <boost/static_assert.hpp>
49#include <boost/concept/assert.hpp>
50#include <boost/concept/requires.hpp>
51#include <boost/iterator/iterator_concepts.hpp>
52#include <boost/concept_archetype.hpp>
53#include <boost/static_assert.hpp>
54
55#ifndef NDEBUG
56#ifdef __linux__
57#include <fenv.h>
58#endif
59#endif
60
61
62#ifdef _MSC_VER
63#define NOMINMAX
64#include <windows.h>
65#ifdef M_PI
66#undef M_PI
67#endif
68
69//C++ exception specification ignored except
70//to indicate a function is not __declspec(nothrow)
71#pragma warning(disable : 4290)
72//C++ Perf Warning int <- bool
73#pragma warning(disable : 4800)
74#endif
75
76
77#if defined( WIN32 )
78#define _USE_MATH_DEFINES
79#include <math.h>
80#else
81#include <cmath>
82#endif //win32
83
84// Explicit M_PI definition if needed
85// (issue https://github.com/DGtal-team/DGtal/issues/1204)
86#ifndef M_PI
87#define M_PI (3.14159265358979323846)
88#endif
89#ifndef M_PI_2
90#define M_PI_2 (1.57079632679489661923)
91#endif
92
93
94#if defined( WIN32 )
95#define secured_sprintf sprintf_s
96#else
97#include <stdio.h>
98#define secured_sprintf snprintf
99#endif // defined( WIN32 )
100
101#include "DGtal/base/Config.h"
102#include "DGtal/base/Trace.h"
103#include "DGtal/base/TraceWriterTerm.h"
104#include "DGtal/base/TraceWriterFile.h"
105#include "DGtal/base/Assert.h"
106#include "DGtal/base/ConceptUtils.h"
107#include "DGtal/base/BasicTypes.h"
108#include "DGtal/base/BasicFunctors.h"
109#include "DGtal/base/BasicArchetypes.h"
110#include "DGtal/base/Exceptions.h"
111
113namespace DGtal
114{
115
120
124 enum Orientation { INSIDE = 0, ON = 1, OUTSIDE = 2};
125
130
131
137
138 class Board2D;
139
140 template < class Space, class KSpace> class Display3D;
141
142#if defined( DGTAL_WITH_POLYSCOPE )
143 template < class Space, class KSpace> class PolyscopeViewer;
144#endif
145
156 virtual void setStyle( Board2D & ) const {}
158 };
159} // namespace DGtal
160
161
162// //
164
165#endif // !defined Common_h
166
167#undef Common_RECURSES
168#endif // else defined(Common_RECURSES)
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Definition Board2D.h:71
Base class for viewing DGtal objects.
Definition Display3D.h:377
Implements trace prefix for color terminals.
implementation of basic methods to trace out messages with indentation levels.
Definition Trace.h:74
DGtal is the top-level namespace which contains all DGtal functions and types.
Closest
Definition Common.h:129
@ ClosestBOTH
Definition Common.h:129
@ ClosestSECOND
Definition Common.h:129
@ ClosestFIRST
Definition Common.h:129
std::uint32_t uint32_t
unsigned 32-bit integer.
Definition BasicTypes.h:62
DGtal::uint32_t Dimension
Definition Common.h:119
Trace trace
Orientation
Definition Common.h:124
@ INSIDE
Definition Common.h:124
@ OUTSIDE
Definition Common.h:124
@ ON
Definition Common.h:124
TraceWriterTerm traceWriterTerm(std::cerr)
virtual void setStyle(Board2D &) const
Definition Common.h:156
virtual ~DrawableWithBoard2D()
Definition Common.h:157