~ubuntu-branches/ubuntu/wily/bombono-dvd/wily

« back to all changes in this revision

Viewing changes to libs/boost-lib/boost/test/utils/runtime/cla/iface/id_policy.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-11-04 11:46:25 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20101104114625-8xfdhvhpsm51i0nu
Tags: upstream-0.8.0
ImportĀ upstreamĀ versionĀ 0.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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: 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 <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
 
 
27
namespace boost {
 
28
 
 
29
namespace BOOST_RT_PARAM_NAMESPACE {
 
30
 
 
31
namespace cla {
 
32
 
 
33
// ************************************************************************** //
 
34
// **************             identification_policy            ************** //
 
35
// ************************************************************************** //
 
36
 
 
37
#ifdef BOOST_MSVC
 
38
#  pragma warning(push)
 
39
#  pragma warning(disable:4244)
 
40
#endif
 
41
 
 
42
class identification_policy {
 
43
public:
 
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
 
 
55
protected:
 
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 boost
 
72
 
 
73
#endif // BOOST_RT_CLA_IFACE_ID_POLICY_HPP_062604GER