toast::type_info Class Reference
[toast miscellaneous utilities]

#include <toast/typeinfo.hpp>

List of all members.


Detailed Description

provides a 'portable' layer to std::type_info.

The standard specifies the methods that std::type_info should have, but it doesn't require the names or order implied by 'before' to be consistent across platforms. This class is an attempt at a more portable type_info.

It's actually impossible to provide portable type info, since a platform isn't required to support it at all. However, we have made this consistent between three platforms that do support it. This was tremendously important for our persistence library (which may eventually get added to toast).

To get a type_info call toast::type_id.

Public Member Functions

bool operator== (type_info const &rhs) const
bool operator!= (type_info const &rhs) const
bool before (type_info const &rhs) const
std::string const & name () const

Friends

template<typename T>
type_info const & type_id ()
 get a toast::typeinfo for type T.
template<typename T>
type_info const & type_id (T const &t)
 get a toast::typeinfo for object t (not necessarily T).


The documentation for this class was generated from the following files:

SourceForge.net Logo