source: pacpusframework/trunk/include/Pacpus/PacpusTools/Win32ShMem.h@ 79

Last change on this file since 79 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
Line 
1// %pacpus:license{
2// This file is part of the PACPUS framework distributed under the
3// CECILL-C License, Version 1.0.
4// %pacpus:license}
5/// @file
6/// @author Gerald Dherbomez <firstname.surname@utc.fr>
7/// @date January, 2007
8/// @version $Id: Win32ShMem.h 76 2013-01-10 17:05:10Z kurdejma $
9/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
10/// @brief Shared memory implementation for Windows.
11///
12/// Shared memory implementation for Windows.
13/// @todo Derive from a common base class. Same for @link PosixShMem @endlink.
14
15#ifndef DEF_PACPUS_WIN32SHMEM_H
16#define DEF_PACPUS_WIN32SHMEM_H
17
18#include <Pacpus/PacpusTools/ShMemBase.h>
19
20/// Windows handle (opaque pointer) type definition
21///
22/// Forward declaration of typedefs is impossible.
23typedef void * HANDLE;
24
25/// Shared memory object for Windows.
26class Win32ShMem
27 : public ShMemBase
28{
29public:
30 /// Ctor
31 Win32ShMem(const char * name, int size);
32 /// Dtor
33 ~Win32ShMem();
34
35 /// @todo Documentation
36 virtual bool wait(unsigned long timeout = 0);
37 /// @todo Documentation
38 virtual void * read();
39 /// @todo Documentation
40 virtual void read(void * mem, int size);
41 /// @todo Documentation
42 virtual void write(void * data, int size, unsigned long offset = 0);
43 /// @todo Documentation
44 virtual void lockMemory();
45 /// @todo Documentation
46 virtual void unlockMemory();
47 /// @todo Documentation
48 virtual void * getEventIdentifier();
49
50protected:
51
52private:
53 HANDLE semaphore_;
54 HANDLE shMemHandle_;
55 HANDLE event_;
56};
57
58#endif // DEF_PACPUS_WIN32SHMEM_H
Note: See TracBrowser for help on using the repository browser.