source: NonGTP/Boost/boost/test/utils/runtime/cla/iface/id_policy.hpp @ 857

Revision 857, 2.3 KB checked in by igarcia, 18 years ago (diff)
Line 
1//  (C) Copyright Gennadiy Rozental 2005.
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: id_policy.hpp,v $
9//
10//  Version     : $Revision: 1.1 $
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 <boost/test/utils/runtime/config.hpp>
20
21#include <boost/test/utils/runtime/cla/fwd.hpp>
22
23// Boost.Test
24#include <boost/test/utils/class_properties.hpp>
25#include <boost/test/utils/rtti.hpp>
26
27namespace boost {
28
29namespace BOOST_RT_PARAM_NAMESPACE {
30
31namespace cla {
32
33// ************************************************************************** //
34// **************             identification_policy            ************** //
35// ************************************************************************** //
36
37class identification_policy {
38public:
39    // Public properties
40    unit_test::readwrite_property<rtti::id_t>    p_type_id;
41
42    // Policy interface
43    virtual bool    responds_to( cstring name ) const = 0;
44    virtual cstring id_2_report() const = 0;
45    virtual void    usage_info( format_stream& fs ) const = 0;
46    virtual bool    matching( parameter const& p, argv_traverser& tr, bool primary ) const = 0;
47
48    virtual bool    conflict_with( identification_policy const& ) const = 0;
49
50protected:
51    // Constructor
52    explicit        identification_policy( rtti::id_t const& dyn_type )
53    : p_type_id( dyn_type )
54    {}
55};
56
57} // namespace cla
58
59} // namespace BOOST_RT_PARAM_NAMESPACE
60
61} // namespace boost
62
63// ************************************************************************** //
64//   Revision History:
65//
66//   $Log: id_policy.hpp,v $
67//   Revision 1.1  2005/04/12 06:42:43  rogeeff
68//   Runtime.Param library initial commit
69//
70// ************************************************************************** //
71
72#endif // BOOST_RT_CLA_IFACE_ID_POLICY_HPP_062604GER
Note: See TracBrowser for help on using the repository browser.