1 #ifndef FP_TYPE_INDEX_H 2 #define FP_TYPE_INDEX_H 5 #include <boost/operators.hpp> 20 class type_index :
public boost::totally_ordered<type_index> {
40 {
return std::strcmp(id->name(), other.id->name()) == 0;}
47 {
return std::strcmp(id->name(), other.id->name()) < 0;}
53 std::string
name()
const {
return id->name();}
55 std::type_info
const* id;
type_index(std::type_info const &id)
Constructor.
Dummy class to use as a nice default for type_index.
type_index()
Default constructor.
bool operator==(type_index const &other) const
Comparison operator.
bool operator<(type_index const &other) const
Comparison operator.
std::string name() const
Return type name.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
This is a wrapper around std::type_info that allows it to be used as an index in a associative contai...