00001 /* 00002 Copyright (c) 2010, The Barbarian Group 00003 All rights reserved. 00004 00005 Redistribution and use in source and binary forms, with or without modification, are permitted provided that 00006 the following conditions are met: 00007 00008 * Redistributions of source code must retain the above copyright notice, this list of conditions and 00009 the following disclaimer. 00010 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and 00011 the following disclaimer in the documentation and/or other materials provided with the distribution. 00012 00013 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 00014 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 00015 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 00016 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 00017 TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00018 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00019 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00020 POSSIBILITY OF SUCH DAMAGE. 00021 */ 00022 00023 #pragma once 00024 00025 #include <boost/cstdint.hpp> 00026 00027 namespace cinder { 00028 using boost::int8_t; 00029 using boost::uint8_t; 00030 using boost::int16_t; 00031 using boost::uint16_t; 00032 using boost::int32_t; 00033 using boost::uint32_t; 00034 using boost::int64_t; 00035 using boost::uint64_t; 00036 00037 #define CINDER_CINDER 00038 00039 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 00040 #define CINDER_MSW 00041 #elif defined(linux) || defined(__linux) || defined(__linux__) 00042 #define CINDER_LINUX 00043 #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) 00044 #define CINDER_COCOA 00045 #include "TargetConditionals.h" 00046 #if TARGET_OS_IPHONE 00047 #define CINDER_COCOA_TOUCH 00048 #else 00049 #define CINDER_MAC 00050 #endif 00051 // This is defined to prevent the inclusion of some unfortunate macros in <AssertMacros.h> 00052 #define __ASSERTMACROS__ 00053 #else 00054 #error "cinder compile error: Unknown platform" 00055 #endif 00056 00057 #define CINDER_LITTLE_ENDIAN 00058 00059 } // namespace cinder 00060 00061 00062 #if defined( _MSC_VER ) && ( _MSC_VER >= 1600 ) 00063 #include <memory> 00064 #elif defined( CINDER_COCOA ) 00065 #include <tr1/memory> 00066 namespace std { 00067 using std::tr1::shared_ptr; 00068 using std::tr1::weak_ptr; 00069 using std::tr1::static_pointer_cast; 00070 using std::tr1::dynamic_pointer_cast; 00071 using std::tr1::const_pointer_cast; 00072 using std::tr1::enable_shared_from_this; 00073 } 00074 #else 00075 #include <boost/shared_ptr.hpp> 00076 #include <boost/enable_shared_from_this.hpp> 00077 namespace std { 00078 using boost::shared_ptr; // future-proof shared_ptr by putting it into std:: 00079 using boost::weak_ptr; 00080 using boost::static_pointer_cast; 00081 using boost::dynamic_pointer_cast; 00082 using boost::const_pointer_cast; 00083 using boost::enable_shared_from_this; 00084 } 00085 #endif 00086 00087 #include <boost/shared_ptr.hpp> // necessary for checked_array_deleter 00088 using boost::checked_array_deleter; 00089 00090 // Create a namepace alias as shorthand for cinder:: 00091 #if ! defined( CINDER_NO_NS_ALIAS ) 00092 namespace ci = cinder; 00093 #endif // ! defined( CINDER_NO_NS_ALIAS )