1/* -*-c++-*- */ 2/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph 3 * Copyright 2016 Pelican Mapping 4 * http://osgearth.org 5 * 6 * osgEarth is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU Lesser General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/> 18 */ 19 20#ifndef OSGEARTHQT_COMMON_H 21#define OSGEARTHQT_COMMON_H 1 22 23#include <osgEarth/Common> 24#include <osgEarthAnnotation/AnnotationNode> 25#include <osgViewer/Viewer> 26 27#if defined(_MSC_VER) 28 #pragma warning( disable : 4244 ) 29 #pragma warning( disable : 4251 ) 30 #pragma warning( disable : 4267 ) 31 #pragma warning( disable : 4275 ) 32 #pragma warning( disable : 4290 ) 33 #pragma warning( disable : 4786 ) 34 #pragma warning( disable : 4305 ) 35 #pragma warning( disable : 4996 ) 36#endif 37 38#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) 39 # if defined( OSGEARTHQT_LIBRARY_STATIC ) 40 # define OSGEARTHQT_EXPORT 41 # elif defined( OSGEARTHQT_LIBRARY ) 42 # define OSGEARTHQT_EXPORT __declspec(dllexport) 43 # else 44 # define OSGEARTHQT_EXPORT __declspec(dllimport) 45 # endif 46#else 47 # define OSGEARTHQT_EXPORT 48#endif 49 50// set up define for whether member templates are supported by VisualStudio compilers. 51#ifdef _MSC_VER 52# if (_MSC_VER >= 1300) 53# define __STL_MEMBER_TEMPLATES 54# endif 55#endif 56 57/* Define NULL pointer value */ 58 59#ifndef NULL 60 #ifdef __cplusplus 61 #define NULL 0 62 #else 63 #define NULL ((void *)0) 64 #endif 65#endif 66 67#ifndef OSG_MIN_VERSION_REQUIRED 68 #define OSG_MIN_VERSION_REQUIRED(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION>MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>=PATCH)))) 69#endif 70 71#ifndef OSG_VERSION_LESS_THAN 72 #define OSG_VERSION_LESS_THAN(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION<MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION<MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION<PATCH)))) 73#endif 74 75/** 76\namespace osgEarthQt 77*/ 78 79namespace osgEarth { namespace QtGui { 80 81 typedef std::vector< osg::ref_ptr<osgEarth::Annotation::AnnotationNode> > AnnotationVector; 82 typedef std::vector< osg::ref_ptr<osgViewer::View> > ViewVector; 83 84} } 85 86#endif // OSGEARTHQT_COMMON_H 87 88