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
argument.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\boost_1_35_0\boost\test\utils\runtime\argument.hpp
Girar
Efecto
Propiedad
Historial
// (C) Copyright Gennadiy Rozental 2005-2007. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. // // File : $RCSfile$ // // Version : $Revision: 43798 $ // // Description : model of actual argument (both typed and abstract interface) // *************************************************************************** #ifndef BOOST_RT_ARGUMENT_HPP_062604GER #define BOOST_RT_ARGUMENT_HPP_062604GER // Boost.Runtime.Parameter #include
#include
#include
// Boost.Test #include
#include
// STL #include
namespace boost { namespace BOOST_RT_PARAM_NAMESPACE { // ************************************************************************** // // ************** runtime::argument ************** // // ************************************************************************** // class argument { public: // Constructor argument( parameter const& p, rtti::id_t value_type ) : p_formal_parameter( p ) , p_value_type( value_type ) {} // Destructor virtual ~argument() {} // Public properties unit_test::readonly_property
p_formal_parameter; unit_test::readonly_property
p_value_type; }; // ************************************************************************** // // ************** runtime::typed_argument ************** // // ************************************************************************** // template
class typed_argument : public argument { public: // Constructor explicit typed_argument( parameter const& p ) : argument( p, rtti::type_id
() ) {} typed_argument( parameter const& p, T const& t ) : argument( p, rtti::type_id
() ) , p_value( t ) {} unit_test::readwrite_property
p_value; }; // ************************************************************************** // // ************** runtime::arg_value ************** // // ************************************************************************** // template
inline T const& arg_value( argument const& arg ) { assert( arg.p_value_type == rtti::type_id
() ); // detect logic error return static_cast
const&>( arg ).p_value.value; } //____________________________________________________________________________// template
inline T& arg_value( argument& arg ) { assert( arg.p_value_type == rtti::type_id
() ); // detect logic error return static_cast
&>( arg ).p_value.value; } //____________________________________________________________________________// } // namespace BOOST_RT_PARAM_NAMESPACE } // namespace boost #endif // BOOST_RT_ARGUMENT_HPP_062604GER
argument.hpp
Dirección de la página
Dirección del archivo
Anterior 1/8
Siguiente
Descargar
( 3 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.