source: pacpusframework/branches/2.0-beta1/include/Pacpus/PacpusTools/ShMem.h@ 148

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

Corrections in PacpusEvent, InputOutputBase, InputOutputInterface.
Fixed: DLL import/export in geodesie.h.

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1// %pacpus:license{
2// This file is part of the PACPUS framework distributed under the
3// CECILL-C License, Version 1.0.
4// %pacpus:license}
5/// @file
6/// @author Firstname Surname <firstname.surname@utc.fr>
7/// @date Month, Year
8/// @version $Id: ShMem.h 76 2013-01-10 17:05:10Z kurdejma $
9/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
10/// @brief Brief description.
11///
12/// Detailed description.
13
14#ifndef DEF_PACPUS_SHMEM_H
15#define DEF_PACPUS_SHMEM_H
16
17#include "PacpusToolsConfig.h"
18
19#ifdef WIN32
20# include "Win32ShMem.h"
21/// Defines shared memory as a Windows shared memory
22# define ShMemType Win32ShMem
23#else
24# include "PosixShMem.h"
25/// Defines shared memory as a POSIX shared memory
26# define ShMemType PosixShMem
27#endif
28
29namespace pacpus {
30
31/// Shared memory class.
32///
33/// Inherits from Win32ShMem on Windows system and from PosixShMem on Unix-like systems.
34class /*PACPUS_TOOLS_API*/ ShMem
35 : public ShMemType
36{
37public:
38 /// Ctor of shared memory class.
39 ///
40 /// Creates a shared memory of size @b size and named @b name.
41 /// If a shared memory with the name @b name already exists, than
42 /// it will return object pointing to the same memory.
43 /// If this existing memory space has a size smaller than @b size,
44 /// a warning will be issued.
45 ///
46 /// @param name Name of the created shared memory space.
47 /// @param size Size of the created shared memory space in [bytes].
48 ShMem(const char * name, int size)
49 : ShMemType(name, size)
50 {
51 }
52
53 /// Dtor of shared memory class.
54 ///
55 /// Does nothing.
56 ~ShMem()
57 {
58 }
59
60protected:
61private:
62};
63
64} // namespace pacpus
65
66#endif // DEF_PACPUS_SHMEM_H
Note: See TracBrowser for help on using the repository browser.