Store dependency refs directly in the registry.
[luabind.git] / luabind / typeid.hpp
blobf44d743bc57631f551d543daca2c54367262bfcc
1 // Copyright Daniel Wallin 2008. Use, modification and distribution is
2 // subject to the Boost Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef LUABIND_TYPEID_081227_HPP
6 # define LUABIND_TYPEID_081227_HPP
8 # include <boost/operators.hpp>
9 # include <typeinfo>
10 # include <luabind/detail/primitives.hpp>
12 namespace luabind {
14 class type_id
15 : public boost::less_than_comparable<type_id>
17 public:
18 type_id()
19 : id(&typeid(detail::null_type))
22 type_id(std::type_info const& id)
23 : id(&id)
26 bool operator!=(type_id const& other) const
28 return *id != *other.id;
31 bool operator==(type_id const& other) const
33 return *id == *other.id;
36 bool operator<(type_id const& other) const
38 return id->before(*other.id);
41 char const* name() const
43 return id->name();
46 private:
47 std::type_info const* id;
50 } // namespace luabind
52 #endif // LUABIND_TYPEID_081227_HPP