DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
OutputMessage Class Referenceabstract

an abstract class to serialize outputs through the OutputQueueManager More...

#include <noipc.h>

Inheritance diagram for OutputMessage:
GenericConsoleStringOutputMessage MoveShipOutputMessage MoveShipOutputMessage MoveVesselOutputMessage MoveVesselOutputMessage QuitMessage VesselLogbookOutputMessage VesselLogbookOutputMessage

Public Member Functions

virtual ~OutputMessage ()
 
 OutputMessage ()
 
virtual ~OutputMessage ()
 
virtual IpcMessageTypes getType () const =0
 
virtual bool process ()=0
 perform an operation non related to the gui feedback channel More...
 
virtual bool send (std::ostream &)=0
 the operation to perform. More...
 
virtual size_t sendBinary (void *buffer, size_t maxlen)=0
 formats a binary block of data to be sent across the IPC stream More...
 
template<typename T >
size_t put (void *buffer, size_t index, T v)
 

Detailed Description

an abstract class to serialize outputs through the OutputQueueManager

Constructor & Destructor Documentation

◆ ~OutputMessage() [1/2]

virtual OutputMessage::~OutputMessage ( )
inlinevirtual

◆ OutputMessage()

OutputMessage::OutputMessage ( )

◆ ~OutputMessage() [2/2]

virtual OutputMessage::~OutputMessage ( )
inlinevirtual

Member Function Documentation

◆ getType()

◆ process()

virtual bool OutputMessage::process ( )
pure virtual

perform an operation non related to the gui feedback channel

Returns
false if the calling function should exit. True otherwise.

Implemented in VesselLogbookOutputMessage, MoveShipOutputMessage, MoveVesselOutputMessage, QuitMessage, and GenericConsoleStringOutputMessage.

◆ put()

template<typename T >
size_t OutputMessage::put ( void *  buffer,
size_t  index,
v 
)
inline

◆ send()

virtual bool OutputMessage::send ( std::ostream &  )
pure virtual

the operation to perform.

Returns
false if error.

Implemented in VesselLogbookOutputMessage, QuitMessage, MoveShipOutputMessage, MoveVesselOutputMessage, and GenericConsoleStringOutputMessage.

◆ sendBinary()

virtual size_t OutputMessage::sendBinary ( void *  buffer,
size_t  maxlen 
)
pure virtual

formats a binary block of data to be sent across the IPC stream

  • buffer address of the data buffer
  • maxlen the maximum size of the block
    Returns
    lenght of the block, or -1 if the process should exit (due to error, or other)

Implemented in QuitMessage, VesselLogbookOutputMessage, MoveShipOutputMessage, MoveVesselOutputMessage, and GenericConsoleStringOutputMessage.


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