Page MenuHomePhorge

Types.h
No OneTemporary

Size
4 KB
Referenced Files
None
Subscribers
None
#ifndef _ECHO_TYPES_H_
#define _ECHO_TYPES_H_
#ifdef ECHO_USING_BOOST
#ifndef BOOST_VERSION
#include <boost/version.hpp> // If this include path is not found, install Boost using the instructions below.
#endif
#ifndef BOOST_VERSION
#error Please install the Boost C++ libraries. Refer to instructions here: \
developer.emblem.net.au/w/technical_documents/installing_or_upgrading_boost/
#else
#define ECHO_MINIMUM_SUPPORTED_BOOST_VERSION 104700
#if BOOST_VERSION < ECHO_MINIMUM_SUPPORTED_BOOST_VERSION
#error Please update the Boost C++ libraries to a newer version. Refer to instructions here: \
developer.emblem.net.au/w/technical_documents/installing_or_upgrading_boost/
#endif
#endif
#include <boost/detail/endian.hpp>
#ifdef BOOST_BIG_ENDIAN
#define ECHO_BIG_ENDIAN
#define ECHO_ENDIAN_DETECTED
#endif
#ifdef BOOST_LITTLE_ENDIAN
#define ECHO_LITTLE_ENDIAN
#define ECHO_ENDIAN_DETECTED
#endif
#define ECHO_BYTE_ORDER BOOST_BYTE_ORDER
#endif
#if defined(ECHO_PLATFORM_OSX) || defined(ECHO_PLATFORM_IOS)
#ifndef ECHO_USING_BOOST
#include <echo/Platforms/OSX/Types.h>
#endif
#endif
#if defined(ECHO_PLATFORM_NINTENDO_GAMECUBE) || defined(ECHO_PLATFORM_NINTENDO_WII)
#include <echo/Platforms/GCN/Types.h>
#endif
#ifdef ECHO_USING_BOOST
#include <boost/cstdint.hpp>
namespace Echo
{
//--------------------------------------------
typedef boost::uint8_t u8;
typedef boost::uint16_t u16;
typedef boost::uint32_t u32;
typedef boost::uint64_t u64;
typedef boost::int8_t s8;
typedef boost::int16_t s16;
typedef boost::int32_t s32;
typedef boost::int64_t s64;
typedef float f32;
typedef double f64;
}
#endif //ECHO_USING_BOOST
#ifdef ECHO_PLATFORM_WINDOWS
#ifndef ECHO_USING_BOOST
#include <echo/Platforms/Windows/Types.h>
#endif //ECHO_USING_BOOST
#endif //ECHO_PLATFORM_WINDOWS
//--------------------------------------------
#ifdef ECHO_PLATFORM_LINUX
#ifndef ECHO_USING_BOOST
#include <echo/Platforms/Linux/Types.h>
#endif //ECHO_USING_BOOST
#endif //ECHO_PLATFORM_LINUX
#ifndef ECHO_ENDIAN_DETECTED
#error Could not determine platform endian format. Please define ECHO_BIG_ENDIAN or ECHO_LITTLE_ENDIAN on the commandline.
#endif
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <boost/make_shared.hpp>
#include <boost/pointer_cast.hpp>
using boost::shared_ptr;
using boost::weak_ptr;
using boost::make_shared;
using boost::dynamic_pointer_cast;
using boost::static_pointer_cast;
namespace Echo
{
typedef f32 Real;
typedef f32 Scalar;
typedef u32 UTF32Code;
typedef u16 UTF16Code;
}
//This file should be included for everything so it is an ideal place to add some simple C++11 support
// of classes, keywords and identifiers for use in ancient C++.
// Microsoft C++ compiler versions which support C++11 don't have the right value for __cplusplus
#if (defined(_MSC_VER) && _MSC_VER >= 1700)
#ifdef __cplusplus
#undef __cplusplus
#define __cplusplus 201103L
#endif
#endif
#if (__cplusplus > 199711L)
// C++ ISO/IEC 14882:2011 supported by the compiler ("C++11")
#define if_cplusplus11(x) x
#else
// C++ ISO/IEC 14882:1998 supported by the compiler (hopefully)
#define if_cplusplus11(x)
// Placeholder for http://en.cppreference.com/w/cpp/language/final
#ifndef final
//#define final // breaks boost
#endif
// Placeholder for http://en.cppreference.com/w/cpp/language/override
#ifndef override
#define override
#endif
// Placeholder for http://en.cppreference.com/w/cpp/language/nullptr
// from http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/nullptr
const class nullptr_t
{
public:
template<class T>
inline operator T*(void) const
{
return 0;
}
template<class C, class T>
inline operator T C::*(void) const
{
return 0;
}
// nullptr_t support for boost::shared_ptr<T> in lieu of std::shared_ptr<T>
template<class T>
inline operator shared_ptr<T>(void) const
{
return shared_ptr<T>();
}
private:
void operator &(void) const;
} nullptr = {};
#endif
#ifndef overload
#define overload
#endif
#endif

File Metadata

Mime Type
text/x-c++
Expires
Thu, Dec 5, 2:14 AM (7 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
62419
Default Alt Text
Types.h (4 KB)

Event Timeline