| 1 | ////////////////////////////////////////////////////////////////////////////// |
| 2 | // |
| 3 | // (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost |
| 4 | // Software License, Version 1.0. (See accompanying file |
| 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 6 | // |
| 7 | // See http://www.boost.org/libs/interprocess for documentation. |
| 8 | // |
| 9 | ////////////////////////////////////////////////////////////////////////////// |
| 10 | |
| 11 | #ifndef BOOST_INTERPROCESS_CREATION_TAGS_HPP |
| 12 | #define BOOST_INTERPROCESS_CREATION_TAGS_HPP |
| 13 | |
| 14 | #ifndef BOOST_CONFIG_HPP |
| 15 | # include <boost/config.hpp> |
| 16 | #endif |
| 17 | # |
| 18 | #if defined(BOOST_HAS_PRAGMA_ONCE) |
| 19 | # pragma once |
| 20 | #endif |
| 21 | |
| 22 | #include <boost/interprocess/detail/config_begin.hpp> |
| 23 | #include <boost/interprocess/detail/workaround.hpp> |
| 24 | |
| 25 | namespace boost { |
| 26 | namespace interprocess { |
| 27 | |
| 28 | //!Tag to indicate that the resource must |
| 29 | //!be only created |
| 30 | struct create_only_t {}; |
| 31 | |
| 32 | //!Tag to indicate that the resource must |
| 33 | //!be only opened |
| 34 | struct open_only_t {}; |
| 35 | |
| 36 | //!Tag to indicate that the resource must |
| 37 | //!be only opened for reading |
| 38 | struct open_read_only_t {}; |
| 39 | |
| 40 | //!Tag to indicate that the resource must |
| 41 | //!be only opened privately for reading |
| 42 | struct open_read_private_t {}; |
| 43 | |
| 44 | //!Tag to indicate that the resource must |
| 45 | //!be only opened for reading |
| 46 | struct open_copy_on_write_t {}; |
| 47 | |
| 48 | //!Tag to indicate that the resource must |
| 49 | //!be created. If already created, it must be opened. |
| 50 | struct open_or_create_t {}; |
| 51 | |
| 52 | //!Value to indicate that the resource must |
| 53 | //!be only created |
| 54 | static const create_only_t create_only = create_only_t(); |
| 55 | |
| 56 | //!Value to indicate that the resource must |
| 57 | //!be only opened |
| 58 | static const open_only_t open_only = open_only_t(); |
| 59 | |
| 60 | //!Value to indicate that the resource must |
| 61 | //!be only opened for reading |
| 62 | static const open_read_only_t open_read_only = open_read_only_t(); |
| 63 | |
| 64 | //!Value to indicate that the resource must |
| 65 | //!be created. If already created, it must be opened. |
| 66 | static const open_or_create_t open_or_create = open_or_create_t(); |
| 67 | |
| 68 | //!Value to indicate that the resource must |
| 69 | //!be only opened for reading |
| 70 | static const open_copy_on_write_t open_copy_on_write = open_copy_on_write_t(); |
| 71 | |
| 72 | namespace ipcdetail { |
| 73 | |
| 74 | enum create_enum_t |
| 75 | { DoCreate, DoOpen, DoOpenOrCreate }; |
| 76 | |
| 77 | } //namespace ipcdetail { |
| 78 | |
| 79 | } //namespace interprocess { |
| 80 | } //namespace boost { |
| 81 | |
| 82 | #include <boost/interprocess/detail/config_end.hpp> |
| 83 | |
| 84 | #endif //#ifndef BOOST_INTERPROCESS_CREATION_TAGS_HPP |
| 85 | |
| 86 | |