📄 oasiscommon.h
字号:
/******************************************************************************
* This source file is part of Bad Camel Gaming
* Copyright (C) 2003 Zephie Greyvenstein
* See Readme.html for acknowledgements
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*****************************************************************************/
/******************************************************************************
* FILENAME : oasisCommon.h
* DESCRIPTION : Sets up common includes and defines
* AUTHOR : Zephie Greyvenstein
*****************************************************************************/
/// Avoid double inclusion
#ifndef __COMMON_H__
#define __COMMON_H__
#ifdef HAVE_CONFIG_H
#undef PACKAGE_VERSION
#undef PACKAGE_TARNAME
#undef PACKAGE_STRING
#undef PACKAGE_NAME
//#include "config.h" PENDING: How else can we get around the redef warnings?
#endif
/// Containers
#include <string>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
/// Basics
#include <cassert>
#include <ctime>
/// String
typedef std::string string;
/// Array of strings
typedef std::vector< std::string > stringArray;
/// Define platforms
#define OASIS_PLATFORM_WIN32 10
#define OASIS_PLATFORM_APPLE 11
#define OASIS_PLATFORM_LINUX 12
/// Find the platform
#if defined( __WIN32__ ) || defined( _WIN32 )
# define OASIS_PLATFORM OASIS_PLATFORM_WIN32
#elif defined( __APPLE_CC__)
# define OASIS_PLATFORM OASIS_PLATFORM_APPLE
#else
# define OASIS_PLATFORM OASIS_PLATFORM_LINUX
#endif
#if OASIS_PLATFORM == OASIS_PLATFORM_WIN32
/// disable: "conversion [without cast], possible loss of data"
# pragma warning (disable : 4244)
// disable: "<type> needs to have dll-interface to be used by clients'
// Happens on STL member variables which are not public therefore is ok
# pragma warning (disable : 4251)
/// disable: "type name first seen using 'struct' now seen using 'class'"
# pragma warning (disable : 4099)
// disable: "no suitable definition provided for explicit template
// instantiation request" Occurs in VC7 for no justifiable reason on all
// #includes of singleton
# pragma warning( disable: 4661)
#define _oasisExport __declspec( dllexport )
#else
#define _oasisExport
#endif
namespace Oasis {
#if USE_DOUBLE_PRECISION == 1
typedef double real;
#else
typedef float real;
#endif
/// 0...255
typedef unsigned char uint8;
/// -128...127
typedef char int8;
/// 0...65535
typedef unsigned short uint16;
/// -32768...32767
typedef short int16;
/// 0...4294967295
typedef unsigned long uint32;
/// -2147483648...2147483647
typedef long int32;
/// Timestamp
typedef time_t timestamp;
/// Size
typedef uint32 size;
/// Forward declare our classes to allow pointer use in headers
class audible;
class ballJoint;
class boxMass;
class boxProxy;
class cameraSystem;
class ccylinderMass;
class ccylinderProxy;
class collisionListener;
class colour;
class consoleSystem;
class convert;
class cylinderMass;
class entity;
class exception;
class frameListener;
class frameListenerSystem;
class frameListenerSystemBase;
class graphicsSystem;
class hingeJoint;
class hinge2Joint;
class inputSystem;
class inputSystemBase;
class joint;
class keyListener;
class mass;
class mixer;
class mouseListener;
class movable;
class object;
class objectResource;
class objectSystem;
class physical;
class physics;
class physicsResource;
class physicsSystem;
class pool;
class poolable;
class proxy;
class quaternion;
class resource;
class resourceManager;
class root;
class scriptExtension;
class scriptSystem;
#ifdef HAS_LUA
class scriptLuaInterpreter;
#endif
#ifdef HAS_RUBY
class scriptRubyInterpreter;
#endif
class sliderJoint;
class sound;
class soundResource;
class soundSystem;
class sphereMass;
class sphereProxy;
class system;
class universalJoint;
class vector3;
class visible;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -