Changeset 69 in pacpusframework for trunk/include/Pacpus/PacpusTools/ShMemBase.h
- Timestamp:
- 01/10/13 00:04:42 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/Pacpus/PacpusTools/ShMemBase.h
r66 r69 14 14 #define DEF_PACPUS_SHMEMBASE_H 15 15 16 /// Base class for shared memory objects. 16 17 class ShMemBase 17 18 { 18 19 public: 19 ShMemBase()20 {21 /*printf("ShMemBase::ShMemBase() not implemented !\n");*/22 }20 /// Ctor 21 ShMemBase() 22 { 23 } 23 24 24 virtual ~ShMemBase()25 {26 /*printf("ShMemBase::~ShMemBase() not implemented !\n");*/27 }25 /// Dtor 26 virtual ~ShMemBase() 27 { 28 } 28 29 29 // Use this method to get the data of the shared memory30 virtual void *read() = 0;30 /// Use this method to get the data of the shared memory 31 virtual void *read() = 0; 31 32 32 // Use this method to write data in shared memory33 virtual void write(void *data, int size, unsigned long offset = 0) = 0;33 /// Use this method to write data in shared memory 34 virtual void write(void *data, int size, unsigned long offset = 0) = 0; 34 35 35 // Use this method to wait the incoming of new data36 // you can specify a timeout in ms to avoid infinite blocking or 0 (infinite)37 // return true if new data available before the timeout or else false38 virtual bool wait(unsigned long timeout = 0) = 0;36 /// Use this method to wait the incoming of new data 37 /// you can specify a timeout in ms to avoid infinite blocking or 0 (infinite) 38 /// @returns @b true if new data available before the timeout, @b false otherwise 39 virtual bool wait(unsigned long timeout = 0) = 0; 39 40 40 // To lock the access to the memory41 virtual void lockMemory() = 0;41 /// To lock the access to the memory 42 virtual void lockMemory() = 0; 42 43 43 // To unlock the access to the memory44 virtual void unlockMemory() = 0;44 /// To unlock the access to the memory 45 virtual void unlockMemory() = 0; 45 46 46 47 #ifdef WIN32 47 // Return the event handle under Windows48 //... under Linux ?49 virtual void * getEventIdentifier() = 0;48 /// Return the event handle under Windows 49 /// @todo ... under Linux ? 50 virtual void * getEventIdentifier() = 0; 50 51 #endif 51 52 52 53 protected: 53 void * shMem_; 54 54 /// @todo Documentation 55 void * shMem_; 56 55 57 private: 56 58 };
Note:
See TracChangeset
for help on using the changeset viewer.