Reduce compiler.h to almost nothing (but it's worth keeping around I think, for

the MSVC and MipsPro warning stuff).

As a result of this patch, simgear/sg_traits.h can be deleted. So can SGCMath.h,
but I'll do that separately.

There is one more 'mechanical' change to come - getting rid of SG_USING_STD(X),
but I want to keep that separate from everything else. (There's another mechnica
l change, replacing <math.h> with <cmath> and so on *everywhere*, but one step a
t a time)
This commit is contained in:
ehofman
2008-07-25 18:35:40 +00:00
parent cd72eb20c6
commit 733e6fa14f
81 changed files with 122 additions and 450 deletions

View File

@@ -10,7 +10,7 @@ METAR_DIRS = environment
EXTRA_DIST = simgear_config.h.vc5 simgear_config.h-msvc71 version.h.in
include_HEADERS = \
compiler.h constants.h sg_inlines.h sg_traits.hxx version.h
compiler.h constants.h sg_inlines.h version.h
SUBDIRS = \
$(compatibility_DIR) \

View File

@@ -23,45 +23,8 @@
* A set of defines to encapsulate compiler and platform differences.
* Please refer to the source code for full documentation on this file.
*
* Here is a summary of what this file does.
*
* (1) Defines macros for some STL includes which may be affected
* by file name length limitations.
*
* (2) Defines macros for some features not supported by all C++ compilers.
*
* (3) Defines 'explicit' as a null macro if the compiler doesn't support
* the explicit keyword.
*
* (4) Defines 'typename' as a null macro if the compiler doesn't support
* the typename keyword.
*
* (5) Defines bool, true and false if the compiler doesn't do so.
*
* (6) Defines SG_EXPLICIT_FUNCTION_TMPL_ARGS if the compiler
* supports calling a function template by providing its template
* arguments explicitly.
*
* (7) Defines SG_NEED_AUTO_PTR if STL doesn't provide auto_ptr<>.
*
* (8) Defines SG_NO_ARROW_OPERATOR if the compiler is unable
* to support operator->() for iterators.
*
* (9) Defines SG_USE_EXCEPTIONS if the compiler supports exceptions.
* Note: no FlightGear code uses exceptions.
*
* (10) Define SG_NAMESPACES if the compiler supports namespaces.
*
* (11) SG_MATH_FN_IN_NAMESPACE_STD -- not used??
*
* (12) Define SG_HAVE_STD if std namespace is supported.
*
* (13) Defines SG_CLASS_PARTIAL_SPECIALIZATION if the compiler
* supports partial specialization of class templates.
*
* (14) Defines SG_HAVE_STD_INCLUDES to use ISO C++ Standard headers.
*
* (15) Defines SG_HAVE_STREAMBUF if <streambuf> of <streambuf.h> are present.
* This file is useful to set compiler-specific options in every file - for
* example, disabling warnings.
*
*/
@@ -77,55 +40,18 @@
#define SG_DO_STRINGIZE(X) #X
#ifdef __GNUC__
# if __GNUC__ >= 3
// g++-3.0.x
# define SG_EXPLICIT_FUNCTION_TMPL_ARGS
# define SG_NEED_AUTO_PTR
# define SG_MEMBER_TEMPLATES
# define SG_NAMESPACES
# define SG_HAVE_STD
# define SG_HAVE_STREAMBUF
# define SG_CLASS_PARTIAL_SPECIALIZATION
# define SG_HAVE_STD_INCLUDES
# define STL_ALGORITHM <algorithm>
# define STL_FUNCTIONAL <functional>
# define STL_IOMANIP <iomanip>
# define STL_IOSTREAM <iostream>
# define STL_ITERATOR <iterator>
# define STL_FSTREAM <fstream>
# define STL_STDEXCEPT <stdexcept>
# define STL_STRING <string>
# define STL_STRSTREAM <strstream>
# else
# if __GNUC__ < 3
# error Time to upgrade. GNU compilers < 3.0 not supported
# elif (__GNUC__ == 3) && (__GNUC_MINOR__ < 4)
# warning GCC compilers prior to 3.4 are suspect
# endif
# define SG_COMPILER_STR "GNU C++ version " SG_STRINGIZE(__GNUC__) "." SG_STRINGIZE(__GNUC_MINOR__)
#endif // __GNUC__
/* KAI C++ */
#if defined(__KCC)
# define SG_NAMESPACES
# define SG_HAVE_STD
# define SG_HAVE_STREAMBUF
# define SG_HAVE_TRAITS
# define SG_HAVE_STD_INCLUDES
# define STL_ALGORITHM <algorithm>
# define STL_FUNCTIONAL <functional>
# define STL_IOMANIP <iomanip>
# define STL_IOSTREAM <iostream>
# define STL_ITERATOR <iterator>
# define STL_FSTREAM <fstream>
# define STL_STDEXCEPT <stdexcept>
# define STL_STRING <string>
# define STL_STRSTREAM <strstream>
# define SG_COMPILER_STR "Kai C++ version " SG_STRINGIZE(__KCC_VERSION)
#endif // __KCC
//
@@ -133,24 +59,8 @@
//
#ifdef _MSC_VER
# define bcopy(from, to, n) memcpy(to, from, n)
# define FG_MEM_COPY(to,from,n) memcpy(to, from, n)
# if _MSC_VER >= 1200 // msvc++ 6.0 or greater
# define SG_NAMESPACES
# define SG_HAVE_STD
# define SG_HAVE_STD_INCLUDES
# define SG_HAVE_STREAMBUF
# define STL_ALGORITHM <algorithm>
# define STL_FUNCTIONAL <functional>
# define STL_IOMANIP <iomanip>
# define STL_IOSTREAM <iostream>
# define STL_ITERATOR <iterator>
# define STL_FSTREAM <fstream>
# define STL_STDEXCEPT <stdexcept>
# define STL_STRING <string>
# define STL_STRSTREAM <strstream>
# define isnan _isnan
# define snprintf _snprintf
# define copysign _copysign
@@ -172,40 +82,18 @@
//
#if defined ( sgi ) && !defined( __GNUC__ )
# define SG_HAVE_NATIVE_SGI_COMPILERS
# if (_COMPILER_VERSION < 740)
# error Need MipsPro 7.4.0 or higher now
# endif
# define SG_EXPLICIT_FUNCTION_TMPL_ARGS
# define SG_CLASS_PARTIAL_SPECIALIZATION
# define SG_NEED_AUTO_PTR
# define SG_MEMBER_TEMPLATES
# define SG_NAMESPACES
# define SG_HAVE_STD
# define SG_HAVE_STREAMBUF
# define SG_HAVE_TRAITS
# define SG_HAVE_STD_INCLUDES
# define STL_ALGORITHM <algorithm>
# define STL_FUNCTIONAL <functional>
# define STL_IOMANIP <iomanip>
# define STL_IOSTREAM <iostream>
# define STL_ITERATOR <iterator>
# define STL_FSTREAM <fstream>
# define STL_STDEXCEPT <stdexcept>
#if (_COMPILER_VERSION < 740)
# define STL_STRING <irix_string>
#else
# define STL_STRING <string>
#endif
# define STL_STRSTREAM <strstream>
#define SG_HAVE_NATIVE_SGI_COMPILERS
#pragma set woff 1001,1012,1014,1116,1155,1172,1174
#pragma set woff 1401,1460,1551,1552,1681
#ifdef __cplusplus
#pragma set woff 1682,3303
#if (_COMPILER_VERSION >= 740)
# pragma set woff 3624
#endif
# pragma set woff 1682,3303
# pragma set woff 3624
#endif
# define SG_COMPILER_STR "SGI MipsPro compiler version " SG_STRINGIZE(_COMPILER_VERSION)
@@ -235,24 +123,7 @@
// Intel C++ Compiler
//
#if defined(__ICC) || defined (__ECC)
# define SG_NAMESPACES
# define SG_HAVE_STD
# define SG_HAVE_STREAMBUF
# define SG_HAVE_TRAITS
# define SG_HAVE_STD_INCLUDES
# define STL_ALGORITHM <algorithm>
# define STL_FUNCTIONAL <functional>
# define STL_IOMANIP <iomanip>
# define STL_IOSTREAM <iostream>
# define STL_ITERATOR <iterator>
# define STL_FSTREAM <fstream>
# define STL_STDEXCEPT <stdexcept>
# define STL_STRING <string>
# define STL_STRSTREAM <strstream>
# define SG_COMPILER_STR "Intel C++ version " SG_STRINGIZE(__ICC)
#endif // __ICC
//
@@ -281,58 +152,10 @@ inline int (isnan)(double r) { return !(r <= 0 || r >= 0); }
// No user modifiable definitions beyond here.
//
#ifdef SG_NEED_EXPLICIT
# define explicit
#endif
#ifdef SG_NEED_TYPENAME
# define typename
#endif
#ifdef SG_NEED_MUTABLE
# define mutable
#endif
#ifdef SG_NEED_BOOL
typedef int bool;
# define true 1
# define false 0
#endif
#ifdef SG_EXPLICIT_FUNCTION_TMPL_ARGS
# define SG_NULL_TMPL_ARGS <>
#else
# define SG_NULL_TMPL_ARGS
#endif
#ifdef SG_CLASS_PARTIAL_SPECIALIZATION
# define SG_TEMPLATE_NULL template<>
#else
# define SG_TEMPLATE_NULL
#endif
// SG_NO_NAMESPACES is a hook so that users can disable namespaces
// without having to edit library headers.
#if defined(SG_NAMESPACES) && !defined(SG_NO_NAMESPACES)
# define SG_NAMESPACE(X) namespace X {
# define SG_NAMESPACE_END }
# define SG_USING_NAMESPACE(X) using namespace X
# else
# define SG_NAMESPACE(X)
# define SG_NAMESPACE_END
# define SG_USING_NAMESPACE(X)
#endif
/** \def SG_USING_STD(x)
* Expands to using std::x if SG_HAVE_STD is defined
* Expands to using std::X
*/
# ifdef SG_HAVE_STD
# define SG_USING_STD(X) using std::X
# define STD std
# else
# define SG_USING_STD(X)
# define STD
# endif
#endif // _SG_COMPILER_H

