Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# Ogre::AnyNumeric Class Reference

Specialised Any class which has built in arithmetic operators, but can hold only types which support operator +,-,* and / . More...

`#include <OgreAny.h>`

Inheritance diagram for Ogre::AnyNumeric:

[legend]
List of all members.

## Public Member Functions
| AnyNumeric ()
template<typename ValueType>
| AnyNumeric (const ValueType &value)
| AnyNumeric (const AnyNumeric &other)
AnyNumeric & | operator= (const AnyNumeric &rhs)
AnyNumeric | operator+ (const AnyNumeric &rhs) const
AnyNumeric | operator- (const AnyNumeric &rhs) const
AnyNumeric | operator * (const AnyNumeric &rhs) const
AnyNumeric | operator * (Real factor) const
AnyNumeric | operator/ (const AnyNumeric &rhs) const
AnyNumeric & | operator+= (const AnyNumeric &rhs)
AnyNumeric & | operator-= (const AnyNumeric &rhs)
AnyNumeric & | operator *= (const AnyNumeric &rhs)
AnyNumeric & | operator/= (const AnyNumeric &rhs)
Any & | swap (Any &rhs)
bool | isEmpty () const
const std::type_info & | getType () const
template<typename ValueType>
ValueType | operator() () const
## Protected Member Functions
| AnyNumeric (placeholder *pholder)
| Construct from holder.
## Protected Attributes
placeholder * | mContent
## Friends
std::ostream & | operator<< (std::ostream &o, const Any &v)
template<typename ValueType>
ValueType * | any_cast (Any *)
## Classes
class | numholder
class | numplaceholder

## Detailed Description

Specialised Any class which has built in arithmetic operators, but can hold only types which support operator +,-,* and / .

Definition at line 215 of file OgreAny.h.

## Constructor & Destructor Documentation

Ogre::AnyNumeric::AnyNumeric | ( |  | ) |

| Definition at line 218 of file OgreAny.h. Referenced by operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), and operator=().

template<typename ValueType>
Ogre::AnyNumeric::AnyNumeric | ( | const ValueType & | value | ) |

| Definition at line 224 of file OgreAny.h.

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

| Definition at line 230 of file OgreAny.h. References Ogre::Any::placeholder::clone().

Ogre::AnyNumeric::AnyNumeric | ( | placeholder * | pholder | ) | `[protected]`

| Construct from holder. Definition at line 304 of file OgreAny.h.

## Member Function Documentation

const std::type_info& Ogre::Any::getType | ( | void |  | ) | const`[inherited]`

| Definition at line 104 of file OgreAny.h. References Ogre::Any::placeholder::getType(), and Ogre::Any::mContent. Referenced by Ogre::any_cast(), and Ogre::Any::operator()().

bool Ogre::Any::isEmpty | ( |  | ) | const`[inherited]`

| Definition at line 99 of file OgreAny.h. References Ogre::Any::mContent.

AnyNumeric Ogre::AnyNumeric::operator * | ( | Real | factor | ) | const

| Definition at line 330 of file OgreAny.h. References AnyNumeric().

AnyNumeric Ogre::AnyNumeric::operator * | ( | const AnyNumeric & | rhs | ) | const

| Definition at line 325 of file OgreAny.h. References AnyNumeric().

AnyNumeric& Ogre::AnyNumeric::operator *= | ( | const AnyNumeric & | rhs | ) |

| Definition at line 352 of file OgreAny.h. References AnyNumeric().

template<typename ValueType>
ValueType Ogre::Any::operator() | ( |  | ) | const`[inherited]`

| Definition at line 184 of file OgreAny.h. References Ogre::Any::getType(), Ogre::Any::mContent, and OGRE_EXCEPT.

AnyNumeric Ogre::AnyNumeric::operator+ | ( | const AnyNumeric & | rhs | ) | const

| Definition at line 315 of file OgreAny.h. References AnyNumeric().

AnyNumeric& Ogre::AnyNumeric::operator+= | ( | const AnyNumeric & | rhs | ) |

| Definition at line 340 of file OgreAny.h. References AnyNumeric().

AnyNumeric Ogre::AnyNumeric::operator- | ( | const AnyNumeric & | rhs | ) | const

| Definition at line 320 of file OgreAny.h. References AnyNumeric().

AnyNumeric& Ogre::AnyNumeric::operator-= | ( | const AnyNumeric & | rhs | ) |

| Definition at line 346 of file OgreAny.h. References AnyNumeric().

AnyNumeric Ogre::AnyNumeric::operator/ | ( | const AnyNumeric & | rhs | ) | const

| Definition at line 335 of file OgreAny.h. References AnyNumeric().

AnyNumeric& Ogre::AnyNumeric::operator/= | ( | const AnyNumeric & | rhs | ) |

| Definition at line 358 of file OgreAny.h. References AnyNumeric().

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

| Definition at line 310 of file OgreAny.h. References AnyNumeric(), and Ogre::Any::swap().

Any& Ogre::Any::swap | ( | Any & | rhs | ) | `[inherited]`

| Definition at line 78 of file OgreAny.h. References Ogre::Any::mContent. Referenced by operator=(), and Ogre::Any::operator=().

## Friends And Related Function Documentation

template<typename ValueType>
ValueType* any_cast | ( | Any * | operand | ) | `[friend, inherited]`

| Definition at line 372 of file OgreAny.h.

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

| Definition at line 110 of file OgreAny.h.

## Member Data Documentation

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

| Definition at line 175 of file OgreAny.h. Referenced by Ogre::Any::Any(), Ogre::Any::getType(), Ogre::Any::isEmpty(), Ogre::Any::operator()(), Ogre::Any::swap(), and Ogre::Any::~Any().

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

- OgreAny.h

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Thu Mar 6 09:46:31 2008