1 //////////////////////////////////////////////////////////////////////////////
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)
7 // See http://www.boost.org/libs/interprocess for documentation.
9 //////////////////////////////////////////////////////////////////////////////
11 #ifndef BOOST_INTERPROCESS_CREATION_TAGS_HPP
12 #define BOOST_INTERPROCESS_CREATION_TAGS_HPP
14 #ifndef BOOST_CONFIG_HPP
15 # include <boost/config.hpp>
18 #if defined(BOOST_HAS_PRAGMA_ONCE)
22 #include <boost/interprocess/detail/config_begin.hpp>
23 #include <boost/interprocess/detail/workaround.hpp>
26 namespace interprocess {
28 //!Tag to indicate that the resource must
30 struct create_only_t {};
32 //!Tag to indicate that the resource must
34 struct open_only_t {};
36 //!Tag to indicate that the resource must
37 //!be only opened for reading
38 struct open_read_only_t {};
40 //!Tag to indicate that the resource must
41 //!be only opened privately for reading
42 struct open_read_private_t {};
44 //!Tag to indicate that the resource must
45 //!be only opened for reading
46 struct open_copy_on_write_t {};
48 //!Tag to indicate that the resource must
49 //!be created. If already created, it must be opened.
50 struct open_or_create_t {};
52 //!Value to indicate that the resource must
54 static const create_only_t create_only = create_only_t();
56 //!Value to indicate that the resource must
58 static const open_only_t open_only = open_only_t();
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();
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();
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();
75 { DoCreate, DoOpen, DoOpenOrCreate };
77 } //namespace ipcdetail {
79 } //namespace interprocess {
82 #include <boost/interprocess/detail/config_end.hpp>
84 #endif //#ifndef BOOST_INTERPROCESS_CREATION_TAGS_HPP