1
// (C) Copyright Gennadiy Rozental 2005-2008.
2
// Permission to copy, use, modify, sell and distribute this software
3
// is granted provided this copyright notice appears in all copies.
4
// This software is provided "as is" without express or implied warranty,
5
// and with no claim as to its suitability for any purpose.
7
// See http://www.boost.org for updates, documentation, and revision history.
11
// Version : $Revision: 54633 $
13
// Description : argument usage printing helpers
14
// ***************************************************************************
16
#ifndef BOOST_RT_CLA_ARGUMENT_VALUE_USAGE_HPP_062604GER
17
#define BOOST_RT_CLA_ARGUMENT_VALUE_USAGE_HPP_062604GER
19
// Boost.Runtime.Parameter
20
#include <boost/test/utils/runtime/config.hpp>
21
#include <boost/test/utils/runtime/cla/argv_traverser.hpp>
24
#include <boost/test/utils/basic_cstring/io.hpp>
25
#include <boost/test/utils/basic_cstring/compare.hpp>
27
#include <boost/lexical_cast.hpp>
30
// !! can we eliminate these includes?
35
namespace BOOST_RT_PARAM_NAMESPACE {
39
namespace rt_cla_detail {
41
// ************************************************************************** //
42
// ************** argument_value_usage ************** //
43
// ************************************************************************** //
48
argument_value_usage( format_stream& fs, long, T* = 0 )
50
fs << BOOST_RT_PARAM_CSTRING_LITERAL( "<value>" );
53
//____________________________________________________________________________//
55
// specialization for list of values
58
argument_value_usage( format_stream& fs, int, std::list<T>* = 0 )
60
fs << BOOST_RT_PARAM_CSTRING_LITERAL( "(<value1>, ..., <valueN>)" );
63
//____________________________________________________________________________//
65
// specialization for type bool
67
argument_value_usage( format_stream& fs, int, bool* = 0 )
69
fs << BOOST_RT_PARAM_CSTRING_LITERAL( "yes|y|no|n" );
72
//____________________________________________________________________________//
74
} // namespace rt_cla_detail
78
} // namespace BOOST_RT_PARAM_NAMESPACE
82
#endif // BOOST_RT_CLA_ARGUMENT_VALUE_USAGE_HPP_062604GER