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

Last change on this file since 103 was 103, checked in by DHERBOMEZ Gérald, 11 years ago

Correction of link bugs.
Windows build OK.

  • 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 103 2013-06-05 15:39:28Z gdherbom $
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\kernel\PacpusToolsConfig.h"
19
20#include <Pacpus/PacpusTools/ShMemBase.h>
21
22/// Windows handle (opaque pointer) type definition
23///
24/// Forward declaration of typedefs is impossible.
25typedef void * HANDLE;
26
27/// Shared memory object for Windows.
28class PACPUSTOOLS_API Win32ShMem
29 : public ShMemBase
30{
31public:
32 /// Ctor
33 Win32ShMem(const char * name, int size);
34 /// Dtor
35 ~Win32ShMem();
36
37 /// @todo Documentation
38 virtual bool wait(unsigned long timeout = 0);
39 /// @todo Documentation
40 virtual void * read();
41 /// @todo Documentation
42 virtual void read(void * mem, int size);
43 /// @todo Documentation
44 virtual void write(void * data, int size, unsigned long offset = 0);
45 /// @todo Documentation
46 virtual void lockMemory();
47 /// @todo Documentation
48 virtual void unlockMemory();
49 /// @todo Documentation
50 virtual void * getEventIdentifier();
51
52protected:
53
54private:
55 HANDLE semaphore_;
56 HANDLE shMemHandle_;
57 HANDLE event_;
58};
59
60#endif // DEF_PACPUS_WIN32SHMEM_H
Note: See TracBrowser for help on using the repository browser.