blob: 011cfbe8037cca2acf88d828e1c4063349ffc80e [file] [log] [blame]
Jeff Thompsonef2d5a42013-08-22 19:09:24 -07001// (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
Jeff Thompson3d613fd2013-10-15 15:39:04 -070015#ifndef NDNBOOST_RT_CLA_VALIDATION_HPP_062604GER
16#define NDNBOOST_RT_CLA_VALIDATION_HPP_062604GER
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070017
18// Boost.Runtime.Parameter
19#include <ndnboost/test/utils/runtime/config.hpp>
20
21#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
22
23namespace ndnboost {
24
Jeff Thompson3d613fd2013-10-15 15:39:04 -070025namespace NDNBOOST_RT_PARAM_NAMESPACE {
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070026
27namespace cla {
28
29// ************************************************************************** //
30// ************** runtime::cla::report_input_error ************** //
31// ************************************************************************** //
32
33void report_input_error( argv_traverser const& tr, format_stream& msg );
34
35//____________________________________________________________________________//
36
Jeff Thompson3d613fd2013-10-15 15:39:04 -070037#define NDNBOOST_RT_CLA_VALIDATE_INPUT( b, tr, msg ) \
38 if( b ) ; else ::ndnboost::NDNBOOST_RT_PARAM_NAMESPACE::cla::report_input_error( tr, format_stream().ref() << msg )
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070039
40//____________________________________________________________________________//
41
42} // namespace cla
43
Jeff Thompson3d613fd2013-10-15 15:39:04 -070044} // namespace NDNBOOST_RT_PARAM_NAMESPACE
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070045
46} // namespace ndnboost
47
Jeff Thompson3d613fd2013-10-15 15:39:04 -070048#ifndef NDNBOOST_RT_PARAM_OFFLINE
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070049
Jeff Thompson3d613fd2013-10-15 15:39:04 -070050# define NDNBOOST_RT_PARAM_INLINE inline
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070051# include <ndnboost/test/utils/runtime/cla/validation.ipp>
52
53#endif
54
Jeff Thompson3d613fd2013-10-15 15:39:04 -070055#endif // NDNBOOST_RT_CLA_VALIDATION_HPP_062604GER