osg::Identifier Class Reference

`#include <Identifier>`

Inheritance diagram for osg::Identifier:

## Public Member Functions

const std::string & | name () const
const int & | number () const
Public Member Functions inherited from osg::Referenced
| Referenced ()
| Referenced (bool threadSafeRefUnref)
| Referenced (const Referenced &)
Referenced & | operator= (const Referenced &)
virtual void | setThreadSafeRefUnref (bool)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const
Public Member Functions inherited from osg::Observer
| Observer ()
virtual | ~Observer ()

## Static Public Member Functions

static Identifier * | get (const std::string &name, int number=0, osg::Referenced *first=0, osg::Referenced *second=0)
static Identifier * | get (int number, osg::Referenced *first=0, osg::Referenced *second=0)
static Identifier * | get (osg::Referenced *first, osg::Referenced *second=0)
Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()

## Protected Member Functions

| Identifier (const std::string &name, int number, osg::Referenced *f, osg::Referenced *s)
virtual | ~Identifier ()
virtual void | objectDeleted (void *ptr)
Protected Member Functions inherited from osg::Referenced
virtual | ~Referenced ()
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const
void | deleteUsingDeleteHandler () const

## Protected Attributes

std::string | _name
int | _number
osg::Referenced * | _first
osg::Referenced * | _second
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr | _observerSet
OpenThreads::Atomic | _refCount

## Detailed Description

Unique Identifier class to help with efficiently comparing road classification or region via pointers.

## Constructor & Destructor Documentation

## Identifier()

osg::Identifier::Identifier | ( | const std::string & | name,
|  | int | number,
|  | osg::Referenced * | f,
|  | osg::Referenced * | s )

protected

References name(), and number().

Referenced by get(), get(), and get().

## ~Identifier()

virtual osg::Identifier::~Identifier | ( |  | ) |

protected virtual

## Member Function Documentation

## get() [1/3]

Identifier * osg::Identifier::get | ( | const std::string & | name,
|  | int | number = 0,
|  | osg::Referenced * | first = 0,
|  | osg::Referenced * | second = 0 )

static

References Identifier(), name(), and number().

## get() [2/3]

Identifier * osg::Identifier::get | ( | int | number,
|  | osg::Referenced * | first = 0,
|  | osg::Referenced * | second = 0 )

static

References Identifier(), and number().

## get() [3/3]

Identifier * osg::Identifier::get | ( | osg::Referenced * | first,
|  | osg::Referenced * | second = 0 )

static

References Identifier().

## name()

const std::string & osg::Identifier::name | ( |  | ) | const

inline

References _name.

Referenced by get(), and Identifier().

## number()

const int & osg::Identifier::number | ( |  | ) | const

inline

References _number.

Referenced by get(), get(), and Identifier().

## objectDeleted()

virtual void osg::Identifier::objectDeleted | ( | void * |  | ) |

protected virtual

objectDeleted is called when the observed object is about to be deleted. The observer will be automatically removed from the observed object's observer set so there is no need for the objectDeleted implementation to call removeObserver() on the observed object.

Reimplemented from osg::Observer.

## Member Data Documentation

## _first

osg::Referenced* osg::Identifier::_first

protected

## _name

std::string osg::Identifier::_name

protected

Referenced by name().

## _number

int osg::Identifier::_number

protected

Referenced by number().

## _second

osg::Referenced* osg::Identifier::_second

protected

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

- Identifier