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

Last change on this file since 69 was 69, checked in by Marek Kurdej, 11 years ago

Added: more documentation.

  • Property svn:keywords set to Id
File size: 1.5 KB
RevLine 
[62]1// This file is part of the PACPUS framework distributed under the
2// CECILL-C License, Version 1.0.
3//
[66]4/// @file
[62]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.
[67]12/// @todo Derive from a common base class. Same for @link PosixShMem @endlink.
[3]13
[31]14#ifndef DEF_PACPUS_WIN32SHMEM_H
15#define DEF_PACPUS_WIN32SHMEM_H
[3]16
[31]17#include <Pacpus/PacpusTools/ShMemBase.h>
[3]18
[69]19/// Windows handle (opaque pointer) type definition
20///
21/// Forward declaration of typedefs is impossible.
[3]22typedef void * HANDLE;
23
[69]24/// Shared memory object for Windows.
[3]25class Win32ShMem
26 : public ShMemBase
27{
28public:
[69]29 /// Ctor
[3]30 Win32ShMem(const char * name, int size);
[69]31 /// Dtor
[3]32 ~Win32ShMem();
33
[69]34 /// @todo Documentation
[3]35 virtual bool wait(unsigned long timeout = 0);
[69]36 /// @todo Documentation
[3]37 virtual void * read();
[69]38 /// @todo Documentation
[3]39 virtual void read(void * mem, int size);
[69]40 /// @todo Documentation
[3]41 virtual void write(void * data, int size, unsigned long offset = 0);
[69]42 /// @todo Documentation
[3]43 virtual void lockMemory();
[69]44 /// @todo Documentation
[3]45 virtual void unlockMemory();
[69]46 /// @todo Documentation
[3]47 virtual void * getEventIdentifier();
48
49protected:
50
51private:
52 HANDLE semaphore_;
53 HANDLE shMemHandle_;
54 HANDLE event_;
55};
56
[31]57#endif // DEF_PACPUS_WIN32SHMEM_H
Note: See TracBrowser for help on using the repository browser.