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