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

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

Minor: added pacpus namespace in Win32ShMem.
Ignored dll-interface warnings in MSVC (unimportant because concerns STL): C4251, C4275.

  • Property svn:keywords set to Id
File size: 1.9 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 114 2013-06-25 08:55:43Z 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
[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
[114]27#ifdef _MSC_VER
28# pragma warning(push)
29# pragma warning(disable: 4275)
30#endif // _MSC_VER
31
32namespace pacpus {
33
[69]34/// Shared memory object for Windows.
[103]35class PACPUSTOOLS_API Win32ShMem
[3]36 : public ShMemBase
37{
38public:
[69]39 /// Ctor
[3]40 Win32ShMem(const char * name, int size);
[69]41 /// Dtor
[3]42 ~Win32ShMem();
43
[69]44 /// @todo Documentation
[3]45 virtual bool wait(unsigned long timeout = 0);
[69]46 /// @todo Documentation
[3]47 virtual void * read();
[69]48 /// @todo Documentation
[3]49 virtual void read(void * mem, int size);
[69]50 /// @todo Documentation
[3]51 virtual void write(void * data, int size, unsigned long offset = 0);
[69]52 /// @todo Documentation
[3]53 virtual void lockMemory();
[69]54 /// @todo Documentation
[3]55 virtual void unlockMemory();
[69]56 /// @todo Documentation
[3]57 virtual void * getEventIdentifier();
58
59protected:
60
61private:
62 HANDLE semaphore_;
63 HANDLE shMemHandle_;
64 HANDLE event_;
65};
66
[114]67} // namespace pacpus
68
69#ifdef _MSC_VER
70# pragma warning(pop)
71#endif // _MSC_VER
72
[31]73#endif // DEF_PACPUS_WIN32SHMEM_H
Note: See TracBrowser for help on using the repository browser.