Brunot
Loading...
Searching...
No Matches
Message Struct Reference

#include <Message.h>

Inheritance diagram for Message:
[legend]

Public Member Functions

 Message ()=default
 Message (const Message &other)=default
 Message (Message &&other) noexcept=default
auto operator= (const Message &other) -> Message &=default
auto operator= (Message &&other) noexcept -> Message &=default
virtual ~Message ()=default
virtual auto clone () const -> std::unique_ptr< Message >
virtual auto load (Stream &stream) -> void
virtual auto save (Stream &stream) const -> void
template<typename T>
auto convertMessageTo () const -> const T *
 A function that converts messages to the specific type so you don't need to call static_cast yourself
Mainly exists for cleaner code.

Constructor & Destructor Documentation

◆ Message() [1/3]

Message::Message ( )
default
Here is the caller graph for this function:

◆ Message() [2/3]

Message::Message ( const Message & other)
default
Here is the call graph for this function:

◆ Message() [3/3]

Message::Message ( Message && other)
defaultnoexcept
Here is the call graph for this function:

◆ ~Message()

virtual Message::~Message ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual auto Message::clone ( ) const->std::unique_ptr< Message >
inlinevirtual

Reimplemented in CardPositionSelectedMessage, CollisionMessage, DrawCardMessage, KeyPressedMessage, NewMessageStub, PlayAudioMessage, PlayCardMessage, RemovedMenuItemMessage, and TranslateActionMessage.

Here is the call graph for this function:

◆ convertMessageTo()

template<typename T>
auto Message::convertMessageTo ( ) const->constT *
inline

A function that converts messages to the specific type so you don't need to call static_cast yourself
Mainly exists for cleaner code.

Warning
Does not check if the conversion is type safe
Template Parameters
TThe type you want to convert the message to (should be a class derived from Message)
Returns
The message converted to the proper type

◆ load()

auto Message::load ( Stream & stream) ->void
virtual

◆ operator=() [1/2]

auto Message::operator= ( const Message & other) ->Message &=default
default
Here is the call graph for this function:

◆ operator=() [2/2]

auto Message::operator= ( Message && other) ->Message &=default
defaultnoexcept
Here is the call graph for this function:

◆ save()

auto Message::save ( Stream & stream) const->void
virtual

The documentation for this struct was generated from the following files:
  • /home/egrazil/sites/Brunot/The House/source/Utility/Messages/Message.h
  • /home/egrazil/sites/Brunot/The House/source/Utility/Messages/Message.cpp