Ogre::LodStrategyManager Class Reference
Core » LOD

Manager for LOD strategies. More...

`#include <OgreLodStrategyManager.h>`

Inheritance diagram for Ogre::LodStrategyManager:
[legend]

## Public Member Functions

| LodStrategyManager ()
| Default constructor. More...
| ~LodStrategyManager ()
| Destructor. More...
void | addStrategy (LodStrategy *strategy)
| Add a strategy to the manager. More...
LodStrategy * | getDefaultStrategy ()
| Get the current default strategy. More...
MapIterator< StrategyMap > | getIterator ()
| Get an iterator for all contained strategies. More...
LodStrategy * | getStrategy (const String &name)
| Get the strategy with the specified name. More...
void | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info More...
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new More...
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info More...
void * | operator new[] (size_t sz)
void | removeAllStrategies ()
| Remove and delete all strategies from the manager. More...
LodStrategy * | removeStrategy (const String &name)
| Remove a strategy from the manager with a specified name. More...
void | setDefaultStrategy (LodStrategy *strategy)
| Set the default strategy. More...
void | setDefaultStrategy (const String &name)
| Set the default strategy by name. More...

## Static Public Member Functions

static LodStrategyManager & | getSingleton (void)
| Override standard Singleton retrieval. More...
static LodStrategyManager * | getSingletonPtr (void)
| Override standard Singleton retrieval. More...

## Static Protected Attributes

static LodStrategyManager * | msSingleton

## Private Types

typedef map< String, LodStrategy * >::type | StrategyMap
| Map of strategies. More...

## Private Attributes

LodStrategy * | mDefaultStrategy
| Default strategy. More...
StrategyMap | mStrategies
| Internal map of strategies. More...

## Detailed Description

Manager for LOD strategies.

Definition at line 47 of file OgreLodStrategyManager.h.

## Member Typedef Documentation

## StrategyMap

typedef map<String, LodStrategy *>::type Ogre::LodStrategyManager::StrategyMap

private

Map of strategies.

Definition at line 50 of file OgreLodStrategyManager.h.

## Constructor & Destructor Documentation

## LodStrategyManager()

Ogre::LodStrategyManager::LodStrategyManager | ( |  | ) |

Default constructor.

## ~LodStrategyManager()

Ogre::LodStrategyManager::~LodStrategyManager | ( |  | ) |

Destructor.

## Member Function Documentation

## addStrategy()

void Ogre::LodStrategyManager::addStrategy | ( | LodStrategy * | strategy | ) |

Add a strategy to the manager.

## getDefaultStrategy()

LodStrategy* Ogre::LodStrategyManager::getDefaultStrategy | ( |  | ) |

Get the current default strategy.

## getIterator()

MapIterator<StrategyMap> Ogre::LodStrategyManager::getIterator | ( |  | ) |

Get an iterator for all contained strategies.

## getSingleton()

static LodStrategyManager& Ogre::LodStrategyManager::getSingleton | ( | void |  | ) |

static

Override standard Singleton retrieval.

Remarks
  Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.

  This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

## getSingletonPtr()

static LodStrategyManager* Ogre::LodStrategyManager::getSingletonPtr | ( | void |  | ) |

static

Override standard Singleton retrieval.

Remarks
  Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.

  This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

## getStrategy()

LodStrategy* Ogre::LodStrategyManager::getStrategy | ( | const String & | name | ) |

Get the strategy with the specified name.

## operator delete() [1/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) |

inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

## operator delete() [2/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  |

inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

## operator delete() [3/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [1/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) |

inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [2/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

## operator new() [1/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

## operator new() [2/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) |

inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

## operator new() [3/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr
| ) |  |

inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

## operator new[]() [1/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

## operator new[]() [2/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) |

inherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

## removeAllStrategies()

void Ogre::LodStrategyManager::removeAllStrategies | ( |  | ) |

Remove and delete all strategies from the manager.

Remarks
  All strategies are deleted. If finer control is required over strategy destruction, use removeStrategy.

## removeStrategy()

LodStrategy* Ogre::LodStrategyManager::removeStrategy | ( | const String & | name | ) |

Remove a strategy from the manager with a specified name.

Remarks
  The removed strategy is returned so the user can control how it is destroyed.

## setDefaultStrategy() [1/2]

void Ogre::LodStrategyManager::setDefaultStrategy | ( | LodStrategy * | strategy | ) |

Set the default strategy.

## setDefaultStrategy() [2/2]

void Ogre::LodStrategyManager::setDefaultStrategy | ( | const String & | name | ) |

Set the default strategy by name.

## Member Data Documentation

## mDefaultStrategy

LodStrategy* Ogre::LodStrategyManager::mDefaultStrategy

private

Default strategy.

Definition at line 56 of file OgreLodStrategyManager.h.

## msSingleton

LodStrategyManager * Ogre::Singleton< LodStrategyManager >::msSingleton

static protected inherited

Definition at line 75 of file OgreSingleton.h.

## mStrategies

StrategyMap Ogre::LodStrategyManager::mStrategies

private

Internal map of strategies.

Definition at line 53 of file OgreLodStrategyManager.h.

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

- OgreLodStrategyManager.h

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