The Sparta Modeling Framework
|
Logging Destination for an already-open ostream. More...
#include <Destination.hpp>
Public Member Functions | |
DestinationInstance (std::ostream &stream) | |
virtual bool | compareOstreams (const std::ostream &o) const override |
Returns true if the destination behind this interface was constructed with the ostream o. | |
virtual std::string | stringize (bool pretty=false) const override |
Create a string representation of this Destination. | |
Public Member Functions inherited from sparta::log::Destination | |
Destination (const Destination &)=delete | |
Destination & | operator= (const Destination &)=delete |
Destination (const Destination &&rhp) | |
Destination () | |
Default constructor. | |
template<std::size_t N> | |
bool | compare (const char(&arg)[N]) const |
Comparison of destination for const char[]. Uses std::string comparison. | |
bool | compare (const char *&arg) const |
Comparison of destination for const char[]. Uses std::string comparison. | |
bool | compare (const std::string &arg) const |
Comparison of destination for std::string. | |
bool | compare (const std::ostream &arg) const |
Handle Destination::operator== on ostreams. | |
template<typename T > | |
bool | compare (const T &) const |
Operator= for for other unknown types. | |
virtual bool | compareStrings (const std::string &) const |
Returns true if the destination behind this interface was constructed with the string s. | |
void | write (const sparta::log::Message &msg) |
uint64_t | getNumMessagesReceived () const |
Get the total number of messages logged through this destination. | |
uint64_t | getNumMessagesWritten () const |
Gets the total number of messages received by this destination and then written to the actual output stream. | |
uint64_t | getNumMessageDuplicates () const |
Gets the total number of times that a message has arrived at this destination after already having been written to the output stream. | |
Logging Destination for an already-open ostream.
This is used for logging to cout and cerr
Definition at line 395 of file Destination.hpp.
|
inline |
Definition at line 402 of file Destination.hpp.
|
inlineoverridevirtual |
Returns true if the destination behind this interface was constructed with the ostream o.
Reimplemented from sparta::log::Destination.
Definition at line 411 of file Destination.hpp.
|
inlineoverridevirtual |
Create a string representation of this Destination.
pretty | Print a more verbose, multi-line representaiton (if available). |
Subclasses should override this with representations appropriate for their type.
Implements sparta::log::Destination.
Definition at line 416 of file Destination.hpp.