Chris@16
|
1 // (C) Copyright Gennadiy Rozental 2005-2008.
|
Chris@16
|
2 // Use, modification, and distribution are subject to the
|
Chris@16
|
3 // Boost Software License, Version 1.0. (See accompanying file
|
Chris@16
|
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
5
|
Chris@16
|
6 // See http://www.boost.org/libs/test for the library home page.
|
Chris@16
|
7 //
|
Chris@16
|
8 // File : $RCSfile$
|
Chris@16
|
9 //
|
Chris@101
|
10 // Version : $Revision$
|
Chris@16
|
11 //
|
Chris@16
|
12 // Description : input validation helpers definition
|
Chris@16
|
13 // ***************************************************************************
|
Chris@16
|
14
|
Chris@16
|
15 #ifndef BOOST_RT_CLA_VALIDATION_HPP_062604GER
|
Chris@16
|
16 #define BOOST_RT_CLA_VALIDATION_HPP_062604GER
|
Chris@16
|
17
|
Chris@16
|
18 // Boost.Runtime.Parameter
|
Chris@16
|
19 #include <boost/test/utils/runtime/config.hpp>
|
Chris@16
|
20
|
Chris@16
|
21 #include <boost/test/utils/runtime/cla/fwd.hpp>
|
Chris@16
|
22
|
Chris@16
|
23 namespace boost {
|
Chris@16
|
24
|
Chris@16
|
25 namespace BOOST_RT_PARAM_NAMESPACE {
|
Chris@16
|
26
|
Chris@16
|
27 namespace cla {
|
Chris@16
|
28
|
Chris@16
|
29 // ************************************************************************** //
|
Chris@16
|
30 // ************** runtime::cla::report_input_error ************** //
|
Chris@16
|
31 // ************************************************************************** //
|
Chris@16
|
32
|
Chris@16
|
33 void report_input_error( argv_traverser const& tr, format_stream& msg );
|
Chris@16
|
34
|
Chris@16
|
35 //____________________________________________________________________________//
|
Chris@16
|
36
|
Chris@16
|
37 #define BOOST_RT_CLA_VALIDATE_INPUT( b, tr, msg ) \
|
Chris@16
|
38 if( b ) ; else ::boost::BOOST_RT_PARAM_NAMESPACE::cla::report_input_error( tr, format_stream().ref() << msg )
|
Chris@16
|
39
|
Chris@16
|
40 //____________________________________________________________________________//
|
Chris@16
|
41
|
Chris@16
|
42 } // namespace cla
|
Chris@16
|
43
|
Chris@16
|
44 } // namespace BOOST_RT_PARAM_NAMESPACE
|
Chris@16
|
45
|
Chris@16
|
46 } // namespace boost
|
Chris@16
|
47
|
Chris@16
|
48 #ifndef BOOST_RT_PARAM_OFFLINE
|
Chris@16
|
49
|
Chris@16
|
50 # define BOOST_RT_PARAM_INLINE inline
|
Chris@16
|
51 # include <boost/test/utils/runtime/cla/validation.ipp>
|
Chris@16
|
52
|
Chris@16
|
53 #endif
|
Chris@16
|
54
|
Chris@16
|
55 #endif // BOOST_RT_CLA_VALIDATION_HPP_062604GER
|