# Ogre::MaterialPtr Class Reference
[Materials]

Specialisation of SharedPtr to allow SharedPtr to be assigned to MaterialPtr. More...

`#include <OgreMaterial.h>`

Inheritance diagram for Ogre::MaterialPtr:
[legend]

List of all members.

## Public Member Functions

| MaterialPtr ()
| MaterialPtr (Material *rep)
| MaterialPtr (const MaterialPtr &r)
| MaterialPtr (const ResourcePtr &r)
MaterialPtr & | operator= (const ResourcePtr &r)
| Operator used to convert a ResourcePtr to a MaterialPtr.
Material & | operator* () const
Material * | operator-> () const
Material * | get () const
void | bind (Material *rep, SharedPtrFreeMethod inFreeMethod=SPFM_DELETE)
| Binds rep to the SharedPtr.
bool | unique () const
unsigned int | useCount () const
unsigned int * | useCountPointer () const
Material * | getPointer () const
SharedPtrFreeMethod | freeMethod () const
bool | isNull (void) const
void | setNull (void)

## Protected Member Functions

void | release (void)
virtual void | destroy (void)
virtual void | swap (SharedPtr< Material > &other)

## Protected Attributes

Material * | pRep
unsigned int * | pUseCount
SharedPtrFreeMethod | useFreeMethod

## Detailed Description

Specialisation of SharedPtr to allow SharedPtr to be assigned to MaterialPtr.

Note:
  Has to be a subclass since we need operator=. We could templatise this instead of repeating per Resource subclass, except to do so requires a form VC6 does not support i.e. ResourceSubclassPtr<T> : public SharedPtr<T>

Definition at line 677 of file OgreMaterial.h.

## Constructor & Destructor Documentation

Ogre::MaterialPtr::MaterialPtr | ( |  | ) |

Definition at line 680 of file OgreMaterial.h.

Ogre::MaterialPtr::MaterialPtr | ( | Material * | rep | ) | `[explicit]`

Definition at line 681 of file OgreMaterial.h.

Ogre::MaterialPtr::MaterialPtr | ( | const MaterialPtr & | r | ) |

Definition at line 682 of file OgreMaterial.h.

Ogre::MaterialPtr::MaterialPtr | ( | const ResourcePtr & | r | ) |

Definition at line 683 of file OgreMaterial.h.

References Ogre::SharedPtr< T >::getPointer(), OGRE_COPY_AUTO_SHARED_MUTEX, OGRE_LOCK_MUTEX, OGRE_MUTEX_CONDITIONAL, and Ogre::SharedPtr< T >::useCountPointer().

## Member Function Documentation

void Ogre::SharedPtr< Material >::bind | ( | Material * | rep,
|  | SharedPtrFreeMethod | inFreeMethod = `SPFM_DELETE` |
| ) |  |  | `[inherited]`

Binds rep to the SharedPtr.

Remarks:
  Assumes that the SharedPtr is uninitialised!

Definition at line 167 of file OgreSharedPtr.h.

virtual void Ogre::SharedPtr< Material >::destroy | ( | void |  | ) | `[protected, virtual, inherited]`

Definition at line 223 of file OgreSharedPtr.h.

SharedPtrFreeMethod Ogre::SharedPtr< Material >::freeMethod | ( |  | ) | const`[inherited]`

Definition at line 181 of file OgreSharedPtr.h.

Material * Ogre::SharedPtr< Material >::get | ( | void |  | ) | const`[inherited]`

Definition at line 161 of file OgreSharedPtr.h.

Material * Ogre::SharedPtr< Material >::getPointer | ( |  | ) | const`[inherited]`

Definition at line 180 of file OgreSharedPtr.h.

bool Ogre::SharedPtr< Material >::isNull | ( | void |  | ) | const`[inherited]`

Definition at line 183 of file OgreSharedPtr.h.

Material & Ogre::SharedPtr< Material >::operator* | ( |  | ) | const`[inherited]`

Definition at line 159 of file OgreSharedPtr.h.

Material * Ogre::SharedPtr< Material >::operator-> | ( |  | ) | const`[inherited]`

Definition at line 160 of file OgreSharedPtr.h.

MaterialPtr& Ogre::MaterialPtr::operator= | ( | const ResourcePtr & | r | ) |

Operator used to convert a ResourcePtr to a MaterialPtr.

Definition at line 700 of file OgreMaterial.h.

References Ogre::SharedPtr< T >::getPointer(), Ogre::SharedPtr< T >::isNull(), OGRE_COPY_AUTO_SHARED_MUTEX, OGRE_LOCK_MUTEX, OGRE_MUTEX_CONDITIONAL, and Ogre::SharedPtr< T >::useCountPointer().

void Ogre::SharedPtr< Material >::release | ( | void |  | ) | `[protected, inherited]`

Definition at line 197 of file OgreSharedPtr.h.

void Ogre::SharedPtr< Material >::setNull | ( | void |  | ) | `[inherited]`

Definition at line 185 of file OgreSharedPtr.h.

virtual void Ogre::SharedPtr< Material >::swap | ( | SharedPtr< Material > & | other | ) | `[protected, virtual, inherited]`

Definition at line 247 of file OgreSharedPtr.h.

bool Ogre::SharedPtr< Material >::unique | ( |  | ) | const`[inherited]`

Definition at line 176 of file OgreSharedPtr.h.

unsigned int Ogre::SharedPtr< Material >::useCount | ( |  | ) | const`[inherited]`

Definition at line 177 of file OgreSharedPtr.h.

unsigned int* Ogre::SharedPtr< Material >::useCountPointer | ( |  | ) | const`[inherited]`

Definition at line 178 of file OgreSharedPtr.h.

## Member Data Documentation

Material * Ogre::SharedPtr< Material >::pRep `[protected, inherited]`

Definition at line 63 of file OgreSharedPtr.h.

unsigned int* Ogre::SharedPtr< Material >::pUseCount `[protected, inherited]`

Definition at line 64 of file OgreSharedPtr.h.

SharedPtrFreeMethod Ogre::SharedPtr< Material >::useFreeMethod `[protected, inherited]`

Definition at line 65 of file OgreSharedPtr.h.

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

- OgreMaterial.h

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Wed Nov 3 2010 19:24:56