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

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