OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::Any Class Reference

Variant type that can hold Any other type. More...

#include <OgreAny.h>

+ Inheritance diagram for Ogre::Any:
+ Collaboration diagram for Ogre::Any:

Classes

class  holder
 
class  placeholder
 

Public Member Functions

 Any ()
 
template<typename ValueType >
 Any (const ValueType &value)
 
 Any (const Any &other)
 
virtual ~Any ()
 
void destroy ()
 
template<typename ValueType >
ValueType get (void) const
 
const std::type_info & getType () const
 
bool isEmpty () const
 
template<typename ValueType >
ValueType operator() () const
 
template<typename ValueType >
Anyoperator= (const ValueType &rhs)
 
Anyoperator= (const Any &rhs)
 
Anyswap (Any &rhs)
 

Protected Attributes

placeholdermContent
 

Friends

template<typename ValueType >
ValueType * any_cast (Any *)
 
std::ostream & operator<< (std::ostream &o, const Any &v)
 

Detailed Description

Variant type that can hold Any other type.

Definition at line 54 of file OgreAny.h.

Constructor & Destructor Documentation

Ogre::Any::Any ( )
inline

Definition at line 58 of file OgreAny.h.

Referenced by operator=().

template<typename ValueType >
Ogre::Any::Any ( const ValueType &  value)
inlineexplicit

Definition at line 64 of file OgreAny.h.

Ogre::Any::Any ( const Any other)
inline

Definition at line 69 of file OgreAny.h.

virtual Ogre::Any::~Any ( )
inlinevirtual

Definition at line 74 of file OgreAny.h.

References destroy().

Member Function Documentation

void Ogre::Any::destroy ( )
inline

Definition at line 120 of file OgreAny.h.

References mContent, Ogre::MEMCATEGORY_GENERAL, and OGRE_DELETE_T.

Referenced by ~Any().

template<typename ValueType >
ValueType Ogre::Any::get ( void  ) const
inline

Definition at line 216 of file OgreAny.h.

References Ogre::Exception::ERR_INVALIDPARAMS, getType(), mContent, and OGRE_EXCEPT.

const std::type_info& Ogre::Any::getType ( void  ) const
inline

Definition at line 107 of file OgreAny.h.

References Ogre::Any::placeholder::getType(), and mContent.

Referenced by Ogre::any_cast(), get(), and operator()().

bool Ogre::Any::isEmpty ( ) const
inline

Definition at line 102 of file OgreAny.h.

References mContent.

template<typename ValueType >
ValueType Ogre::Any::operator() ( ) const
inline

Definition at line 192 of file OgreAny.h.

References Ogre::Exception::ERR_INVALIDPARAMS, getType(), mContent, and OGRE_EXCEPT.

template<typename ValueType >
Any& Ogre::Any::operator= ( const ValueType &  rhs)
inline

Definition at line 88 of file OgreAny.h.

References Any().

Any& Ogre::Any::operator= ( const Any rhs)
inline

Definition at line 94 of file OgreAny.h.

References Any().

Any& Ogre::Any::swap ( Any rhs)
inline

Definition at line 81 of file OgreAny.h.

References mContent, and std::swap().

Friends And Related Function Documentation

template<typename ValueType >
ValueType* any_cast ( Any operand)
friend

Definition at line 403 of file OgreAny.h.

std::ostream& operator<< ( std::ostream &  o,
const Any v 
)
friend

Definition at line 113 of file OgreAny.h.

Member Data Documentation


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