64e07fd70978fb7ff2b014c4215b961e0d0d755e
[senf.git] / senf / Utils / parameter.hh
1 // $Id$
2 //
3 // Copyright (C) 2008
4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 //     Stefan Bund <g0dil@berlios.de>
7 //
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22
23 /** \file
24     \brief parameter public header */
25
26 /** \defgroup boost_parameter Boost.Parameter utilities
27
28     Here we define some utilities for the <a
29     href="http://www.boost.org/doc/libs/release/libs/parameter/doc/html/index.html">Boost.Parameter</a>
30     library.
31  */
32
33 #ifndef HH_SENF_Utils_parameter_
34 #define HH_SENF_Utils_parameter_ 1
35
36 // Custom includes
37 #include <boost/parameter/binding.hpp>
38 #include <boost/type_traits/is_same.hpp>
39 #include <boost/mpl/not.hpp>
40
41 //#include "parameter.mpp"
42 //-/////////////////////////////////////////////////////////////////////////////////////////////////
43
44 namespace senf {
45
46     ///\addtogroup boost_parameter
47     //\{
48
49     /** \brief Test \a ArgumentPack, whether the \a TagType argument was supplied
50
51         This check will test, whether the argument identified by the \a TagType keyword tag type was
52         specified in the \a ArgumentPack. This inherits from \c boost::mpl::true_ or \c
53         boost::mpl::false_ accordingly.
54
55         \tparam ArgumentPack argument pack to check
56         \tparam TagType keyword tag type identifying the argument to check
57      */
58     template <class ArgumentPack, class TagType>
59     struct has_parameter
60         : public boost::mpl::not_<
61               boost::is_same< typename boost::parameter::binding< ArgumentPack, TagType, void>::type,
62                                                                   void > >::type
63     {};
64
65     //\}
66 }
67
68 //-/////////////////////////////////////////////////////////////////////////////////////////////////
69 //#include "parameter.cci"
70 //#include "parameter.ct"
71 //#include "parameter.cti"
72 #endif
73
74 \f
75 // Local Variables:
76 // mode: c++
77 // fill-column: 100
78 // comment-column: 40
79 // c-file-style: "senf"
80 // indent-tabs-mode: nil
81 // ispell-local-dictionary: "american"
82 // compile-command: "scons -u test"
83 // End: