fix doc example typo
[boost.git] / boost / interprocess / creation_tags.hpp
blob61d537a680f0a09f202b19e0258abeab76cb3740
1 //////////////////////////////////////////////////////////////////////////////
2 //
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)
6 //
7 // See http://www.boost.org/libs/interprocess for documentation.
8 //
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>
17 namespace boost {
18 namespace interprocess {
20 //!Tag to indicate that the resource must
21 //!be only created
22 struct create_only_t {};
24 //!Tag to indicate that the resource must
25 //!be only opened
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
41 //!be only created
42 static const create_only_t create_only = create_only_t();
44 //!Value to indicate that the resource must
45 //!be only opened
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();
60 namespace detail {
62 enum create_enum_t
63 { DoCreate, DoOpen, DoOpenOrCreate };
65 } //namespace detail {
67 } //namespace interprocess {
68 } //namespace boost {
70 #include <boost/interprocess/detail/config_end.hpp>
72 #endif //#ifndef BOOST_INTERPROCESS_CREATION_TAGS_HPP