blob: 338f8d575b48590fa55e518710e7444200a5ad5f [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: 57992 $
11//
12// Description : defines interface for identification_policy
13// ***************************************************************************
14
15#ifndef BOOST_RT_CLA_IFACE_ID_POLICY_HPP_062604GER
16#define BOOST_RT_CLA_IFACE_ID_POLICY_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// Boost.Test
24#include <ndnboost/test/utils/class_properties.hpp>
25#include <ndnboost/test/utils/rtti.hpp>
26
27namespace ndnboost {
28
29namespace BOOST_RT_PARAM_NAMESPACE {
30
31namespace cla {
32
33// ************************************************************************** //
34// ************** identification_policy ************** //
35// ************************************************************************** //
36
37#ifdef BOOST_MSVC
38# pragma warning(push)
39# pragma warning(disable:4244)
40#endif
41
42class identification_policy {
43public:
44 // Public properties
45 unit_test::readwrite_property<rtti::id_t> p_type_id;
46
47 // Policy interface
48 virtual bool responds_to( cstring name ) const = 0;
49 virtual cstring id_2_report() const = 0;
50 virtual void usage_info( format_stream& fs ) const = 0;
51 virtual bool matching( parameter const& p, argv_traverser& tr, bool primary ) const = 0;
52
53 virtual bool conflict_with( identification_policy const& ) const = 0;
54
55protected:
56 // Constructor
57 explicit identification_policy( rtti::id_t dyn_type )
58 : p_type_id( dyn_type )
59 {}
60 BOOST_TEST_PROTECTED_VIRTUAL ~identification_policy() {}
61};
62
63#ifdef BOOST_MSVC
64# pragma warning(pop)
65#endif
66
67} // namespace cla
68
69} // namespace BOOST_RT_PARAM_NAMESPACE
70
71} // namespace ndnboost
72
73#endif // BOOST_RT_CLA_IFACE_ID_POLICY_HPP_062604GER