View File

@@ -31,11 +31,8 @@
#include <simgear/compiler.h>
#ifdef SG_HAVE_STD_INCLUDES
# include <cmath>
#else
# include <math.h>
#endif
#include <cmath>
#include <plib/sg.h>

View File

@@ -31,13 +31,8 @@
# include <windows.h>
#endif
#ifdef SG_HAVE_STD_INCLUDES
# include <streambuf>
# include <ostream>
#else
# include <iostream.h>
# include <simgear/sg_traits.hxx>
#endif
#include <streambuf>
#include <ostream>
#include <simgear/debug/debug_types.h>
@@ -64,13 +59,6 @@ class logbuf : public std::streambuf
#endif
{
public:
#ifndef SG_HAVE_STD_INCLUDES
typedef char_traits<char> traits_type;
typedef char_traits<char>::int_type int_type;
// typedef char_traits<char>::pos_type pos_type;
// typedef char_traits<char>::off_type off_type;
#endif
// logbuf( streambuf* sb ) : sbuf(sb) {}
/** Constructor */
logbuf();
@@ -167,11 +155,7 @@ private:
inline int
logbuf::sync()
{
#ifdef SG_HAVE_STD_INCLUDES
return sbuf->pubsync();
#else
return sbuf->sync();
#endif
}
inline void

View File

@@ -25,7 +25,7 @@
#include <plib/sg.h>
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <vector>
SG_USING_STD(vector);

View File

@@ -5,7 +5,7 @@
#include <simgear/compiler.h>
#include <unistd.h>
#include STL_IOSTREAM
#include <iostream>
#include "sg_binobj.hxx"

View File

@@ -32,7 +32,7 @@
// #include "protocol.hxx"
#include STL_STRING
#include <string>
#include <vector>
SG_USING_STD(vector);

View File

@@ -1,6 +1,6 @@
#include <simgear/compiler.h>
#include STL_IOSTREAM
#include <iostream>
#include "lowlevel.hxx"

View File

@@ -33,7 +33,7 @@
#include <time.h>
#include <vector>
#include STL_STRING
#include <string>
#include <iostream>
#include <simgear/bucket/newbucket.hxx>

View File

@@ -39,7 +39,7 @@
#include <time.h>
#include <list>
#include STL_STRING
#include <string>

View File

@@ -23,7 +23,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#if defined(_MSC_VER) || defined(__MINGW32__)
# include <io.h>

View File

@@ -25,7 +25,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <simgear/debug/logstream.hxx>
#include <simgear/serial/serial.hxx>

View File

@@ -36,12 +36,6 @@
#include <string>
// #ifdef SG_HAVE_STD_INCLUDES
// # include <ctime>
// #else
// # include <time.h>
// #endif
#include <simgear/serial/serial.hxx>
#include "iochannel.hxx"

View File

@@ -31,7 +31,7 @@
#include <strings.h>
#endif
#include STL_IOSTREAM
#include <iostream>
#include <simgear/debug/logstream.hxx>

View File

@@ -34,7 +34,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <simgear/math/sg_types.hxx>
#include <simgear/io/iochannel.hxx>

View File

@@ -36,7 +36,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <simgear/math/sg_types.hxx>
#include <simgear/io/iochannel.hxx>

View File

@@ -5,7 +5,7 @@
#include <simgear/compiler.h>
#include <unistd.h>
#include STL_IOSTREAM
#include <iostream>
#include "sg_socket.hxx"
#include "lowlevel.hxx"

View File

@@ -1,5 +1,5 @@
#include <simgear/compiler.h>
#include STL_IOSTREAM
#include <iostream>
#ifdef _WIN32
#include <windows.h>

View File

@@ -1,7 +1,7 @@
#include <simgear/compiler.h>
#include <simgear/debug/logstream.hxx>
#include STL_STRING
#include STL_IOSTREAM
#include <string>
#include <iostream>
#include "sg_socket.hxx"

View File

@@ -86,8 +86,6 @@
#include "coremag.hxx"
static const double pi = 3.14159265358979;
static const double a = 6378.137; /* semi-major axis (equatorial radius) of WGS84 ellipsoid */
static const double b = 6356.7523142; /* semi-minor axis referenced to the WGS84 ellipsoid */
static const double r_0 = 6371.2; /* standard Earth magnetic reference radius */
@@ -325,7 +323,7 @@ double calc_magvar( double lat, double lon, double h, long dat, double* field )
}
/* Find geodetic field components: */
psi = theta - ((pi / 2.0) - lat);
psi = theta - ((M_PI / 2.0) - lat);
sinpsi = sin(psi);
cospsi = cos(psi);
X = -B_theta * cospsi - B_r * sinpsi;

