11#define __RTLog_h__ included
17#ifndef __RTProtocol_h__
18#include <RTProtocol.h>
42 RTS_INLINE
Base(
void );
43 RTS_INLINE
Base(std::ostream& stream);
44 RTS_INLINE
~Base(
void );
49 RTS_INLINE
void cr(
void );
51 void crtab(
int = 1 );
54 void open(
const char * );
61 void log(
const char * str);
71 void show(
const char * str);
83 void log(
long double );
87 void log(
long long );
103 void log(
unsigned int );
104 void log(
unsigned long );
105 void log(
unsigned long long );
106 void log(
unsigned short );
107 void log(
unsigned char );
110#if RTUseFloatingPoint
113 void show(
long double );
117 void show(
long long );
133 void show(
unsigned int );
134 void show(
unsigned long );
135 void show(
unsigned long long );
136 void show(
unsigned short );
137 void show(
unsigned char );
168 template <
typename T>
171 outputStream << value;
180 bool valueParsingUtil(
const void * value,
const RTObject_class * type );
181 std::ostream& outputStream;
190 static std::ostream&
endl( std::ostream& os );
195 static std::ostream&
lock( std::ostream& os );
200 static std::ostream&
unlock( std::ostream& os );
206 std::ofstream ofStream;
223 Stream(
const char * filename,
bool overwrite =
true );
250 template <
typename T>
255 (*baseStream) << value;
Represents a log port.
Definition: RTLog.h:36
Base & operator<<(const RTTypedValue &info)
Print an object to the log.
Base & operator<<(std::ostream &(*manip)(std::ostream &))
Used to call endl.
void log(const void *data, const RTObject_class *type)
Print the default ASCII encoding of an object to the log, followed by a carriage return.
void log(const char *str)
Print a string to the log, followed by a carriage return.
void commit(void)
Flush all buffered characters to the log.
void cr(void)
Print a carriage return to the log.
Definition: RTLog.inl:41
void show(const RTString &str)
Print a string to the log.
void log(const RTString &str)
Print a string to the log, followed by a carriage return.
Base & operator<<(const RTDataObject &obj)
Print an object to the log.
void show(const void *data, const RTObject_class *type)
Print the default ASCII encoding of an object to the log.
void show(const char *str)
Print a string to the log.
Base & operator<<(const T &value)
Template function to print the value of variable to the log.
Definition: RTLog.h:169
Stream & operator<<(std::ostream &(*manip)(std::ostream &))
Invoke a manipulator on the stream, such as Log::endl or std::endl.
Stream & operator<<(const T &value)
Template function to print the value of variable to the log.
Definition: RTLog.h:251
Stream(Base *baseStreamPtr)
Logging Base stream e.g.
Stream(std::ostream *stdStreamPtr)
Logging for any ostream.
Stream(const char *filename, bool overwrite=true)
To append the log in file (e.g.
Stream & operator<<(const RTTypedValue &info)
Print an object to the log.
Provides a common interface to certain data type implementations (e.g.
Definition: RTDataObject.h:33
Represents a general capsule port typed by a protocol which determines the set of events that can be ...
Definition: RTProtocol.h:50
A C-style string wrapped in a data object.
Definition: RTString.h:24
Represents the predefined "Log" protocol.
Definition: RTLog.h:33
static std::ostream & lock(std::ostream &os)
Lock the Log::out or Log::err log statement.
static std::ostream & endl(std::ostream &os)
Insert the new line and flush the buffer.
static std::ostream & unlock(std::ostream &os)
Unlock the Log::out or Log::err log statement.
A type descriptor providing information about a type.
Definition: RTObject_class.h:64
Definition: RTProtocolDescriptor.h:40
Encapsulates a data object and its type descriptor.
Definition: RTTypedValue.h:29