OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::Any Class Reference

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

#include <OgreAny.h>

+ Inheritance diagram for Ogre::Any:

Public Member Functions

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

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.

Constructor & Destructor Documentation

◆ Any() [1/3]

Ogre::Any::Any ( )
inline

◆ Any() [2/3]

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

◆ Any() [3/3]

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

◆ ~Any()

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

Member Function Documentation

◆ destroy()

void Ogre::Any::destroy ( )
inline

◆ get()

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

◆ getType()

const std::type_info& Ogre::Any::getType ( ) const
inline
Deprecated:
use type() instead

◆ has_value()

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

◆ isEmpty()

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

◆ operator()()

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

◆ operator=() [1/2]

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

References swap().

◆ operator=() [2/2]

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

References swap().

◆ reset()

void Ogre::Any::reset ( )
inline

◆ swap()

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

References std::swap().

Referenced by Ogre::AnyNumeric::operator=(), and operator=().

◆ type()

const std::type_info& Ogre::Any::type ( ) const
inline

Referenced by Ogre::any_cast().

Friends And Related Function Documentation

◆ any_cast

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

◆ operator<<

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

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