ROSE 0.11.145.192
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Sawyer::Message::StreamSink Class Reference

Description

Send free-format messages to a C++ I/O stream.

Definition at line 1324 of file Message.h.

#include <Sawyer/Message.h>

Inheritance diagram for Sawyer::Message::StreamSink:
Inheritance graph
[legend]
Collaboration diagram for Sawyer::Message::StreamSink:
Collaboration graph
[legend]

Public Member Functions

virtual void post (const Mesg &, const MesgProps &)
 Causes a message to be emitted.
 
- Public Member Functions inherited from Sawyer::Message::UnformattedSink
virtual std::string maybeTerminatePrior (const Mesg &, const MesgProps &)
 Support function for emitting a message.
 
virtual std::string maybePrefix (const Mesg &, const MesgProps &)
 Support function for emitting a message.
 
virtual std::string maybeBody (const Mesg &, const MesgProps &)
 Support function for emitting a message.
 
virtual std::string maybeFinal (const Mesg &, const MesgProps &)
 Support function for emitting a message.
 
virtual std::string render (const Mesg &, const MesgProps &)
 Support function for emitting a message.
 
GangPtr gang () const
 Property: sink gang.
 
UnformattedSinkPtr gang (const GangPtr &g)
 Property: sink gang.
 
bool partialMessagesAllowed () const
 Property: allow partial message output.
 
UnformattedSinkPtr partialMessagesAllowed (bool)
 Property: allow partial message output.
 
PrefixPtr prefix () const
 Property: how to generate message prefixes.
 
UnformattedSinkPtr prefix (const PrefixPtr &p)
 Property: how to generate message prefixes.
 
- Public Member Functions inherited from Sawyer::Message::Destination
virtual void bakeDestinations (const MesgProps &, BakedDestinations &baked)
 Bakes message properties according to the plumbing lattice.
 
MesgProps mergePropertiesNS (const MesgProps &props)
 Merge properties of this lattice node into the specified properties.
 
const MesgPropsdefaultPropertiesNS () const
 Default values for message properties.
 
MesgPropsdefaultPropertiesNS ()
 Default values for message properties.
 
const MesgPropsoverridePropertiesNS () const
 Overrides message properties.
 
MesgPropsoverridePropertiesNS ()
 Overrides message properties.
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor.
 
 SharedObject (const SharedObject &)
 Copy constructor.
 
virtual ~SharedObject ()
 Virtual destructor.
 
SharedObjectoperator= (const SharedObject &)
 Assignment.
 
- Public Member Functions inherited from Sawyer::SharedFromThis< Destination >
SharedPointer< Destination > sharedFromThis ()
 Create a shared pointer from this.
 
SharedPointer< const Destination > sharedFromThis () const
 Create a shared pointer from this.
 

Static Public Member Functions

static StreamSinkPtr instance (std::ostream &stream, const PrefixPtr &prefix=PrefixPtr())
 Allocating constructor.
 

Protected Member Functions

 StreamSink (std::ostream &stream, const PrefixPtr &prefix)
 Constructor for derived classes.
 
- Protected Member Functions inherited from Sawyer::Message::UnformattedSink
 UnformattedSink (const PrefixPtr &prefix)
 Constructor for derived classes.
 
void gangInternal (const GangPtr &g)
 Cause this sink to be coordinated with others.
 

Additional Inherited Members

- Protected Attributes inherited from Sawyer::Message::UnformattedSink
bool partialMessagesAllowed_
 
- Protected Attributes inherited from Sawyer::Message::Destination
Sawyer::SynchronizationTraits< Sawyer::SingleThreadedTag >::RecursiveMutex mutex_
 Mutex protecting data members here and in subclasses.
 
MesgProps dflts_
 Default properties merged into each incoming message.
 
MesgProps overrides_
 Override properties applied to incoming message.
 

Constructor & Destructor Documentation

◆ StreamSink()

Sawyer::Message::StreamSink::StreamSink ( std::ostream &  stream,
const PrefixPtr prefix 
)
inlineprotected

Constructor for derived classes.

Non-subclass users should use instance instead.

Definition at line 1328 of file Message.h.

Member Function Documentation

◆ instance()

static StreamSinkPtr Sawyer::Message::StreamSink::instance ( std::ostream &  stream,
const PrefixPtr prefix = PrefixPtr() 
)
inlinestatic

Allocating constructor.

Constructs a new message sink that sends messages to the specified C++ output stream.

Definition at line 1331 of file Message.h.

◆ post()

virtual void Sawyer::Message::StreamSink::post ( const Mesg ,
const MesgProps bakedProperties 
)
virtual

Causes a message to be emitted.

The bakedProperties argument is one of the values returned by the bakeDestinations method.

Implements Sawyer::Message::Destination.


The documentation for this class was generated from the following file: