Stiffstream / sobjectizer

An implementation of Actor, Publish-Subscribe, and CSP models in one rather small C++ framework. With performance, quality, and stability proved by years in the production.

Home Page:https://stiffstream.com/en/products/sobjectizer.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation for message_holder_t has to be extended

eao197 opened this issue · comments

commented

Documentation for message_holder_t template class in Doxygen format has to be extended by a couple of additional examples with send functions. Something like that:

class preallocated_messages_owner final : public so_5::agent_t {
  so_5::message_holder_t<some_message> first_;
  so_5::message_holder_t<so_5::mutable_msg<another_message>> second_;
  ...
  void on_some_event(mhood_t<some_event>) {
    // It is time to send preallocated messages.
 
    // This message will be sent as immutable message.
    so_5::send(dest, first_);
 
    // This message will be sent as mutable message.
    so_5::send(dest, std::move(second_));
  }
};
commented

Will be a part of 5.8.0 release.