View File

@@ -20,12 +20,6 @@
#include <simgear/compiler.h>
#ifdef SG_HAVE_STD_INCLUDES
// We have cmath from the standard c++ lib available
#include <cmath>
#else
// We only have math.h with the c89 double functions.
#include <math.h>
#endif
#endif

View File

@@ -22,8 +22,9 @@
#include <iosfwd>
// FIXME, make it compile on IRIX
#include <osg/GL>
#undef GLUT_APIENTRY_DEFINED // GL/glut.h undef APIENTRY when this symbol is defined. osg/GL defines it (?).
//#include <osg/GL>
//#undef GLUT_APIENTRY_DEFINED // GL/glut.h undef APIENTRY when this symbol is defined. osg/GL defines it (?).
// This probably would work if we didn't use plib/pu.h that include GL/glut.h
// on its side.

View File

@@ -25,7 +25,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/sgstream.hxx>

View File

@@ -39,7 +39,7 @@
#include <map>
#include STL_STRING
#include <string>
SG_USING_STD(string);
class SGPropertyNode;

View File

@@ -35,7 +35,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <vector>
#include <simgear/math/point3d.hxx>

View File

@@ -31,7 +31,7 @@
#include <sys/types.h>
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <simgear/math/sg_types.hxx>

View File

@@ -21,15 +21,9 @@
// $Id$
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <ctype.h> // isspace()
#ifdef SG_HAVE_STD_INCLUDES
# include <cerrno>
#else
# include <errno.h>
#endif
#include <cerrno>
#include "sgstream.hxx"

