summaryrefslogtreecommitdiff
path: root/contrib/utility/Utility/Introspection/TypeId.ipp
blob: 83a5a50351785a33bae035ed5b5f1ca2a8ebe6dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// file      : Utility/Introspection/TypeId.ipp
// author    : Boris Kolpackov <boris@kolpackov.net>
// copyright : Copyright (c) 2002-2003 Boris Kolpackov
// license   : http://kolpackov.net/license.html
// cvs-id    : $Id$

namespace Utility
{
  namespace Introspection
  {
    inline TypeId::
    TypeId (std::type_info const& tid)
        : tid_ (&tid)
    {
    }


    inline bool TypeId::
    operator == (TypeId const& other) const
    {
      return *tid_ == *other.tid_;
    }

    inline bool TypeId::
    operator != (TypeId const& other) const
    {
      return *tid_ != *other.tid_;
    }

    inline bool TypeId::
    operator < (TypeId const& other) const
    {
      return tid_->before (*other.tid_);
    }
  }
}
//$Id$