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

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

Update: license info.

File size: 1.2 KB
Line 
1// This file is part of the PACPUS framework distributed under the
2// CECILL-C License, Version 1.0.
3//
4/// @author Gerald Dherbomez <firstname.surname@utc.fr>
5/// @date January, 2007
6/// @version $Id$
7/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
8/// @brief Shared memory implementation for Windows.
9///
10/// Shared memory implementation for Windows.
11/// @todo Derive from a common base class. Same for @link PosixShMem.
12
13#ifndef DEF_PACPUS_WIN32SHMEM_H
14#define DEF_PACPUS_WIN32SHMEM_H
15
16#include <Pacpus/PacpusTools/ShMemBase.h>
17
18typedef void * HANDLE;
19
20class Win32ShMem
21 : public ShMemBase
22{
23public:
24 Win32ShMem(const char * name, int size);
25 ~Win32ShMem();
26
27 virtual bool wait(unsigned long timeout = 0);
28 virtual void * read();
29 virtual void read(void * mem, int size);
30 virtual void write(void * data, int size, unsigned long offset = 0);
31 virtual void lockMemory();
32 virtual void unlockMemory();
33 virtual void * getEventIdentifier();
34
35protected:
36
37private:
38 HANDLE semaphore_;
39 HANDLE shMemHandle_;
40 HANDLE event_;
41};
42
43#endif // DEF_PACPUS_WIN32SHMEM_H
Note: See TracBrowser for help on using the repository browser.