View File

@@ -35,7 +35,7 @@
# include <istream>
#include STL_STRING
#include <string>
#include <simgear/misc/zfstream.hxx>

View File

@@ -29,16 +29,12 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <vector>
SG_USING_STD(vector);
#ifdef SG_HAVE_STD_INCLUDES
# include <cstdlib>
#else
# include <stdlib.h>
#endif
#include <cstdlib>
SG_USING_STD(string);

View File

@@ -26,7 +26,7 @@
#include <simgear/compiler.h>
#include <vector>
#include STL_STRING
#include <string>
SG_USING_STD(vector);
SG_USING_STD(string);

View File

@@ -4,7 +4,7 @@
#include <simgear/compiler.h>
#include STL_IOSTREAM
#include <iostream>
#include "tabbed_values.hxx"
SG_USING_STD(cout);

View File

@@ -145,7 +145,7 @@ enter this in the official comments in case I forget again. :-)
#include <simgear/compiler.h>
// #include STL_IOSTREAM
// #include <iostream>
#include "texcoord.hxx"

View File

@@ -23,11 +23,7 @@
#include <simgear/compiler.h>
#ifdef SG_HAVE_STD_INCLUDES
# include <cerrno>
#else
# include <errno.h>
#endif
#include <cerrno>
#include <memory.h>
#include <stdio.h>

