Skip to content

Message Requirements

Paul N Stickney edited this page Feb 10, 2020 · 1 revision

Currently the only requirement for a message is that it is derived from Message. This requirement exists largely so that the envelope can be setup by default.

(The following are proposals for 1.1)

Message - proposal

  • Derives from Message
  • Defines a ParentMsg type alias of the parent derived type. (C++ does not define a method to query for parent types.)

Byte-copyable

  • Message is trivially copy-able. This requires changes to make Message trivially copy-able.

Serialization

  • All 'serialize' method calls invoke the base messages 'serialize' function. This can be done UNIFORMLY by using ParentMsg.serialize(s). Failures to do so can be detected at run-time with a sentinel defined in Message.
  • All serializable methods must declare their serialization. -- Serialization an still be intrusive or not. However, it must align with the stated serialization requirements.