Ogre::AnyNumeric Class Reference
[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:
Inheritance graph
[legend]

List of all members.

Classes

class  numholder
class  numplaceholder

Public Member Functions

 AnyNumeric ()
template<typename ValueType >
 AnyNumeric (const ValueType &value)
 AnyNumeric (const AnyNumeric &other)
AnyNumericoperator= (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
AnyNumericoperator+= (const AnyNumeric &rhs)
AnyNumericoperator-= (const AnyNumeric &rhs)
AnyNumericoperator*= (const AnyNumeric &rhs)
AnyNumericoperator/= (const AnyNumeric &rhs)
Anyswap (Any &rhs)
bool isEmpty () const
const std::type_info & getType () const
void destroy ()
template<typename ValueType >
ValueType operator() () const

Protected Member Functions

 AnyNumeric (placeholder *pholder)
 Construct from holder.

Protected Attributes

placeholdermContent

Friends

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

Detailed Description

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

Definition at line 225 of file OgreAny.h.


Constructor & Destructor Documentation

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

Definition at line 234 of file OgreAny.h.

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

Ogre::AnyNumeric::AnyNumeric ( const AnyNumeric other  ) 

Definition at line 240 of file OgreAny.h.

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

Ogre::AnyNumeric::AnyNumeric ( placeholder pholder  )  [protected]

Construct from holder.

Definition at line 315 of file OgreAny.h.

References Ogre::Any::mContent.


Member Function Documentation

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::Any::~Any().

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(), and Ogre::Any::operator()().

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

Definition at line 104 of file OgreAny.h.

References Ogre::Any::mContent.

template<typename ValueType >
ValueType Ogre::Any::operator() (  )  const [inherited]
AnyNumeric Ogre::AnyNumeric::operator* ( Real  factor  )  const

Definition at line 341 of file OgreAny.h.

References AnyNumeric(), and Ogre::Any::mContent.

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

Definition at line 336 of file OgreAny.h.

References AnyNumeric(), and Ogre::Any::mContent.

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

Definition at line 363 of file OgreAny.h.

References AnyNumeric(), and Ogre::Any::mContent.

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

Definition at line 326 of file OgreAny.h.

References AnyNumeric(), and Ogre::Any::mContent.

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

Definition at line 351 of file OgreAny.h.

References AnyNumeric(), and Ogre::Any::mContent.

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

Definition at line 331 of file OgreAny.h.

References AnyNumeric(), and Ogre::Any::mContent.

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

Definition at line 357 of file OgreAny.h.

References AnyNumeric(), and Ogre::Any::mContent.

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

Definition at line 346 of file OgreAny.h.

References AnyNumeric(), and Ogre::Any::mContent.

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

Definition at line 369 of file OgreAny.h.

References AnyNumeric(), and Ogre::Any::mContent.

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

Definition at line 321 of file OgreAny.h.

References AnyNumeric().

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

Definition at line 83 of file OgreAny.h.

References Ogre::Any::mContent.


Friends And Related Function Documentation

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

Definition at line 383 of file OgreAny.h.

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

Definition at line 115 of file OgreAny.h.


Member Data Documentation

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

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

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Fri May 25 23:37:07 2012