Ogre::Any Class Reference
Core » General

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

`#include <OgreAny.h>`

Inheritance diagram for Ogre::Any:
[legend]

## 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 >
Any & | operator= (const ValueType &rhs)
Any & | operator= (const Any &rhs)
Any & | swap (Any &rhs)

## Protected Attributes

placeholder * | mContent

## 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 56 of file OgreAny.h.

## Constructor & Destructor Documentation

## Any() [1/3]

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

Definition at line 60 of file OgreAny.h.

Referenced by operator=().

## Any() [2/3]

template<typename ValueType >

Ogre::Any::Any | ( | const ValueType & | value | ) |

explicit

Definition at line 66 of file OgreAny.h.

## Any() [3/3]

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

Definition at line 71 of file OgreAny.h.

## ~Any()

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

virtual

Definition at line 76 of file OgreAny.h.

References destroy().

## Member Function Documentation

## destroy()

void Ogre::Any::destroy | ( |  | ) |

Definition at line 122 of file OgreAny.h.

References mContent, Ogre::MEMCATEGORY_GENERAL, and OGRE_DELETE_T.

Referenced by Ogre::WorkQueue::Response::abortRequest(), and ~Any().

## get()

template<typename ValueType >

ValueType Ogre::Any::get | ( | void |  | ) | const

Definition at line 218 of file OgreAny.h.

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

## getType()

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

Definition at line 109 of file OgreAny.h.

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

Referenced by Ogre::any_cast().

## isEmpty()

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

Definition at line 104 of file OgreAny.h.

References mContent.

## operator()()

template<typename ValueType >

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

Definition at line 194 of file OgreAny.h.

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

## operator=() [1/2]

template<typename ValueType >

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

Definition at line 90 of file OgreAny.h.

References Any().

## operator=() [2/2]

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

Definition at line 96 of file OgreAny.h.

References Any().

## swap()

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

Definition at line 83 of file OgreAny.h.

References mContent, and std::swap().

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

## Friends And Related Function Documentation

## any_cast

template<typename ValueType >

ValueType* any_cast | ( | Any * | operand | ) |

friend

Definition at line 405 of file OgreAny.h.

Referenced by Ogre::any_cast().

## operator<<

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

friend

Definition at line 115 of file OgreAny.h.

## Member Data Documentation

## mContent

placeholder* Ogre::Any::mContent

protected

Definition at line 185 of file OgreAny.h.

Referenced by Ogre::any_cast(), Ogre::AnyNumeric::AnyNumeric(), destroy(), get(), 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/=(), and swap().

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

- OgreAny.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.