コード例 #1
0
namespace interprocess {

//!Tag to indicate that the resource must
//!be only created
struct create_only_t {};

//!Tag to indicate that the resource must
//!be only opened
struct open_only_t {};

//!Tag to indicate that the resource must
//!be only opened for reading
struct open_read_only_t {};

//!Tag to indicate that the resource must
//!be only opened privately for reading
struct open_read_private_t {};

//!Tag to indicate that the resource must
//!be only opened for reading
struct open_copy_on_write_t {};

//!Tag to indicate that the resource must
//!be created. If already created, it must be opened.
struct open_or_create_t {};

//!Value to indicate that the resource must
//!be only created
static const create_only_t    create_only    = create_only_t();

//!Value to indicate that the resource must
//!be only opened
static const open_only_t      open_only      = open_only_t();

//!Value to indicate that the resource must
//!be only opened for reading
static const open_read_only_t open_read_only = open_read_only_t();

//!Value to indicate that the resource must
//!be created. If already created, it must be opened.
static const open_or_create_t open_or_create = open_or_create_t();

//!Value to indicate that the resource must
//!be only opened for reading
static const open_copy_on_write_t open_copy_on_write = open_copy_on_write_t();

namespace ipcdetail {

enum create_enum_t
{  DoCreate, DoOpen, DoOpenOrCreate   };

}  //namespace ipcdetail {

}  //namespace interprocess {
コード例 #2
0
ファイル: named_mutex.hpp プロジェクト: OggYiu/rag-engine
inline named_mutex::named_mutex(open_or_create_t, const char *name, const permissions &perm)
   :  m_mut(open_or_create_t(), name, perm)
{}
コード例 #3
0
 windows_named_recursive_mutex(open_or_create_t, const char *name, const permissions &perm = permissions())
     : windows_named_mutex(open_or_create_t(), name, perm)
 {}
コード例 #4
0
 //!Opens or creates a global condition with a name.
 //!If the condition is created, this call is equivalent to
 //!named_condition_any(create_only_t, ... )
 //!If the condition is already created, this call is equivalent
 //!named_condition_any(open_only_t, ... )
 //!Does not throw
 named_condition_any(open_or_create_t, const char *name, const permissions &perm = permissions())
    :  m_cond(open_or_create_t(), name, perm)
 {}