7 #ifndef OBJECT_ID_BASE_HPP_ 8 #define OBJECT_ID_BASE_HPP_ 10 #include "boost/cstdint.hpp" 13 template<
class Id>
class Id_iterator;
18 template<
class Super,
class Val = boost::u
int_least32_t>
class Base_id {
24 typedef Val value_type;
25 explicit Base_id(
const value_type val) : val_(val) {}
26 Base_id(Super
const& s) : val_(s.val_) {}
27 bool operator==(
const Super& t)
const {
return val_ == t.val_;}
28 bool operator<(
const Super& t)
const {
return val_< t.val_;}
29 bool operator<=(
const Super& t)
const {
return val_<= t.val_;}
30 bool operator>(
const Super& t)
const {
return val_ > t.val_;}
31 bool operator>=(
const Super& t)
const {
return val_ >= t.val_;}
32 bool operator!=(
const Super& t)
const {
return val_ != t.val_;}
33 value_type operator()()
const {
return val_;}
35 typedef value_type self_type::*unspecified_bool_type;
38 operator unspecified_bool_type()
const {
return val_ == 0 ? 0 : &self_type::val_;}
45 template<
class ChT,
class Tr,
class S,
class V>
inline 46 std::basic_ostream<ChT,Tr>& operator<<(
47 std::basic_ostream<ChT,Tr>& os,
55 template<
class S,
class V>
inline std::size_t hash_value(
Base_id<S,V> const&
id) {
62 #define VDJ_PIPE_OBJECT_ID(name) \ 63 struct name : public ::vdj_pipe::detail::Base_id<name> { \ 64 explicit name(const value_type x) : base(x) {} \ Definition: object_id_base.hpp:18
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
Definition: id_iterator.hpp:16