50#ifndef DRACO_CORE_DRACO_INDEX_TYPE_H_
51#define DRACO_CORE_DRACO_INDEX_TYPE_H_
59#define DEFINE_NEW_DRACO_INDEX_TYPE(value_type, name) \
60 struct name##_tag_type_ {}; \
61 typedef IndexType<value_type, name##_tag_type_> name;
63template <
class ValueTypeT,
class TagT>
72 constexpr ValueTypeT
value()
const {
return value_; }
75 return value_ == i.value_;
81 return value_ != i.value_;
87 return value_ < i.value_;
89 constexpr bool operator<(
const ValueTypeT &val)
const {
return value_ < val; }
91 return value_ > i.value_;
93 constexpr bool operator>(
const ValueTypeT &val)
const {
return value_ > val; }
95 return value_ >= i.value_;
164template <
class ValueTypeT,
class TagT>
166 return os << index.
value();
174template <
class ValueTypeT,
class TagT>
175struct hash<
draco::IndexType<ValueTypeT, TagT>> {
177 return static_cast<size_t>(i.
value());
Definition draco_index_type.h:64
constexpr bool operator<(const IndexType &i) const
Definition draco_index_type.h:86
ValueTypeT ValueType
Definition draco_index_type.h:67
constexpr ValueTypeT value() const
Definition draco_index_type.h:72
ThisIndexType & operator+=(const IndexType &i)
Definition draco_index_type.h:134
ThisIndexType & operator-=(const IndexType &i)
Definition draco_index_type.h:142
ThisIndexType operator+=(const ValueTypeT &val)
Definition draco_index_type.h:138
constexpr ThisIndexType operator+(const ValueTypeT &val) const
Definition draco_index_type.h:124
ThisIndexType & operator=(const ValueTypeT &val)
Definition draco_index_type.h:154
ThisIndexType operator++(int)
Definition draco_index_type.h:105
IndexType< ValueTypeT, TagT > ThisIndexType
Definition draco_index_type.h:66
constexpr ThisIndexType operator+(const IndexType &i) const
Definition draco_index_type.h:121
ThisIndexType & operator=(const ThisIndexType &i)
Definition draco_index_type.h:150
ThisIndexType & operator++()
Definition draco_index_type.h:101
constexpr bool operator>(const IndexType &i) const
Definition draco_index_type.h:90
constexpr bool operator>=(const ValueTypeT &val) const
Definition draco_index_type.h:97
constexpr ThisIndexType operator-(const IndexType &i) const
Definition draco_index_type.h:127
constexpr bool operator>=(const IndexType &i) const
Definition draco_index_type.h:94
constexpr bool operator>(const ValueTypeT &val) const
Definition draco_index_type.h:93
ThisIndexType operator-=(const ValueTypeT &val)
Definition draco_index_type.h:146
constexpr bool operator==(const ValueTypeT &val) const
Definition draco_index_type.h:77
constexpr IndexType()
Definition draco_index_type.h:69
constexpr bool operator!=(const ValueTypeT &val) const
Definition draco_index_type.h:83
constexpr IndexType(ValueTypeT value)
Definition draco_index_type.h:70
ThisIndexType & operator--()
Definition draco_index_type.h:111
constexpr bool operator==(const IndexType &i) const
Definition draco_index_type.h:74
constexpr bool operator<(const ValueTypeT &val) const
Definition draco_index_type.h:89
ThisIndexType operator--(int)
Definition draco_index_type.h:115
constexpr bool operator!=(const IndexType &i) const
Definition draco_index_type.h:80
constexpr ThisIndexType operator-(const ValueTypeT &val) const
Definition draco_index_type.h:130
ret($return)
Definition mesh_login_result.php:5
Definition attribute_octahedron_transform.cc:21
std::ostream & operator<<(std::ostream &os, IndexType< ValueTypeT, TagT > index)
Definition draco_index_type.h:165
size_t operator()(const draco::IndexType< ValueTypeT, TagT > &i) const
Definition draco_index_type.h:176