View File

@@ -31,51 +31,20 @@
#include <zlib.h>
#ifdef SG_HAVE_STD_INCLUDES
# include <streambuf>
# include <istream>
#include <streambuf>
#include <istream>
# define ios_openmode std::ios_base::openmode
# define ios_in std::ios_base::in
# define ios_out std::ios_base::out
# define ios_app std::ios_base::app
# define ios_binary std::ios_base::binary
#define ios_openmode std::ios_base::openmode
#define ios_in std::ios_base::in
#define ios_out std::ios_base::out
#define ios_app std::ios_base::app
#define ios_binary std::ios_base::binary
# define ios_seekdir std::ios_base::seekdir
#define ios_seekdir std::ios_base::seekdir
# define ios_badbit std::ios_base::badbit
# define ios_failbit std::ios_base::failbit
#else
# ifdef SG_HAVE_STREAMBUF
# include <streambuf.h>
# include <istream.h>
# else
# include <iostream.h>
# endif
//# define ios_openmode ios::open_mode
# define ios_openmode int
# define ios_in ios::in
# define ios_out ios::out
# define ios_app ios::app
#if defined(__GNUC__) && __GNUC_MINOR__ < 8
# define ios_binary ios::bin
#else
# define ios_binary ios::binary
#endif
# define ios_seekdir ios::seek_dir
# define ios_badbit ios::badbit
# define ios_failbit ios::failbit
# include <simgear/sg_traits.hxx>
#endif // SG_HAVE_STD_INCLUDES
#define ios_badbit std::ios_base::badbit
#define ios_failbit std::ios_base::failbit
/**
* A C++ I/O streams interface to the zlib gz* functions.
@@ -87,14 +56,6 @@ class gzfilebuf : public std::streambuf
#endif
{
public:
#ifndef SG_HAVE_STD_INCLUDES
typedef char_traits<char> traits_type;
typedef char_traits<char>::int_type int_type;
// typedef char_traits<char>::pos_type pos_type;
// typedef char_traits<char>::off_type off_type;
#endif
/** Constructor */
gzfilebuf();
@@ -135,12 +96,8 @@ public:
protected:
virtual int_type underflow();
#ifndef SG_HAVE_STD_INCLUDES
virtual int_type overflow( int_type c = traits_type::eof() );
#else
virtual int_type overflow( int_type c = std::streambuf::traits_type::eof() );
#endif
virtual int_type overflow( int_type c = traits_type::eof() );
private:
int_type flushbuf();

