# Ogre::NameGenerator Class Reference
General

Utility class to generate a sequentially numbered series of names. More...

`#include <OgreCommon.h>`

List of all members.

## Public Member Functions

| NameGenerator (const NameGenerator &rhs)
| NameGenerator (const String &prefix)
String | generate ()
| Generate a new name.
void | reset ()
| Reset the internal counter.
void | setNext (unsigned long long int val)
| Manually set the internal counter (use caution)
unsigned long long int | getNext () const
| Get the internal counter.

## Protected Attributes

String | mPrefix
unsigned long long int | mNext

## Detailed Description

Utility class to generate a sequentially numbered series of names.

Definition at line 741 of file OgreCommon.h.

## Constructor & Destructor Documentation

Ogre::NameGenerator::NameGenerator | ( | const NameGenerator & | rhs | ) |

Definition at line 748 of file OgreCommon.h.

Ogre::NameGenerator::NameGenerator | ( | const String & | prefix | ) |

Definition at line 751 of file OgreCommon.h.

## Member Function Documentation

String Ogre::NameGenerator::generate | ( |  | ) |

Generate a new name.

Definition at line 754 of file OgreCommon.h.

References OGRE_LOCK_AUTO_MUTEX.

unsigned long long int Ogre::NameGenerator::getNext | ( |  | ) | const

Get the internal counter.

Definition at line 777 of file OgreCommon.h.

References OGRE_LOCK_AUTO_MUTEX.

void Ogre::NameGenerator::reset | ( | void |  | ) |

Reset the internal counter.

Definition at line 763 of file OgreCommon.h.

References OGRE_LOCK_AUTO_MUTEX.

void Ogre::NameGenerator::setNext | ( | unsigned long long int | val | ) |

Manually set the internal counter (use caution)

Definition at line 770 of file OgreCommon.h.

References OGRE_LOCK_AUTO_MUTEX.

## Member Data Documentation

unsigned long long int Ogre::NameGenerator::mNext`[protected]`

Definition at line 745 of file OgreCommon.h.

String Ogre::NameGenerator::mPrefix`[protected]`

Definition at line 744 of file OgreCommon.h.

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

- OgreCommon.h

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun May 8 2011 20:28:10