Chris@16: // (C) Copyright Gennadiy Rozental 2005-2008. Chris@16: // Use, modification, and distribution are subject to the Chris@16: // Boost Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // See http://www.boost.org/libs/test for the library home page. Chris@16: // Chris@16: // File : $RCSfile$ Chris@16: // Chris@101: // Version : $Revision$ Chris@16: // Chris@16: // Description : generic custom parameter generator Chris@16: // *************************************************************************** Chris@16: Chris@16: #ifndef BOOST_RT_CLA_BASIC_PARAMETER_HPP_062604GER Chris@16: #define BOOST_RT_CLA_BASIC_PARAMETER_HPP_062604GER Chris@16: Chris@16: // Boost.Runtime.Parameter Chris@16: #include Chris@16: Chris@16: #include Chris@16: Chris@16: // Boost.Test Chris@16: #include Chris@16: Chris@16: // Boost Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: Chris@16: namespace BOOST_RT_PARAM_NAMESPACE { Chris@16: Chris@16: namespace cla { Chris@16: Chris@16: // ************************************************************************** // Chris@16: // ************** runtime::cla::basic_parameter ************** // Chris@16: // ************************************************************************** // Chris@16: Chris@16: template Chris@16: class basic_parameter : private base_from_member, public typed_parameter { Chris@16: public: Chris@16: // Constructors Chris@16: explicit basic_parameter( cstring n ) Chris@16: : base_from_member() Chris@16: , typed_parameter( base_from_member::member ) Chris@16: { Chris@16: this->accept_modifier( name = n ); Chris@16: } Chris@16: Chris@16: // parameter properties modification Chris@16: template Chris@16: void accept_modifier( Modifier const& m ) Chris@16: { Chris@16: typed_parameter::accept_modifier( m ); Chris@16: Chris@16: base_from_member::member.accept_modifier( m ); Chris@16: } Chris@16: }; Chris@16: Chris@16: //____________________________________________________________________________// Chris@16: Chris@16: #define BOOST_RT_CLA_NAMED_PARAM_GENERATORS( param_type ) \ Chris@16: template \ Chris@16: inline shared_ptr > \ Chris@16: param_type( cstring name = cstring() ) \ Chris@16: { \ Chris@16: return shared_ptr >( new param_type ## _t( name ) ); \ Chris@16: } \ Chris@16: \ Chris@16: inline shared_ptr > \ Chris@16: param_type( cstring name = cstring() ) \ Chris@16: { \ Chris@16: return shared_ptr >( new param_type ## _t( name ) ); \ Chris@16: } \ Chris@16: /**/ Chris@16: Chris@16: //____________________________________________________________________________// Chris@16: Chris@16: } // namespace cla Chris@16: Chris@16: } // namespace BOOST_RT_PARAM_NAMESPACE Chris@16: Chris@16: } // namespace boost Chris@16: Chris@16: #endif // BOOST_RT_CLA_BASIC_PARAMETER_HPP_062604GER