osg::ObserverNodePath Class Reference

`#include <ObserverNodePath>`

## Public Member Functions

| ObserverNodePath ()
| ObserverNodePath (const ObserverNodePath &rhs)
| ObserverNodePath (const osg::NodePath &nodePath)
| ~ObserverNodePath ()
ObserverNodePath & | operator= (const ObserverNodePath &rhs)
void | setNodePathTo (osg::Node *node)
void | setNodePath (const osg::RefNodePath &nodePath)
void | setNodePath (const osg::NodePath &nodePath)
void | clearNodePath ()
bool | getRefNodePath (RefNodePath &refNodePath) const
bool | getNodePath (NodePath &nodePath) const
bool | empty () const

## Protected Types

typedef std::vector< osg::observer_ptr< osg::Node > > | ObsNodePath

## Protected Member Functions

void | _setNodePath (const osg::NodePath &nodePath)
void | _clearNodePath ()

## Protected Attributes

OpenThreads::Mutex | _mutex
ObsNodePath | _nodePath

## Detailed Description

ObserverNodePath is an observer class for tracking changes to a NodePath, that automatically invalidates it when nodes are deleted.

## Member Typedef Documentation

## ObsNodePath

typedef std::vector< osg::observer_ptr<osg::Node> > osg::ObserverNodePath::ObsNodePath

protected

## Constructor & Destructor Documentation

## ObserverNodePath() [1/3]

osg::ObserverNodePath::ObserverNodePath | ( |  | ) |

Referenced by ObserverNodePath(), and operator=().

## ObserverNodePath() [2/3]

osg::ObserverNodePath::ObserverNodePath | ( | const ObserverNodePath & | rhs | ) |

References ObserverNodePath().

## ObserverNodePath() [3/3]

osg::ObserverNodePath::ObserverNodePath | ( | const osg::NodePath & | nodePath | ) |

## ~ObserverNodePath()

osg::ObserverNodePath::~ObserverNodePath | ( |  | ) |

## Member Function Documentation

## _clearNodePath()

void osg::ObserverNodePath::_clearNodePath | ( |  | ) |

protected

## _setNodePath()

void osg::ObserverNodePath::_setNodePath | ( | const osg::NodePath & | nodePath | ) |

protected

## clearNodePath()

void osg::ObserverNodePath::clearNodePath | ( |  | ) |

## empty()

bool osg::ObserverNodePath::empty | ( |  | ) | const

inline

References _mutex, and _nodePath.

## getNodePath()

bool osg::ObserverNodePath::getNodePath | ( | NodePath & | nodePath | ) | const

Get a lightweight NodePath that isn't thread safe but may be safely used in single threaded applications, or when its known that the NodePath won't be invalidated during usage of the NodePath. return true if NodePath is valid.

## getRefNodePath()

bool osg::ObserverNodePath::getRefNodePath | ( | RefNodePath & | refNodePath | ) | const

Get a thread safe RefNodePath, return true if NodePath is valid.

## operator=()

ObserverNodePath & osg::ObserverNodePath::operator= | ( | const ObserverNodePath & | rhs | ) |

References ObserverNodePath().

## setNodePath() [1/2]

void osg::ObserverNodePath::setNodePath | ( | const osg::NodePath & | nodePath | ) |

## setNodePath() [2/2]

void osg::ObserverNodePath::setNodePath | ( | const osg::RefNodePath & | nodePath | ) |

## setNodePathTo()

void osg::ObserverNodePath::setNodePathTo | ( | osg::Node * | node | ) |

get the NodePath from the first parental chain back to root, plus the specified node.

## Member Data Documentation

## _mutex

OpenThreads::Mutex osg::ObserverNodePath::_mutex

mutable protected

Referenced by empty().

## _nodePath

ObsNodePath osg::ObserverNodePath::_nodePath

protected

Referenced by empty().

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

- ObserverNodePath