x
Yes
No
Do you want to visit DriveHQ English website?
Inicio
Características
Precios
Prueba gratuita
Software cliente
Acerca de nosotros
Servidor de archivos
|
Solución de copias de seguridad
|
Servidor FTP
|
Servidor de correo electrónico
|
Alojamiento web
|
Software cliente
Servidor de archivos
Solución de copia de seguridad
Servidor FTP
Servidor de correo electrónico
Alojamiento web
Software cliente
constructor.hpp - Hosted on DriveHQ Cloud IT Platform
Arriba
Subir
Descargar
Compartir
Publicar
Nueva carpeta
Nuevo archivo
Copiar
Cortar
Eliminar
Pegar
Clasificación
Actualizar
Ruta de la carpeta: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\luabind\luabind\detail\constructor.hpp
Girar
Efecto
Propiedad
Historial
// Copyright (c) 2003 Daniel Wallin and Arvid Norberg // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE // OR OTHER DEALINGS IN THE SOFTWARE. #if !BOOST_PP_IS_ITERATING #ifndef LUABIND_CONSTRUCTOR_HPP_INCLUDED #define LUABIND_CONSTRUCTOR_HPP_INCLUDED #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace luabind { namespace detail { template
struct constructor_helper; namespace mpl = boost::mpl; template
struct wrapped_constructor_helper; #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY,
, 1)) #include BOOST_PP_ITERATE() template
struct construct_class { inline static void* apply(lua_State* L, weak_ref const& ref) { typedef constructor_helper
helper; return helper::execute( L , ref , (T*)0 , (ConstructorSig*)0 , (Policies*)0 ); } }; template
struct construct_wrapped_class { inline static void* apply(lua_State* L, weak_ref const& ref) { typedef wrapped_constructor_helper
helper; return helper::execute( L , ref , (T*)0 , (W*)0 , (ConstructorSig*)0 , (Policies*)0 ); } }; }} #endif // LUABIND_CONSTRUCTOR_HPP_INCLUDED #elif BOOST_PP_ITERATION_FLAGS() == 1 #define LUABIND_DECL(z, n, text) \ typedef typename find_conversion_policy
::type BOOST_PP_CAT(converter_policy,n); \ \ typename mpl::apply_wrap2< \ BOOST_PP_CAT(converter_policy,n), BOOST_PP_CAT(A,n), lua_to_cpp \ >::type BOOST_PP_CAT(c,n); #define LUABIND_PARAM(z,n,text) \ BOOST_PP_CAT(c,n).apply(L, LUABIND_DECORATE_TYPE(BOOST_PP_CAT(A,n)), n + 2) template<> struct constructor_helper
{ template
static T* execute( lua_State* L , weak_ref const& , T* , constructor
* , Policies*) { BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_DECL, _) return new T(BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_PARAM, _)); } /* template
struct apply { template
static T* call(lua_State* L, const constructor
*, const Policies*) { // L is used, but the metrowerks compiler warns about this before expanding the macros L = L; BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_DECL, _) return new T(BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_PARAM, _)); } };*/ }; template<> struct wrapped_constructor_helper
{ template
static T* execute( lua_State* L , weak_ref const& ref , T* , W* , constructor
* , Policies*) { BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_DECL, _) W* result = new W(BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_PARAM, _)); static_cast
(detail::wrap_access::ref(*result)) = ref; return result; } /* template
struct apply { template
static T* call(lua_State* L, weak_ref const& ref, const constructor
*, const Policies*) { BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_DECL, _) T* o = new T(BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_PARAM, _)); static_cast
(detail::wrap_access::ref(*o)) = ref; return o; } };*/ }; #undef LUABIND_PARAM #undef LUABIND_DECL #endif // LUABIND_CONSTRUCTOR_HPP_INCLUDED
constructor.hpp
Dirección de la página
Dirección del archivo
Anterior
10/43
Siguiente
Descargar
( 5 KB )
Comments
Total ratings:
0
Average rating:
No clasificado
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.