View File

@@ -11,7 +11,7 @@
# include <simgear/compiler.h>
#endif
// #include STL_IOSTREAM
// #include <iostream>
#include <simgear/structure/exception.hxx>

View File

@@ -24,9 +24,9 @@
#include "props.hxx"
#include "props_io.hxx"
#include STL_IOSTREAM
#include STL_FSTREAM
#include STL_STRING
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>

View File

@@ -17,7 +17,7 @@
#include <stdio.h>
#include STL_STRING
#include <string>
#include <vector>
#include <map>
#include <iosfwd>

View File

@@ -5,7 +5,7 @@
#include <simgear/compiler.h>
#include STL_IOSTREAM
#include <iostream>
#include "props.hxx"
#include "props_io.hxx"

View File

@@ -1,7 +1,7 @@
#include <simgear/compiler.h>
#include <simgear/constants.h>
#include STL_IOSTREAM
#include <iostream>
#include "route.hxx"
#include "waypoint.hxx"

View File

@@ -35,7 +35,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
SG_USING_STD(string);

View File

@@ -1,7 +1,7 @@
#include <simgear/compiler.h>
#include <simgear/constants.h>
#include STL_IOSTREAM
#include <iostream>
#include "waypoint.hxx"

View File

@@ -32,7 +32,7 @@
#include <simgear/compiler.h>
#include STL_STRING // Standard C++ string library
#include <string> // Standard C++ string library
#include <vector>
#include <map>

View File

@@ -40,7 +40,7 @@
#include SG_GL_H
#include <string.h>
#include STL_STRING
#include <string>
#include <osg/AlphaFunc>
#include <osg/BlendFunc>
@@ -66,7 +66,6 @@
#include "matlib.hxx"
SG_USING_NAMESPACE(std);
SG_USING_STD(string);
// Constructor

View File

@@ -33,7 +33,7 @@
#include <simgear/structure/SGSharedPtr.hxx>
#include STL_STRING // Standard C++ string library
#include <string> // Standard C++ string library
#include <map> // STL associative "array"
#include <vector> // STL "array"

View File

@@ -30,7 +30,7 @@
#include <simgear/compiler.h>
#include STL_STRING // Standard C++ string library
#include <string> // Standard C++ string library
#include <vector>
#include <osg/ref_ptr>

View File

@@ -30,7 +30,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <map>
// Class to register per file extension read callbacks with the OSG

View File

@@ -24,7 +24,7 @@
#include <simgear/compiler.h> // for SG_USING_STD
#include STL_STRING
#include <string>
#include <osg/Node>

View File

@@ -32,7 +32,7 @@
#include <simgear/math/SGMath.hxx>
#include <simgear/structure/SGReferenced.hxx>
#include STL_STRING
#include <string>
SG_USING_STD(string);
#include <osg/ref_ptr>

View File

@@ -31,7 +31,7 @@
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/math/polar3d.hxx>
#include STL_ALGORITHM
#include <algorithm>
#include <vector>
SG_USING_STD(vector);

View File

@@ -30,7 +30,7 @@
#include <simgear/compiler.h>
#include <stdio.h>
#include STL_IOSTREAM
#include <iostream>
#include <osg/Array>
#include <osg/AlphaFunc>

View File

@@ -33,7 +33,7 @@
#include <simgear/math/sg_random.h>
#include <simgear/misc/sg_path.hxx>
#include STL_ALGORITHM
#include <algorithm>
#include SG_GLU_H
#include "cloudfield.hxx"

View File

@@ -25,7 +25,7 @@
#include <plib/sg.h>
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <vector>
#include "bbcache.hxx"

View File

@@ -29,7 +29,7 @@
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
#include STL_IOSTREAM
#include <iostream>
#include <osg/Node>
#include <osg/Geometry>

View File

