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

Description

Sends incoming messages to multiple destinations.

This is the base class for all internal nodes of the plumbing lattice.

Definition at line 669 of file Message.h.

#include <Message.h>

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

Public Member Functions

virtual void bakeDestinations (const MesgProps &, BakedDestinations &)
 Bakes message properties according to the plumbing lattice. More...
 
virtual void post (const Mesg &, const MesgProps &)
 Causes a message to be emitted. More...
 
MultiplexerPtr addDestination (const DestinationPtr &)
 Adds a child node to this node of the lattice. More...
 
MultiplexerPtr removeDestination (const DestinationPtr &)
 Removes the specified child from this node of the lattice. More...
 
MultiplexerPtr to (const DestinationPtr &)
 Add a child nodes to this node of the lattice and returns this node. More...
 
MultiplexerPtr to (const DestinationPtr &, const DestinationPtr &)
 Add a child nodes to this node of the lattice and returns this node. More...
 
MultiplexerPtr to (const DestinationPtr &, const DestinationPtr &, const DestinationPtr &)
 Add a child nodes to this node of the lattice and returns this node. More...
 
MultiplexerPtr to (const DestinationPtr &, const DestinationPtr &, const DestinationPtr &, const DestinationPtr &)
 Add a child nodes to this node of the lattice and returns this node. More...
 
- Public Member Functions inherited from Sawyer::Message::Destination
MesgProps mergePropertiesNS (const MesgProps &props)
 Merge properties of this lattice node into the specified properties. More...
 
const MesgPropsdefaultPropertiesNS () const
 Default values for message properties. More...
 
MesgPropsdefaultPropertiesNS ()
 Default values for message properties. More...
 
const MesgPropsoverridePropertiesNS () const
 Overrides message properties. More...
 
MesgPropsoverridePropertiesNS ()
 Overrides message properties. More...
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor. More...
 
 SharedObject (const SharedObject &)
 Copy constructor. More...
 
virtual ~SharedObject ()
 Virtual destructor. More...
 
SharedObjectoperator= (const SharedObject &)
 Assignment. More...
 
- Public Member Functions inherited from Sawyer::SharedFromThis< Destination >
SharedPointer< Destination > sharedFromThis ()
 Create a shared pointer from this. More...
 
SharedPointer< const Destination > sharedFromThis () const
 Create a shared pointer from this. More...
 

Static Public Member Functions

static MultiplexerPtr instance ()
 Allocating constructor.
 

Protected Member Functions

 Multiplexer ()
 Constructor for derived classes. More...
 

Additional Inherited Members

- 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

◆ Multiplexer()

Sawyer::Message::Multiplexer::Multiplexer ( )
inlineprotected

Constructor for derived classes.

Non-subclass users should use instance instead.

Definition at line 676 of file Message.h.

Member Function Documentation

◆ bakeDestinations()

virtual void Sawyer::Message::Multiplexer::bakeDestinations ( const MesgProps ,
BakedDestinations baked 
)
virtual

Bakes message properties according to the plumbing lattice.

The given message properties are applied to the plumbing lattice rooted at this Destination, adjusted according to the default and override properties at this node of the lattice and all lower nodes. The property values at the bottom nodes of the lattice are appended to the baked argument.

Thread safety: All implementations must be thread-safe.

Reimplemented from Sawyer::Message::Destination.

Reimplemented in Sawyer::Message::Filter.

◆ post()

virtual void Sawyer::Message::Multiplexer::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.

◆ addDestination()

MultiplexerPtr Sawyer::Message::Multiplexer::addDestination ( const DestinationPtr )

Adds a child node to this node of the lattice.

An std::runtime_error is thrown if the addition of this child would cause the lattice to become malformed by having a cycle.

Thread safety: This method is not thread-safe.

See also
to

◆ removeDestination()

MultiplexerPtr Sawyer::Message::Multiplexer::removeDestination ( const DestinationPtr )

Removes the specified child from this node of the lattice.

Thread safety: This method is thread-safe.

See also
to

◆ to() [1/4]

MultiplexerPtr Sawyer::Message::Multiplexer::to ( const DestinationPtr )

Add a child nodes to this node of the lattice and returns this node.

It is often more convenient to call this method instead of addDestination.

Thread safety: This method is not thread-safe.

◆ to() [2/4]

MultiplexerPtr Sawyer::Message::Multiplexer::to ( const DestinationPtr ,
const DestinationPtr  
)

Add a child nodes to this node of the lattice and returns this node.

It is often more convenient to call this method instead of addDestination.

Thread safety: This method is not thread-safe.

◆ to() [3/4]

MultiplexerPtr Sawyer::Message::Multiplexer::to ( const DestinationPtr ,
const DestinationPtr ,
const DestinationPtr  
)

Add a child nodes to this node of the lattice and returns this node.

It is often more convenient to call this method instead of addDestination.

Thread safety: This method is not thread-safe.

◆ to() [4/4]

MultiplexerPtr Sawyer::Message::Multiplexer::to ( const DestinationPtr ,
const DestinationPtr ,
const DestinationPtr ,
const DestinationPtr  
)

Add a child nodes to this node of the lattice and returns this node.

It is often more convenient to call this method instead of addDestination.

Thread safety: This method is not thread-safe.


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