Package org.robwork.sdurw_kinematics
Class TreeStateCPtr
- java.lang.Object
-
- org.robwork.sdurw_kinematics.TreeStateCPtr
-
public class TreeStateCPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description TreeStateCPtr()
Default constructor yielding a NULL-pointer.TreeStateCPtr(long cPtr, boolean cMemoryOwn)
TreeStateCPtr(TreeState ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TreeState
__ref__()
Dereferencing operator.void
delete()
TreeState
deref()
The pointer stored in the object.boolean
equals(TreeState p)
FrameVector
getChildren(FrameCPtr frame)
The child frames of frame.
(We should query the modifiable part of the tree here, but that is
not implemented yet.)
Note that we break const-correctness.static long
getCPtr(TreeStateCPtr obj)
TreeState
getDeref()
Member access operator.Frame
getParent(FrameCPtr frame)
The parent frame of frame.
If the frame has no parent, then NULL is returned.
(We should query the modifiable part of the tree here, but that is
not implemented yet.)
Frame
getParent(FramePtr frame)
StateSetupPtr
getStateSetup()
gets the StateSetup used to create the TreeStateboolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownership
-
-
-
Constructor Detail
-
TreeStateCPtr
public TreeStateCPtr(long cPtr, boolean cMemoryOwn)
-
TreeStateCPtr
public TreeStateCPtr()
Default constructor yielding a NULL-pointer.
-
TreeStateCPtr
public TreeStateCPtr(TreeState ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(TreeStateCPtr obj)
-
delete
public void delete()
-
deref
public TreeState deref()
The pointer stored in the object.
-
__ref__
public TreeState __ref__()
Dereferencing operator.
-
getDeref
public TreeState getDeref()
Member access operator.
-
equals
public boolean equals(TreeState p)
-
isShared
public boolean isShared()
check if this Ptr has shared ownership or none
ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
getParent
public Frame getParent(FrameCPtr frame)
The parent frame of frame.
If the frame has no parent, then NULL is returned.
(We should query the modifiable part of the tree here, but that is
not implemented yet.)
- Parameters:
frame
- [in] The frame for which to retrieve the parent.
- Returns:
- The parent of the frame or NULL if the frame has no parent.
-
getChildren
public FrameVector getChildren(FrameCPtr frame)
The child frames of frame.
(We should query the modifiable part of the tree here, but that is
not implemented yet.)
Note that we break const-correctness. We treat TreeState as an
implementation detail upon which an iterator interface in Frame is
then built.
- Parameters:
frame
- [in] The frame for which to retrieve the children.
- Returns:
- The children of the frame if any children exist, else NULL.
-
getStateSetup
public StateSetupPtr getStateSetup()
gets the StateSetup used to create the TreeState- Returns:
- the StateSetup
-
-