From Sukender, added missing inline keywords
This commit is contained in:
parent
9a554f7eec
commit
905f3673d5
@ -165,14 +165,14 @@ class OSG_EXPORT Node : public Object
|
|||||||
inline const NodeCallback* getUpdateCallback() const { return _updateCallback.get(); }
|
inline const NodeCallback* getUpdateCallback() const { return _updateCallback.get(); }
|
||||||
|
|
||||||
/** Convenience method that sets the update callback of the node if it doesn't exist, or nest it into the existing one. */
|
/** Convenience method that sets the update callback of the node if it doesn't exist, or nest it into the existing one. */
|
||||||
void addUpdateCallback(NodeCallback* nc) {
|
inline void addUpdateCallback(NodeCallback* nc) {
|
||||||
if (_updateCallback.valid()) _updateCallback->addNestedCallback(nc);
|
if (_updateCallback.valid()) _updateCallback->addNestedCallback(nc);
|
||||||
else setUpdateCallback(nc);
|
else setUpdateCallback(nc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found. */
|
/** Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found. */
|
||||||
void removeUpdateCallback(NodeCallback* nc) {
|
inline void removeUpdateCallback(NodeCallback* nc) {
|
||||||
if (_updateCallback == nc) setUpdateCallback(nc->getNestedCallback()); // replace the callback by the nested one
|
if (_updateCallback == nc) setUpdateCallback(nc->getNestedCallback()); // replace the callback by the nested one
|
||||||
else _updateCallback->removeNestedCallback(nc);
|
else _updateCallback->removeNestedCallback(nc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,14 +191,14 @@ class OSG_EXPORT Node : public Object
|
|||||||
inline const NodeCallback* getEventCallback() const { return _eventCallback.get(); }
|
inline const NodeCallback* getEventCallback() const { return _eventCallback.get(); }
|
||||||
|
|
||||||
/** Convenience method that sets the event callback of the node if it doesn't exist, or nest it into the existing one. */
|
/** Convenience method that sets the event callback of the node if it doesn't exist, or nest it into the existing one. */
|
||||||
void addEventCallback(NodeCallback* nc) {
|
inline void addEventCallback(NodeCallback* nc) {
|
||||||
if (_eventCallback.valid()) _eventCallback->addNestedCallback(nc);
|
if (_eventCallback.valid()) _eventCallback->addNestedCallback(nc);
|
||||||
else setEventCallback(nc);
|
else setEventCallback(nc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found. */
|
/** Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found. */
|
||||||
void removeEventCallback(NodeCallback* nc) {
|
inline void removeEventCallback(NodeCallback* nc) {
|
||||||
if (_eventCallback == nc) setEventCallback(nc->getNestedCallback()); // replace the callback by the nested one
|
if (_eventCallback == nc) setEventCallback(nc->getNestedCallback()); // replace the callback by the nested one
|
||||||
else _eventCallback->removeNestedCallback(nc);
|
else _eventCallback->removeNestedCallback(nc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,14 +217,14 @@ class OSG_EXPORT Node : public Object
|
|||||||
inline const NodeCallback* getCullCallback() const { return _cullCallback.get(); }
|
inline const NodeCallback* getCullCallback() const { return _cullCallback.get(); }
|
||||||
|
|
||||||
/** Convenience method that sets the cull callback of the node if it doesn't exist, or nest it into the existing one. */
|
/** Convenience method that sets the cull callback of the node if it doesn't exist, or nest it into the existing one. */
|
||||||
void addCullCallback(NodeCallback* nc) {
|
inline void addCullCallback(NodeCallback* nc) {
|
||||||
if (_cullCallback.valid()) _cullCallback->addNestedCallback(nc);
|
if (_cullCallback.valid()) _cullCallback->addNestedCallback(nc);
|
||||||
else setCullCallback(nc);
|
else setCullCallback(nc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found. */
|
/** Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found. */
|
||||||
void removeCullCallback(NodeCallback* nc) {
|
inline void removeCullCallback(NodeCallback* nc) {
|
||||||
if (_cullCallback == nc) setCullCallback(nc->getNestedCallback()); // replace the callback by the nested one
|
if (_cullCallback == nc) setCullCallback(nc->getNestedCallback()); // replace the callback by the nested one
|
||||||
else _cullCallback->removeNestedCallback(nc);
|
else _cullCallback->removeNestedCallback(nc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user