source: pacpusframework/trunk/include/Pacpus/PacpusTools/ShMemBase.h@ 81

Last change on this file since 81 was 76, checked in by Marek Kurdej, 12 years ago

Added: automated license updating lines:
%pacpus:license{
%pacpus:license}

  • Property svn:keywords set to Id
File size: 1.6 KB
RevLine 
[76]1// %pacpus:license{
[62]2// This file is part of the PACPUS framework distributed under the
3// CECILL-C License, Version 1.0.
[76]4// %pacpus:license}
[66]5/// @file
[62]6/// @author Firstname Surname <firstname.surname@utc.fr>
7/// @date Month, Year
8/// @version $Id: ShMemBase.h 76 2013-01-10 17:05:10Z kurdejma $
9/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
10/// @brief Brief description.
11///
12/// Detailed description.
[3]13
[31]14#ifndef DEF_PACPUS_SHMEMBASE_H
15#define DEF_PACPUS_SHMEMBASE_H
[3]16
[69]17/// Base class for shared memory objects.
[3]18class ShMemBase
19{
20public:
[69]21 /// Ctor
22 ShMemBase()
23 {
24 }
[3]25
[69]26 /// Dtor
27 virtual ~ShMemBase()
28 {
29 }
[3]30
[69]31 /// Use this method to get the data of the shared memory
32 virtual void *read() = 0;
[3]33
[69]34 /// Use this method to write data in shared memory
35 virtual void write(void *data, int size, unsigned long offset = 0) = 0;
[3]36
[69]37 /// Use this method to wait the incoming of new data
38 /// you can specify a timeout in ms to avoid infinite blocking or 0 (infinite)
39 /// @returns @b true if new data available before the timeout, @b false otherwise
40 virtual bool wait(unsigned long timeout = 0) = 0;
[3]41
[69]42 /// To lock the access to the memory
43 virtual void lockMemory() = 0;
[3]44
[69]45 /// To unlock the access to the memory
46 virtual void unlockMemory() = 0;
[3]47
48#ifdef WIN32
[69]49 /// Return the event handle under Windows
50 /// @todo ... under Linux ?
51 virtual void * getEventIdentifier() = 0;
[3]52#endif
53
54protected:
[69]55 /// @todo Documentation
56 void * shMem_;
57
[3]58private:
59};
60
[31]61#endif // DEF_PACPUS_SHMEMBASE_H
Note: See TracBrowser for help on using the repository browser.