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