@@ -36,7 +36,7 @@
#include <simgear/debug/logstream.hxx>
#include <stdio.h>
#include STL_IOSTREAM
#include <iostream>
#include <osg/AlphaFunc>
#include <osg/BlendFunc>

View File

@@ -31,8 +31,6 @@
#include "TileEntry.hxx"
#include "TileCache.hxx"
SG_USING_NAMESPACE(std);
using simgear::TileEntry;
using simgear::TileCache;

View File

@@ -25,7 +25,7 @@
#include <simgear/compiler.h>
#include <plib/ul.h>
#include STL_STRING
#include <string>
#include <sstream>
#include <istream>

View File

@@ -32,7 +32,7 @@
#include <simgear/compiler.h>
#include <vector>
#include STL_STRING
#include <string>
#include <simgear/bucket/newbucket.hxx>
#include <simgear/math/point3d.hxx>

View File

@@ -32,7 +32,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <osg/Node>

View File

@@ -31,7 +31,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <osg/Node>
#include <osg/Group>

View File

@@ -31,7 +31,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <vector> // STL
#include <osg/Drawable>

View File

@@ -27,7 +27,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <plib/sg.h>

View File

@@ -27,7 +27,7 @@
#include <vector>
#include <map>
#include STL_STRING
#include <string>
SG_USING_STD(map);
SG_USING_STD(vector);

View File

@@ -23,13 +23,8 @@
#include <simgear/compiler.h>
#include STL_IOSTREAM
#ifdef SG_HAVE_STD_INCLUDE
# include <cerrno>
#else
# include <errno.h>
#endif
#include <iostream>
#include <cerrno>
#if !defined( WIN32 ) || defined( __CYGWIN__) || defined( __CYGWIN32__ )
# include <termios.h>

View File

@@ -37,7 +37,7 @@
#endif
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
SG_USING_STD(string);
// if someone know how to do this all with C++ streams let me know

View File

@@ -1,7 +1,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include STL_IOSTREAM
#include <string>
#include <iostream>
#include <simgear/debug/logstream.hxx>

View File

@@ -1,28 +0,0 @@
/** \file sg_traits.hxx
* Provides a char_traits declaration for systems without it.
* \internal
*/
#ifndef _SG_TRAITS_HXX
#define _SG_TRAITS_HXX
#include <simgear/compiler.h>
#ifndef SG_HAVE_TRAITS
// Dummy up some char traits for now.
template<class charT> struct char_traits{};
SG_TEMPLATE_NULL
struct char_traits<char>
{
typedef char char_type;
typedef int int_type;
typedef streampos pos_type;
typedef streamoff off_type;
static int_type eof() { return EOF; }
};
#endif // SG_HAVE_TRAITS
#endif // _SG_TRAITS_HXX

View File

@@ -34,7 +34,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <simgear/debug/logstream.hxx>
#include <simgear/structure/SGReferenced.hxx>

View File

@@ -68,7 +68,7 @@ extern "C" int isinf (double);
#endif
#include STL_IOSTREAM
#include <iostream>
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/sg_path.hxx>

View File

@@ -39,7 +39,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <map>
#if defined( __APPLE__ )

View File

@@ -13,7 +13,7 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <map>
#include <vector>

View File

@@ -11,7 +11,7 @@
#define __SIMGEAR_MISC_EXCEPTION_HXX 1
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
SG_USING_STD(string);

View File

@@ -31,7 +31,7 @@
# include <float.h>
#endif
#include STL_STRING
#include <string>
SG_USING_STD(string);
#include <vector>

View File

@@ -3,12 +3,7 @@
#include <simgear/compiler.h>
#if defined ( SG_HAVE_STD_INCLUDES )
# include <cassert>
#else
# include <assert.h>
#endif
#include <cassert>
#include <queue>
#include "SGThread.hxx"
#include "SGGuard.hxx"

View File

@@ -26,13 +26,8 @@
#include <simgear/compiler.h>
#include <pthread.h>
#if defined ( SG_HAVE_STD_INCLUDES )
# include <cassert>
# include <cerrno>
#else
# include <assert.h>
# include <sys/errno.h>
#endif
#include <cassert>
#include <cerrno>
class SGThread;

