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