Changeset 50 in flair-dev for trunk/include/FlairCore/SharedMem.h


Ignore:
Timestamp:
05/31/17 15:54:26 (7 years ago)
Author:
Sanahuja Guillaume
Message:

doc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/FlairCore/SharedMem.h

    r13 r50  
    3232class SharedMem : public Object {
    3333public:
     34  enum class Type { mutex, producerConsumer };
    3435  /*!
    3536  * \brief Constructor
     
    4041  * \param name name
    4142  * \param size size of the shared memory
     43  * \param blockOnRead if true reading will block if nothing written
    4244  */
    43   SharedMem(const Object *parent, std::string name, size_t size);
     45  SharedMem(const Object *parent, std::string name, size_t size, Type type=Type::mutex);
    4446
    4547  /*!
     
    6567  void Read(char *buf, size_t size) const;
    6668
     69
     70  /*!
     71  * \brief This function should be called when reader starts (in case of a SharedMem of type producerConsumer)
     72  */
     73   void ReaderReady();
    6774private:
    6875  SharedMem_impl *pimpl_;
     76  Type type;
    6977};
    7078
Note: See TracChangeset for help on using the changeset viewer.