View File

@@ -38,8 +38,6 @@
#include <math.h>
#include <vector>
SG_USING_NAMESPACE(std);
#include <simgear/constants.h>
class SGGeoCoord
@@ -65,9 +63,9 @@ public:
virtual const char * getDescription() {return 0;};
};
typedef vector<SGGeoCoord*> SGGeoCoordVector;
typedef vector<SGGeoCoord*>::iterator SGGeoCoordVectorIterator;
typedef vector<SGGeoCoord*>::const_iterator SGGeoCoordVectorConstIterator;
typedef std::vector<SGGeoCoord*> SGGeoCoordVector;
typedef std::vector<SGGeoCoord*>::iterator SGGeoCoordVectorIterator;
typedef std::vector<SGGeoCoord*>::const_iterator SGGeoCoordVectorConstIterator;
/************************************************************************
* SGGeoCoordContainer is a simple container class, that stores objects

View File

@@ -29,15 +29,9 @@
#include <errno.h> // for errno
#ifdef SG_HAVE_STD_INCLUDES
# include <cstdio>
# include <cstdlib>
# include <ctime>
#else
# include <math.h>
# include <stdio.h>
# include <stdlib.h>
#endif
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <string>

View File

@@ -35,11 +35,7 @@
#include <simgear/compiler.h>
#ifdef SG_HAVE_STD_INCLUDES
# include <ctime>
#else
# include <time.h>
#endif
#include <ctime>
#include <simgear/timing/timezone.h>
@@ -71,7 +67,7 @@ private:
SGTimeZoneContainer* tzContainer;
// Points to the current local timezone name;
string zonename;
std::string zonename;
// Unix "calendar" time in seconds
time_t cur_time;
@@ -104,7 +100,7 @@ private:
double gst_diff;
/** init common constructor code */
void init( double lon_rad, double lat_rad, const string& root,
void init( double lon_rad, double lat_rad, const std::string& root,
time_t init_time );
public:
@@ -128,14 +124,14 @@ public:
* @param root root path point to data file location (timezone, etc.)
* @param init_time provide an initialization time, 0 means use
current clock time */
SGTime( double lon_rad, double lat_rad, const string& root,
SGTime( double lon_rad, double lat_rad, const std::string& root,
time_t init_time );
/**
* Create an instance given a data file path.
* @param root root path point to data file location (timezone, etc.)
*/
SGTime( const string& root );
SGTime( const std::string& root );
/** Destructor */
~SGTime();
@@ -165,7 +161,7 @@ public:
* @param lon_rad current longitude (radians)
* @param lat_rad current latitude (radians)
* @param root base path containing time zone directory */
void updateLocal( double lon_rad, double lat_rad, const string& root );
void updateLocal( double lon_rad, double lat_rad, const std::string& root );
/** @return current system/unix time in seconds */
inline time_t get_cur_time() const { return cur_time; };

View File

@@ -34,11 +34,7 @@
#include <simgear/compiler.h>
#ifdef SG_HAVE_STD_INCLUDES
# include <ctime>
#else
# include <time.h>
#endif
#include <ctime>
#ifdef HAVE_SYS_TIMEB_H
# include <sys/timeb.h> // for ftime() and struct timeb

View File

@@ -44,8 +44,8 @@ class SGTimeZone : public SGGeoCoord
private:
string countryCode;
string descriptor;
std::string countryCode;
std::string descriptor;
public:

View File

@@ -11,8 +11,8 @@
#include "easyxml.hxx"
#include "xmlparse.h"
#include STL_FSTREAM
#include STL_IOSTREAM
#include <fstream>
#include <iostream>
SG_USING_STD(ifstream);

View File

@@ -11,8 +11,8 @@
#include <simgear/compiler.h>
#include <simgear/structure/exception.hxx>
#include STL_IOSTREAM
#include STL_STRING
#include <iostream>
#include <string>
#include <vector>
SG_USING_STD(istream);