Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame^] | 1 | // (C) Copyright Gennadiy Rozental 2005-2008. |
| 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: 49312 $ |
| 11 | // |
| 12 | // Description : input validation helpers definition |
| 13 | // *************************************************************************** |
| 14 | |
| 15 | #ifndef BOOST_RT_CLA_VALIDATION_HPP_062604GER |
| 16 | #define BOOST_RT_CLA_VALIDATION_HPP_062604GER |
| 17 | |
| 18 | // Boost.Runtime.Parameter |
| 19 | #include <ndnboost/test/utils/runtime/config.hpp> |
| 20 | |
| 21 | #include <ndnboost/test/utils/runtime/cla/fwd.hpp> |
| 22 | |
| 23 | namespace ndnboost { |
| 24 | |
| 25 | namespace BOOST_RT_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_RT_CLA_VALIDATE_INPUT( b, tr, msg ) \ |
| 38 | if( b ) ; else ::ndnboost::BOOST_RT_PARAM_NAMESPACE::cla::report_input_error( tr, format_stream().ref() << msg ) |
| 39 | |
| 40 | //____________________________________________________________________________// |
| 41 | |
| 42 | } // namespace cla |
| 43 | |
| 44 | } // namespace BOOST_RT_PARAM_NAMESPACE |
| 45 | |
| 46 | } // namespace ndnboost |
| 47 | |
| 48 | #ifndef BOOST_RT_PARAM_OFFLINE |
| 49 | |
| 50 | # define BOOST_RT_PARAM_INLINE inline |
| 51 | # include <ndnboost/test/utils/runtime/cla/validation.ipp> |
| 52 | |
| 53 | #endif |
| 54 | |
| 55 | #endif // BOOST_RT_CLA_VALIDATION_HPP_062604GER |