Package org.robwork.sdurw_core
Class AnyPtr
- java.lang.Object
-
- org.robwork.sdurw_core.AnyPtr
-
public class AnyPtr extends java.lang.Object
Smart pointer that can point to any type, and optionally takes ownership of the object pointer.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnyPtr
assign(AnyPtr rhs)
copy assignemtvoid
delete()
boolean
equals(AnyPtr p)
Equality operator.static long
getCPtr(AnyPtr obj)
boolean
isNull()
Check if pointer is null.SWIGTYPE_p_std__type_info
type()
Get type info for the object pointed to.
-
-
-
Constructor Detail
-
AnyPtr
public AnyPtr(long cPtr, boolean cMemoryOwn)
-
AnyPtr
public AnyPtr()
Construct empty null pointer.
-
AnyPtr
public AnyPtr(AnyPtr other)
Copy constructor - ownership is shared.- Parameters:
other
- [in] other AnyPtr object.
-
-
Method Detail
-
getCPtr
public static long getCPtr(AnyPtr obj)
-
delete
public void delete()
-
equals
public boolean equals(AnyPtr p)
Equality operator. This only tests if the pointers to the referenced objects are
the same and NOT if the smart pointers are the same.- Parameters:
p
- [in] any pointer to compare with- Returns:
- true if the referenced objects are the same
-
isNull
public boolean isNull()
Check if pointer is null.- Returns:
- true is the smart pointer is null.
-
type
public SWIGTYPE_p_std__type_info type()
Get type info for the object pointed to.- Returns:
- type_info object.
-
-