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)
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) \
* 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.
*
*/
#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
//
//
#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
//
#if defined ( sgi ) && !defined( __GNUC__ )
-# define SG_HAVE_NATIVE_SGI_COMPILERS
-
-# 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>
+# if (_COMPILER_VERSION < 740)
+# error Need MipsPro 7.4.0 or higher now
+# endif
+
+#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)
// 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
//
// 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
#include <simgear/compiler.h>
-#ifdef SG_HAVE_STD_INCLUDES
-# include <cmath>
-#else
-# include <math.h>
-#endif
+#include <cmath>
+
#include <plib/sg.h>
# 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>
#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();
inline int
logbuf::sync()
{
-#ifdef SG_HAVE_STD_INCLUDES
return sbuf->pubsync();
-#else
- return sbuf->sync();
-#endif
}
inline void
#include <plib/sg.h>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <vector>
SG_USING_STD(vector);
#include <simgear/compiler.h>
#include <unistd.h>
-#include STL_IOSTREAM
+#include <iostream>
#include "sg_binobj.hxx"
// #include "protocol.hxx"
-#include STL_STRING
+#include <string>
#include <vector>
SG_USING_STD(vector);
#include <simgear/compiler.h>
-#include STL_IOSTREAM
+#include <iostream>
#include "lowlevel.hxx"
#include <time.h>
#include <vector>
-#include STL_STRING
+#include <string>
#include <iostream>
#include <simgear/bucket/newbucket.hxx>
#include <time.h>
#include <list>
-#include STL_STRING
+#include <string>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#if defined(_MSC_VER) || defined(__MINGW32__)
# include <io.h>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <simgear/debug/logstream.hxx>
#include <simgear/serial/serial.hxx>
#include <string>
-// #ifdef SG_HAVE_STD_INCLUDES
-// # include <ctime>
-// #else
-// # include <time.h>
-// #endif
-
#include <simgear/serial/serial.hxx>
#include "iochannel.hxx"
#include <strings.h>
#endif
-#include STL_IOSTREAM
+#include <iostream>
#include <simgear/debug/logstream.hxx>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <simgear/math/sg_types.hxx>
#include <simgear/io/iochannel.hxx>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <simgear/math/sg_types.hxx>
#include <simgear/io/iochannel.hxx>
#include <simgear/compiler.h>
#include <unistd.h>
-#include STL_IOSTREAM
+#include <iostream>
#include "sg_socket.hxx"
#include "lowlevel.hxx"
#include <simgear/compiler.h>
-#include STL_IOSTREAM
+#include <iostream>
#ifdef _WIN32
#include <windows.h>
#include <simgear/compiler.h>
#include <simgear/debug/logstream.hxx>
-#include STL_STRING
-#include STL_IOSTREAM
+#include <string>
+#include <iostream>
#include "sg_socket.hxx"
#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 */
}
/* 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;
#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
#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.
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/sgstream.hxx>
#include <map>
-#include STL_STRING
+#include <string>
SG_USING_STD(string);
class SGPropertyNode;
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <vector>
#include <simgear/math/point3d.hxx>
#include <sys/types.h>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <simgear/math/sg_types.hxx>
// $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"
# include <istream>
-#include STL_STRING
+#include <string>
#include <simgear/misc/zfstream.hxx>
#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);
#include <simgear/compiler.h>
#include <vector>
-#include STL_STRING
+#include <string>
SG_USING_STD(vector);
SG_USING_STD(string);
#include <simgear/compiler.h>
-#include STL_IOSTREAM
+#include <iostream>
#include "tabbed_values.hxx"
SG_USING_STD(cout);
#include <simgear/compiler.h>
-// #include STL_IOSTREAM
+// #include <iostream>
#include "texcoord.hxx"
#include <simgear/compiler.h>
-#ifdef SG_HAVE_STD_INCLUDES
-# include <cerrno>
-#else
-# include <errno.h>
-#endif
+#include <cerrno>
#include <memory.h>
#include <stdio.h>
#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.
#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();
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();
# include <simgear/compiler.h>
#endif
-// #include STL_IOSTREAM
+// #include <iostream>
#include <simgear/structure/exception.hxx>
#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>
#include <stdio.h>
-#include STL_STRING
+#include <string>
#include <vector>
#include <map>
#include <iosfwd>
#include <simgear/compiler.h>
-#include STL_IOSTREAM
+#include <iostream>
#include "props.hxx"
#include "props_io.hxx"
#include <simgear/compiler.h>
#include <simgear/constants.h>
-#include STL_IOSTREAM
+#include <iostream>
#include "route.hxx"
#include "waypoint.hxx"
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
SG_USING_STD(string);
#include <simgear/compiler.h>
#include <simgear/constants.h>
-#include STL_IOSTREAM
+#include <iostream>
#include "waypoint.hxx"
#include <simgear/compiler.h>
-#include STL_STRING // Standard C++ string library
+#include <string> // Standard C++ string library
#include <vector>
#include <map>
#include SG_GL_H
#include <string.h>
-#include STL_STRING
+#include <string>
#include <osg/AlphaFunc>
#include <osg/BlendFunc>
#include "matlib.hxx"
-SG_USING_NAMESPACE(std);
SG_USING_STD(string);
// Constructor
#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"
#include <simgear/compiler.h>
-#include STL_STRING // Standard C++ string library
+#include <string> // Standard C++ string library
#include <vector>
#include <osg/ref_ptr>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <map>
// Class to register per file extension read callbacks with the OSG
#include <simgear/compiler.h> // for SG_USING_STD
-#include STL_STRING
+#include <string>
#include <osg/Node>
#include <simgear/math/SGMath.hxx>
#include <simgear/structure/SGReferenced.hxx>
-#include STL_STRING
+#include <string>
SG_USING_STD(string);
#include <osg/ref_ptr>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/math/polar3d.hxx>
-#include STL_ALGORITHM
+#include <algorithm>
#include <vector>
SG_USING_STD(vector);
#include <simgear/compiler.h>
#include <stdio.h>
-#include STL_IOSTREAM
+#include <iostream>
#include <osg/Array>
#include <osg/AlphaFunc>
#include <simgear/math/sg_random.h>
#include <simgear/misc/sg_path.hxx>
-#include STL_ALGORITHM
+#include <algorithm>
#include SG_GLU_H
#include "cloudfield.hxx"
#include <plib/sg.h>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <vector>
#include "bbcache.hxx"
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
-#include STL_IOSTREAM
+#include <iostream>
#include <osg/Node>
#include <osg/Geometry>
#include <simgear/debug/logstream.hxx>
#include <stdio.h>
-#include STL_IOSTREAM
+#include <iostream>
#include <osg/AlphaFunc>
#include <osg/BlendFunc>
#include "TileEntry.hxx"
#include "TileCache.hxx"
-SG_USING_NAMESPACE(std);
-
using simgear::TileEntry;
using simgear::TileCache;
#include <simgear/compiler.h>
#include <plib/ul.h>
-#include STL_STRING
+#include <string>
#include <sstream>
#include <istream>
#include <simgear/compiler.h>
#include <vector>
-#include STL_STRING
+#include <string>
#include <simgear/bucket/newbucket.hxx>
#include <simgear/math/point3d.hxx>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <osg/Node>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <osg/Node>
#include <osg/Group>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <vector> // STL
#include <osg/Drawable>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <plib/sg.h>
#include <vector>
#include <map>
-#include STL_STRING
+#include <string>
SG_USING_STD(map);
SG_USING_STD(vector);
#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>
#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
#include <simgear/compiler.h>
-#include STL_STRING
-#include STL_IOSTREAM
+#include <string>
+#include <iostream>
#include <simgear/debug/logstream.hxx>
+++ /dev/null
-/** \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
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <simgear/debug/logstream.hxx>
#include <simgear/structure/SGReferenced.hxx>
#endif
-#include STL_IOSTREAM
+#include <iostream>
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/sg_path.hxx>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <map>
#if defined( __APPLE__ )
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <map>
#include <vector>
#define __SIMGEAR_MISC_EXCEPTION_HXX 1
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
SG_USING_STD(string);
# include <float.h>
#endif
-#include STL_STRING
+#include <string>
SG_USING_STD(string);
#include <vector>
#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"
#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;
#include <math.h>
#include <vector>
-SG_USING_NAMESPACE(std);
-
#include <simgear/constants.h>
class SGGeoCoord
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
#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>
#include <simgear/compiler.h>
-#ifdef SG_HAVE_STD_INCLUDES
-# include <ctime>
-#else
-# include <time.h>
-#endif
+#include <ctime>
#include <simgear/timing/timezone.h>
SGTimeZoneContainer* tzContainer;
// Points to the current local timezone name;
- string zonename;
+ std::string zonename;
// Unix "calendar" time in seconds
time_t cur_time;
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:
* @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();
* @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; };
#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
private:
- string countryCode;
- string descriptor;
+ std::string countryCode;
+ std::string descriptor;
public:
#include "easyxml.hxx"
#include "xmlparse.h"
-#include STL_FSTREAM
-#include STL_IOSTREAM
+#include <fstream>
+#include <iostream>
SG_USING_STD(ifstream);
#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);