1 //////////////////////////////////////////////////////////////////////////////
3 // (C) Copyright Ion Gaztanaga 2005-2008. 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 #include <boost/interprocess/detail/config_begin.hpp>
15 #include <boost/interprocess/detail/workaround.hpp>
18 namespace interprocess
{
20 //!Tag to indicate that the resource must
22 struct create_only_t
{};
24 //!Tag to indicate that the resource must
26 struct open_only_t
{};
28 //!Tag to indicate that the resource must
29 //!be only opened for reading
30 struct open_read_only_t
{};
32 //!Tag to indicate that the resource must
33 //!be only opened for reading
34 struct open_copy_on_write_t
{};
36 //!Tag to indicate that the resource must
37 //!be created. If already created, it must be opened.
38 struct open_or_create_t
{};
40 //!Value to indicate that the resource must
42 static const create_only_t create_only
= create_only_t();
44 //!Value to indicate that the resource must
46 static const open_only_t open_only
= open_only_t();
48 //!Value to indicate that the resource must
49 //!be only opened for reading
50 static const open_read_only_t open_read_only
= open_read_only_t();
52 //!Value to indicate that the resource must
53 //!be created. If already created, it must be opened.
54 static const open_or_create_t open_or_create
= open_or_create_t();
56 //!Value to indicate that the resource must
57 //!be only opened for reading
58 static const open_copy_on_write_t open_copy_on_write
= open_copy_on_write_t();
63 { DoCreate
, DoOpen
, DoOpenOrCreate
};
65 } //namespace detail {
67 } //namespace interprocess {
70 #include <boost/interprocess/detail/config_end.hpp>
72 #endif //#ifndef BOOST_INTERPROCESS_CREATION_TAGS_HPP