Rev | Line | |
---|
[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 Firstname Surname <firstname.surname@utc.fr>
|
---|
| 6 | /// @date Month, Year
|
---|
| 7 | /// @version $Id: ShMem.h 67 2013-01-09 18:17:44Z kurdejma $
|
---|
| 8 | /// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
|
---|
| 9 | /// @brief Brief description.
|
---|
| 10 | ///
|
---|
| 11 | /// Detailed description.
|
---|
[3] | 12 |
|
---|
[31] | 13 | #ifndef DEF_PACPUS_SHMEM_H
|
---|
| 14 | #define DEF_PACPUS_SHMEM_H
|
---|
[3] | 15 |
|
---|
| 16 | #ifdef WIN32
|
---|
| 17 | # include "Win32ShMem.h"
|
---|
| 18 | # define ShMemType Win32ShMem
|
---|
| 19 | #else
|
---|
| 20 | # include "PosixShMem.h"
|
---|
| 21 | # define ShMemType PosixShMem
|
---|
| 22 | #endif
|
---|
| 23 |
|
---|
| 24 | namespace pacpus {
|
---|
| 25 |
|
---|
| 26 | class ShMem
|
---|
| 27 | : public ShMemType
|
---|
| 28 | {
|
---|
| 29 | public:
|
---|
[67] | 30 | /// @brief Ctor of shared memory class.
|
---|
| 31 | ///
|
---|
| 32 | /// Creates a shared memory of size @b size and named @b name.
|
---|
| 33 | /// If a shared memory with the name @b name already exists, than
|
---|
| 34 | /// it will return object pointing to the same memory.
|
---|
| 35 | /// If this existing memory space has a size smaller than @b size,
|
---|
| 36 | /// a warning will be issued.
|
---|
| 37 | ///
|
---|
| 38 | /// @param name Name of the created shared memory space.
|
---|
| 39 | /// @param size Size of the created shared memory space in [bytes].
|
---|
[3] | 40 | ShMem(const char * name, int size)
|
---|
| 41 | : ShMemType(name, size)
|
---|
| 42 | {
|
---|
| 43 | }
|
---|
| 44 |
|
---|
[67] | 45 | /// @brief Dtor of shared memory class.
|
---|
| 46 | ///
|
---|
| 47 | /// Does nothing.
|
---|
[3] | 48 | ~ShMem()
|
---|
| 49 | {
|
---|
| 50 | }
|
---|
| 51 |
|
---|
| 52 | protected:
|
---|
| 53 | private:
|
---|
| 54 | };
|
---|
| 55 |
|
---|
| 56 | } // namespace pacpus
|
---|
| 57 |
|
---|
[31] | 58 | #endif // DEF_PACPUS_SHMEM_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.