#include <type_id.hpp>
Inheritance diagram for TypeID:

Public Types | |
| typedef TypeID< T, V > | self_type |
Public Member Functions | |
| TypeID (self_type const &src) | |
| ~TypeID () | |
| The destructor for this class is intentionally non-virtual. | |
| operator V () const | |
| Implicit conversion to value type. | |
| bool | operator== (self_type const &rhs) const |
| bool | operator!= (self_type const &rhs) const |
| bool | operator< (self_type const &rhs) const |
| bool | operator<= (self_type const &rhs) const |
| bool | operator> (self_type const &rhs) const |
| bool | operator>= (self_type const &rhs) const |
| self_type & | operator= (self_type const &rhs) |
Protected Member Functions | |
| TypeID (V value) | |
| void | increment () |
| void | decrement () |
Friends | |
| std::ostream & | operator<< (std::ostream &os, self_type const &t) |
It is frequently a pain to define a new ID type for a given purpose, because a number of operators and constructors need to be written for each ID type. This class is a tool to speed up this process. Essentially, the author of a new ID type need only derive from this class, with the new ID type as the first template parameter.
| ~TypeID | ( | ) |
The destructor for this class is intentionally non-virtual.
TypeID is intended to be a lightweight class. Vtables are inappropriate.
| TypeID | ( | V | value | ) | [protected] |
| operator V | ( | ) | const |
Implicit conversion to value type.
| void increment | ( | ) | [protected] |
| void decrement | ( | ) | [protected] |
| std::ostream& operator<< | ( | std::ostream & | os, | |
| self_type const & | t | |||
| ) | [friend] |
1.5.1