Package org.robwork.sdurw_core
Class LogWriterPtr
- java.lang.Object
-
- org.robwork.sdurw_core.LogWriterPtr
-
public class LogWriterPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description LogWriterPtr()
Default constructor yielding a NULL-pointer.LogWriterPtr(long cPtr, boolean cMemoryOwn)
LogWriterPtr(LogWriter 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 LogWriter
__ref__()
Dereferencing operator.LogWriterCPtr
cptr()
void
delete()
LogWriter
deref()
The pointer stored in the object.boolean
equals(LogWriter p)
void
flush()
Flush methodstatic long
getCPtr(LogWriterPtr obj)
LogWriter
getDeref()
Member access operator.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipvoid
setTabLevel(int tabLevel)
Set the tab levelLogWriter
streamOperator(java.lang.String str)
specialized stream operator
2LogWriter
streamOperator(Message msg)
Write Message to log.LogWriter
streamOperator(SWIGTYPE_p_f_r_std__ostream__r_std__ostream pf)
Handle the std::endl and other stream functions.void
write(java.lang.String str)
Writes str to the logvoid
write(Message msg)
Writes msg to the log
Default behavior is to use write(const std::string&) for the standard
streaming representation of msg.
void
writeln(java.lang.String str)
Writes str as a line
By default writeln writes str followed by a '\n'.
-
-
-
Constructor Detail
-
LogWriterPtr
public LogWriterPtr(long cPtr, boolean cMemoryOwn)
-
LogWriterPtr
public LogWriterPtr()
Default constructor yielding a NULL-pointer.
-
LogWriterPtr
public LogWriterPtr(LogWriter ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(LogWriterPtr obj)
-
delete
public void delete()
-
deref
public LogWriter deref()
The pointer stored in the object.
-
__ref__
public LogWriter __ref__()
Dereferencing operator.
-
getDeref
public LogWriter getDeref()
Member access operator.
-
equals
public boolean equals(LogWriter 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
-
cptr
public LogWriterCPtr cptr()
-
flush
public void flush()
Flush method
-
setTabLevel
public void setTabLevel(int tabLevel)
Set the tab level
-
write
public void write(java.lang.String str)
Writes str to the log- Parameters:
str
- [in] message to write
-
write
public void write(Message msg)
Writes msg to the log
Default behavior is to use write(const std::string&) for the standard
streaming representation of msg.
- Parameters:
msg
- [in] message to write
-
writeln
public void writeln(java.lang.String str)
Writes str as a line
By default writeln writes str followed by a '\n'. However, logs
are free to implement a line change differently.
-
streamOperator
public LogWriter streamOperator(java.lang.String str)
specialized stream operator
2
-
streamOperator
public LogWriter streamOperator(Message msg)
Write Message to log.- Parameters:
msg
- [in] the message.- Returns:
- a reference to this LogWriter for chaining of stream operators.
-
streamOperator
public LogWriter streamOperator(SWIGTYPE_p_f_r_std__ostream__r_std__ostream pf)
Handle the std::endl and other stream functions.
-
-