![]() |
VISR
0.12.0
Versatile Interactive Scene Renderer
|
#include <message_queue_protocol.hpp>
Classes | |
class | Input |
class | InputBase |
class | Output |
class | OutputBase |
Public Member Functions | |
MessageQueueProtocol (ParameterType const ¶meterType, ParameterConfigBase const &config) | |
virtual | ~MessageQueueProtocol () override |
ParameterType | parameterType () const override |
virtual CommunicationProtocolType | protocolType () const override |
void | clear () |
bool | empty () const |
std::size_t | numberOfElements () const |
void | enqueue (std::unique_ptr< ParameterBase > &val) |
ParameterBase const & | nextElement () const |
void | popNextElement () |
void | connectInput (CommunicationProtocolBase::Input *port) override |
void | connectOutput (CommunicationProtocolBase::Output *port) override |
bool | disconnectInput (CommunicationProtocolBase::Input *port) noexceptoverride |
bool | disconnectOutput (CommunicationProtocolBase::Output *port) noexceptoverride |
![]() | |
CommunicationProtocolBase () | |
virtual | ~CommunicationProtocolBase () |
Static Public Member Functions | |
static constexpr CommunicationProtocolType | staticType () |
static constexpr const char * | staticName () |
A FIFO-type message queue template class for storing and passing message data.
|
explicit |
|
overridevirtualdefault |
void visr::pml::MessageQueueProtocol::clear | ( | ) |
Remove all elements from the message queue.
|
overridevirtual |
Connect a protocol input to this protocol. Derived protocol types must override this pure virtual interface.
port | An parameter input with compatible protocol and parameter types. |
std::exception | If the protocol or parameter types do not match. |
std::exception | If the connection would violate the "arity" of the protocol, i.e., attempting multiple inputs in case of a 1:1 or 1:N protocol. |
Implements visr::CommunicationProtocolBase.
|
overridevirtual |
Connect a protocol output to this protocol. Derived protocol types must override this pure virtual interface.
port | An parameter output with compatible protocol and parameter types. |
std::exception | If the protocol or parameter types do not match. |
std::exception | If the connection would violate the "arity" of the protocol, i.e., attempting multiple outputs in case of a 1:1 or N:1 protocol. |
Implements visr::CommunicationProtocolBase.
|
overridevirtualnoexcept |
Disconnect a protocol input from this protocol.
Implements visr::CommunicationProtocolBase.
|
overridevirtualnoexcept |
Disconnect a protocol output from this protocol.
Implements visr::CommunicationProtocolBase.
bool visr::pml::MessageQueueProtocol::empty | ( | ) | const |
Return whether the list is empty, i.e., contains zero elements.
void visr::pml::MessageQueueProtocol::enqueue | ( | std::unique_ptr< ParameterBase > & | val | ) |
ParameterBase const & visr::pml::MessageQueueProtocol::nextElement | ( | ) | const |
std::size_t visr::pml::MessageQueueProtocol::numberOfElements | ( | ) | const |
Return the number of elements currently contained in the list.
|
overridevirtual |
Return the configured parameter type of this protocol instance. Derived protocols are requirted to override this method.
Implements visr::CommunicationProtocolBase.
void visr::pml::MessageQueueProtocol::popNextElement | ( | ) |
Remove the next output element from the list.
std::logic_error | If the queue is empty prior to this call. |
|
overridevirtual |
Return the protocol type (a numerical id) of the concrete derived protocol object. Derived protocol types are required to override this method.
Implements visr::CommunicationProtocolBase.
|
inlinestatic |
|
inlinestatic |