mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
pgraph: expose WeakNodePath to Python
This commit is contained in:
parent
140644d8b6
commit
14f118b672
@ -56,6 +56,24 @@ operator = (const WeakNodePath ©) {
|
|||||||
_backup_key = copy._backup_key;
|
_backup_key = copy._backup_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets this NodePath to the empty NodePath. It will no longer point to any
|
||||||
|
* node.
|
||||||
|
*/
|
||||||
|
INLINE void WeakNodePath::
|
||||||
|
clear() {
|
||||||
|
_head.clear();
|
||||||
|
_backup_key = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this NodePath points to a valid, non-null node.
|
||||||
|
*/
|
||||||
|
INLINE WeakNodePath::
|
||||||
|
operator bool () const {
|
||||||
|
return _head.is_valid_pointer();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the NodePath contains no nodes, or if it has been deleted.
|
* Returns true if the NodePath contains no nodes, or if it has been deleted.
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* associated NodePath.
|
* associated NodePath.
|
||||||
*/
|
*/
|
||||||
class EXPCL_PANDA_PGRAPH WeakNodePath {
|
class EXPCL_PANDA_PGRAPH WeakNodePath {
|
||||||
public:
|
PUBLISHED:
|
||||||
INLINE WeakNodePath(const NodePath &node_path);
|
INLINE WeakNodePath(const NodePath &node_path);
|
||||||
INLINE WeakNodePath(const WeakNodePath ©);
|
INLINE WeakNodePath(const WeakNodePath ©);
|
||||||
INLINE ~WeakNodePath();
|
INLINE ~WeakNodePath();
|
||||||
@ -38,6 +38,9 @@ public:
|
|||||||
INLINE void operator = (const NodePath &node_path);
|
INLINE void operator = (const NodePath &node_path);
|
||||||
INLINE void operator = (const WeakNodePath ©);
|
INLINE void operator = (const WeakNodePath ©);
|
||||||
|
|
||||||
|
INLINE void clear();
|
||||||
|
|
||||||
|
INLINE operator bool () const;
|
||||||
INLINE bool is_empty() const;
|
INLINE bool is_empty() const;
|
||||||
INLINE bool was_deleted() const;
|
INLINE bool was_deleted() const;
|
||||||
|
|
||||||
@ -61,6 +64,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
WPT(NodePathComponent) _head;
|
WPT(NodePathComponent) _head;
|
||||||
mutable int _backup_key;
|
mutable int _backup_key;
|
||||||
|
|
||||||
|
friend class NodePath;
|
||||||
};
|
};
|
||||||
|
|
||||||
INLINE ostream &operator << (ostream &out, const WeakNodePath &node_path);
|
INLINE ostream &operator << (ostream &out, const WeakNodePath &node_path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user