Squadrick / shadesmar

Fast C++ IPC using shared memory
MIT License
555 stars 85 forks source link

Refactor pubsub into regular and serialized options #34

Closed Squadrick closed 4 years ago

Squadrick commented 4 years ago

Closes #33

This changes the API significantly for shm::pubsub:

  1. SubscriberBin -> Subscriber & PublisherBin -> Publisher.
  2. Subscriber -> SerializedSubscriber (similar for Publisher).
  3. SubscirberBin and Subscriber used to inherit from SubscriberBase. This is no longer the base. They are independent.
  4. All pubsub classes now take shm::memory::Copier* as the last constructor param and has full support for custom copiers.
  5. The extra_copy param in the constructors the older Publisher and Subscriber has been removed.
  6. The Serialized versions sit in their own separate header files: shadesmar/pubsub/serialized_{publisher|subscriber}.h.

The main README.md has been updated to reflect the new API.