# Ogre::Any Class Reference

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

`#include <OgreAny.h>`

Inheritance diagram for Ogre::Any:

[legend]

List of all members.

## Public Member Functions

| Any ()
template<typename ValueType>
| Any (const ValueType &value)
| Any (const Any &other)
virtual | ~Any ()
Any & | swap (Any &rhs)
template<typename ValueType>
Any & | operator= (const ValueType &rhs)
Any & | operator= (const Any &rhs)
bool | isEmpty () const
const std::type_info & | getType () const
template<typename ValueType>
ValueType | operator() () const

## Protected Attributes

placeholder * | mContent

## Friends

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

## Classes

class | holder
class | placeholder

## Detailed Description

Variant type that can hold Any other type.

Definition at line 51 of file OgreAny.h.

## Constructor & Destructor Documentation

Ogre::Any::Any | ( |  | ) |

Definition at line 55 of file OgreAny.h.

Referenced by operator=().

template<typename ValueType>

Ogre::Any::Any | ( | const ValueType & | value | ) | `[explicit]`

Definition at line 61 of file OgreAny.h.

Ogre::Any::Any | ( | const Any & | other | ) |

Definition at line 66 of file OgreAny.h.

virtual Ogre::Any::~Any | ( |  | ) | `[virtual]`

Definition at line 71 of file OgreAny.h.

References mContent, Ogre::MEMCATEGORY_GENERAL, and OGRE_DELETE_T.

## Member Function Documentation

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

Definition at line 78 of file OgreAny.h.

References mContent.

template<typename ValueType>

Any& Ogre::Any::operator= | ( | const ValueType & | rhs | ) |

Definition at line 85 of file OgreAny.h.

References Any().

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

Definition at line 91 of file OgreAny.h.

References Any().

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

Definition at line 99 of file OgreAny.h.

References mContent.

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

Definition at line 104 of file OgreAny.h.

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

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

template<typename ValueType>

ValueType Ogre::Any::operator() | ( |  | ) | const

Definition at line 184 of file OgreAny.h.

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

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | o,
|  | const Any & | v |
| ) |  |  | `[friend]`

Definition at line 110 of file OgreAny.h.

template<typename ValueType>

ValueType* any_cast | ( | Any * | operand | ) | `[friend]`

Definition at line 373 of file OgreAny.h.

## Member Data Documentation

placeholder* Ogre::Any::mContent `[protected]`

Definition at line 175 of file OgreAny.h.

Referenced by Ogre::any_cast(), Ogre::AnyNumeric::AnyNumeric(), getType(), isEmpty(), operator()(), Ogre::AnyNumeric::operator*(), Ogre::AnyNumeric::operator*=(), Ogre::AnyNumeric::operator+(), Ogre::AnyNumeric::operator+=(), Ogre::AnyNumeric::operator-(), Ogre::AnyNumeric::operator-=(), Ogre::AnyNumeric::operator/(), Ogre::AnyNumeric::operator/=(), swap(), and ~Any().

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

- OgreAny.h

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Dec 27 17:31:33 2009