User Manual, Developers Guide and API Documentation

wns::TypeInfo Class Reference

A wrapper around type_info. More...

#include <TypeInfo.hpp>

Inheritance diagram for wns::TypeInfo:

Inheritance graph
[legend]
Collaboration diagram for wns::TypeInfo:

Collaboration graph
[legend]

List of all members.

Public Member Functions

TypeInfooperator= (const TypeInfo &other)
 Assignment operator (due to dynamic members).
 TypeInfo (const TypeInfo &other)
 Copy c'tor (due to dynamic members).
 TypeInfo (const std::type_info &type)
 Constructor, but consider to use the more convinient TypeInfo::create() methods.
type_info interface
bool before (const TypeInfo &other) const
 Forward the before() method of type_info.
const char * name () const
 returns the mangled C++ name of the type
Operators
bool operator!= (const TypeInfo &other) const
bool operator< (const TypeInfo &other) const
bool operator<= (const TypeInfo &other) const
bool operator== (const TypeInfo &other) const
bool operator> (const TypeInfo &other) const
bool operator>= (const TypeInfo &other) const

Static Public Member Functions

Creation of TypeInfo
template<typename T>
static TypeInfo create (const T &t)
 Type creation from objects: TypeInfo::create(foo).
template<typename T>
static TypeInfo create ()
 Type creation from type (in templates): TypeInfo::create<Foo>().

Private Member Functions

virtual std::string doToString () const
 Returns the demangled C++ name of the class.
 TypeInfo ()
 Private default c'tor, may not be used ...

Private Attributes

const std::type_info * type_
 Keeps the pointer to the original type_info.


Detailed Description

Author:
Marc Schinnenburg <marc@schinnenburg.com>
This class provides "object-oriented" access to C++ RTTI.

Definition at line 52 of file TypeInfo.hpp.


Constructor & Destructor Documentation

wns::TypeInfo::TypeInfo ( const std::type_info &  type  )  [inline, explicit]

Definition at line 61 of file TypeInfo.hpp.

wns::TypeInfo::TypeInfo ( const TypeInfo other  )  [inline]

Definition at line 69 of file TypeInfo.hpp.

wns::TypeInfo::TypeInfo (  )  [private]


Member Function Documentation

bool wns::TypeInfo::before ( const TypeInfo other  )  const [inline]

Definition at line 96 of file TypeInfo.hpp.

template<typename T>
static TypeInfo wns::TypeInfo::create ( const T &  t  )  [inline, static]

Definition at line 177 of file TypeInfo.hpp.

template<typename T>
static TypeInfo wns::TypeInfo::create (  )  [inline, static]

Definition at line 166 of file TypeInfo.hpp.

virtual std::string wns::TypeInfo::doToString (  )  const [inline, private, virtual]

Implements wns::IOutputStreamable.

Definition at line 188 of file TypeInfo.hpp.

const char* wns::TypeInfo::name (  )  const [inline]

Note:
If you want a human readable string you should use TypeInfo::toString(), which returns the demangled name.

Definition at line 108 of file TypeInfo.hpp.

bool wns::TypeInfo::operator!= ( const TypeInfo other  )  const [inline]

Definition at line 125 of file TypeInfo.hpp.

bool wns::TypeInfo::operator< ( const TypeInfo other  )  const [inline]

Definition at line 131 of file TypeInfo.hpp.

bool wns::TypeInfo::operator<= ( const TypeInfo other  )  const [inline]

Definition at line 137 of file TypeInfo.hpp.

TypeInfo& wns::TypeInfo::operator= ( const TypeInfo other  )  [inline]

Definition at line 79 of file TypeInfo.hpp.

bool wns::TypeInfo::operator== ( const TypeInfo other  )  const [inline]

Definition at line 119 of file TypeInfo.hpp.

bool wns::TypeInfo::operator> ( const TypeInfo other  )  const [inline]

Definition at line 143 of file TypeInfo.hpp.

bool wns::TypeInfo::operator>= ( const TypeInfo other  )  const [inline]

Definition at line 149 of file TypeInfo.hpp.


Member Data Documentation

const std::type_info* wns::TypeInfo::type_ [private]

Definition at line 196 of file TypeInfo.hpp.


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

Generated on Sat May 26 03:32:51 2012 for openWNS by  doxygen 1.5.5