Class LogWriterPtr


  • public class LogWriterPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • 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
      • 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.