OpenCPN Partial API docs
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
~
Functions
a
b
c
d
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
Variables
Files
File List
•
All
Classes
Namespaces
Functions
Variables
Pages
Loading...
Searching...
No Matches
dychart.h
1
/******************************************************************************
2
*
3
* Project: OpenCPN
4
* Purpose: Global Build Options
5
* Author: David Register
6
*
7
***************************************************************************
8
* Copyright (C) 2010 by David S. Register *
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
* This program is distributed in the hope that it will be useful, *
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18
* GNU General Public License for more details. *
19
* *
20
* You should have received a copy of the GNU General Public License *
21
* along with this program; if not, write to the *
22
* Free Software Foundation, Inc., *
23
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
24
***************************************************************************
25
*
26
*/
27
28
//----------------------------------------------------------------------------------
29
// Global Build options for opencpn
30
//----------------------------------------------------------------------------------
31
#ifndef _DYCHART_H_
32
#define _DYCHART_H_
33
34
#include "config.h"
35
36
#include <cmath>
37
#include <algorithm>
38
39
// Profiling support
40
41
//#include "/usr/include/valgrind/callgrind.h"
42
43
// Chart cacheing policy defaults
44
45
#define CACHE_N_LIMIT_DEFAULT 20
// Cache no more than n charts
46
47
#define CACHE_MEM_LIMIT_DEFAULT 0
// Application memory useage target, kBytes
48
49
// If defined, update the system time using GPS receiver data.
50
// Time update is applied if the system time and GPS time differ
51
// by more than one minute, and only once per session.
52
// On Linux, this option requires root privileges, obtained by sudo.
53
// Thus, the following line is required in etc/sudoers:
54
//
55
// nav ALL=NOPASSWD:/bin/date -s *
56
//
57
// Where "nav" is the user's user name.
58
//
59
// Also, the opencpn configuration file must contain the key
60
// [Settings]
61
// SetSystemTime=1
62
// For security, this option is not available on the "Options" dialog
63
#define ocpnUPDATE_SYSTEM_TIME
64
65
//------------------------------------------------------------------------------
66
// Some private, app global type definitions
67
//------------------------------------------------------------------------------
68
69
//------------------------------------------------------------------------------
70
// Various compile time options
71
//------------------------------------------------------------------------------
72
73
#ifdef __MSVC__
74
#pragma warning(disable : 4114)
75
#pragma warning( \
76
disable : 4284)
// This one is to do with "reverse iterator UDT..." Huh?
77
#endif
78
79
// Following definition required by GDAL
80
#define notdef 1
81
82
#ifdef __MSVC__
83
// __MSVC__ randomly does not link snprintf, or _snprintf
84
// Replace it with a local version, code is in cutil.c
85
#undef snprintf
86
#define snprintf mysnprintf
87
#endif
88
89
//------------------------------------------------------------------------------
90
// Some Build constants
91
//------------------------------------------------------------------------------
92
93
// Home Base, used if the config file lat/lon seems bogus or missing
94
95
//#define START_LAT 35.1025 // New Bern (Ver 1.0)
96
//#define START_LON -77.0342
97
98
//#define START_LAT 26.783 // Green Turtle Key (Ver 1.2)
99
//#define START_LON -77.333
100
101
//#define START_LAT 25.786 // Miami Beach (Ver 1.2.2)
102
//#define START_LON -80.148
103
104
#define START_LAT 33.358
// Georgetown, SC (Ver 1.2.4)
105
#define START_LON -79.282
106
107
//------------------------------------------------------------------------------
108
// Some MSW and MSVCRT Specific Includes
109
//------------------------------------------------------------------------------
110
#ifdef __WXMSW__
111
#include "wx/msw/private.h"
112
#endif
113
114
//------------------------------------------------------------------------------
115
// Some Memory Leak Detection Code
116
//------------------------------------------------------------------------------
117
118
#ifdef __MSVC__
119
#ifdef _DEBUG
120
#define _CRTDBG_MAP_ALLOC
121
#include <crtdbg.h>
122
#define DEBUG_NEW new (_NORMAL_BLOCK, __FILE__, __LINE__)
123
#define new DEBUG_NEW
124
#endif
125
#endif
126
127
//----------------------------------------------------------------------------
128
// Environment Access functions
129
//----------------------------------------------------------------------------
130
#ifdef __MSVC__
131
#define _putenv _putenv
// This is for MSVC
132
#else
133
#define _putenv putenv
// This is for other Windows compiler
134
#endif
135
136
//----------------------------------------------------------------------------
137
// Use the CPL Portability library only if S57 is enabled
138
//----------------------------------------------------------------------------
139
140
#define USE_CPL
141
//#include "gdal/cpl_port.h"
142
143
#ifndef NULL
144
#define NULL 0
145
#endif
146
147
/***********************************************************************
148
* Define __POSIX__ to imply posix thread model compatibility
149
* Especially used for communication port multithreading.
150
*
151
* Posix thread model is available on selected platforms, see code.
152
*/
153
154
#ifdef __POSIX__
155
#undef __POSIX__
156
#endif
157
158
#ifdef __WXOSX__
159
#define __POSIX__
160
#endif
161
162
#ifdef __WXGTK__
163
#define __POSIX__
164
#endif
165
166
#if defined(__OCPN__ANDROID__)
167
//#include <GLES2/gl2.h>
168
#include <qopengl.h>
169
#include <GL/gl_private.h>
// this is a cut-down version of gl.h
170
#include <GLES2/gl2.h>
171
#elif defined(__MSVC__)
172
#include "glew.h"
173
#elif defined(__WXOSX__)
174
#include <OpenGL/gl.h>
175
#include <OpenGL/glu.h>
176
typedef
void (* _GLUfuncptr)();
177
#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
178
#elif defined(__WXQT__) || defined(__WXGTK__)
179
#include <GL/glew.h>
180
#include <GL/glu.h>
181
#endif
182
183
/*
184
#if defined(_WIN32) || defined(_WIN64)
185
# include <gl/glew.h>
186
# include <GL/gl.h>
187
# include <GL/glu.h>
188
#elif __APPLE__
189
# include "TargetConditionals.h"
190
# if (TARGET_OS_IPHONE && TARGET_IPHONE_SIMULATOR) || TARGET_OS_IPHONE
191
# include <OpenGLES/ES2/gl.h>
192
# include <OpenGLES/ES2/glext.h>
193
# else
194
# include <OpenGL/gl.h>
195
# include <OpenGL/glu.h>
196
# include <OpenGL/glext.h>
197
# endif
198
#elif defined(__ANDROID__) || defined(ANDROID)
199
# include <GLES2/gl2.h>
200
# include <GLES2/gl2ext.h>
201
#elif defined(__linux__) || defined(__unix__) || defined(__posix__)
202
# include <GL/gl.h>
203
# include <GL/glu.h>
204
# include <GL/glext.h>
205
#else
206
# error platform not supported.
207
#endif
208
*/
209
210
211
#ifdef __OCPN__ANDROID__
212
#include "qdebug.h"
213
#endif
214
215
#endif
// __FILE__
include
dychart.h
Generated by
1.9.5