Ogre::AnyNumeric Class Reference
Core » General

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]

## Classes

class | numholder
class | numplaceholder

## Public Member Functions

| AnyNumeric ()
template<typename ValueType >
| AnyNumeric (const ValueType &value)
| AnyNumeric (const AnyNumeric &other)
void | destroy ()
template<typename ValueType >
ValueType | get (void) const
const std::type_info & | getType () const
bool | isEmpty () const
template<typename ValueType >
ValueType | operator() () const
AnyNumeric | operator* (const AnyNumeric &rhs) const
AnyNumeric | operator* (Real factor) const
AnyNumeric & | operator*= (const AnyNumeric &rhs)
AnyNumeric | operator+ (const AnyNumeric &rhs) const
AnyNumeric & | operator+= (const AnyNumeric &rhs)
AnyNumeric | operator- (const AnyNumeric &rhs) const
AnyNumeric & | operator-= (const AnyNumeric &rhs)
AnyNumeric | operator/ (const AnyNumeric &rhs) const
AnyNumeric & | operator/= (const AnyNumeric &rhs)
AnyNumeric & | operator= (const AnyNumeric &rhs)
Any & | swap (Any &rhs)

## Protected Member Functions

| AnyNumeric (placeholder *pholder)
| Construct from holder. More...

## Protected Attributes

placeholder * | mContent

## Detailed Description

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

Definition at line 247 of file OgreAny.h.

## Constructor & Destructor Documentation

## AnyNumeric() [1/4]

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

Definition at line 250 of file OgreAny.h.

## AnyNumeric() [2/4]

template<typename ValueType >

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

Definition at line 256 of file OgreAny.h.

References Ogre::Any::mContent, Ogre::MEMCATEGORY_GENERAL, and OGRE_NEW_T.

## AnyNumeric() [3/4]

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

Definition at line 262 of file OgreAny.h.

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

## AnyNumeric() [4/4]

Ogre::AnyNumeric::AnyNumeric | ( | placeholder * | pholder | ) |

protected

Construct from holder.

Definition at line 337 of file OgreAny.h.

References Ogre::Any::mContent.

## Member Function Documentation

## destroy()

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

inherited

Definition at line 122 of file OgreAny.h.

References Ogre::Any::mContent, Ogre::MEMCATEGORY_GENERAL, and OGRE_DELETE_T.

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

## get()

template<typename ValueType >

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

inherited

Definition at line 218 of file OgreAny.h.

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

## getType()

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

inherited

Definition at line 109 of file OgreAny.h.

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

Referenced by Ogre::any_cast().

## isEmpty()

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

inherited

Definition at line 104 of file OgreAny.h.

References Ogre::Any::mContent.

## operator()()

template<typename ValueType >

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

inherited

Definition at line 194 of file OgreAny.h.

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

## operator*() [1/2]

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

Definition at line 358 of file OgreAny.h.

References Ogre::Any::mContent.

## operator*() [2/2]

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

Definition at line 363 of file OgreAny.h.

References Ogre::Any::mContent.

## operator*=()

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

Definition at line 385 of file OgreAny.h.

References Ogre::Any::mContent.

## operator+()

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

Definition at line 348 of file OgreAny.h.

References Ogre::Any::mContent.

## operator+=()

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

Definition at line 373 of file OgreAny.h.

References Ogre::Any::mContent.

## operator-()

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

Definition at line 353 of file OgreAny.h.

References Ogre::Any::mContent.

## operator-=()

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

Definition at line 379 of file OgreAny.h.

References Ogre::Any::mContent.

## operator/()

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

Definition at line 368 of file OgreAny.h.

References Ogre::Any::mContent.

## operator/=()

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

Definition at line 391 of file OgreAny.h.

References Ogre::Any::mContent.

## operator=()

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

Definition at line 343 of file OgreAny.h.

References Ogre::Any::swap().

## swap()

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

inherited

Definition at line 83 of file OgreAny.h.

References Ogre::Any::mContent, and std::swap().

Referenced by operator=().

## Member Data Documentation

## mContent

placeholder* Ogre::Any::mContent

protected inherited

Definition at line 185 of file OgreAny.h.

Referenced by Ogre::any_cast(), AnyNumeric(), Ogre::Any::destroy(), Ogre::Any::get(), Ogre::Any::getType(), Ogre::Any::isEmpty(), Ogre::Any::operator()(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), and Ogre::Any::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.