Realistic 3D camera system
3D camera system components
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
asio-1.10.6
include
asio
detail
pipe_select_interrupter.hpp
Go to the documentation of this file.
1
//
2
// detail/pipe_select_interrupter.hpp
3
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
//
5
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6
//
7
// Distributed under the Boost Software License, Version 1.0. (See accompanying
8
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9
//
10
11
#ifndef ASIO_DETAIL_PIPE_SELECT_INTERRUPTER_HPP
12
#define ASIO_DETAIL_PIPE_SELECT_INTERRUPTER_HPP
13
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15
# pragma once
16
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18
#include "
asio/detail/config.hpp
"
19
20
#if !defined(ASIO_WINDOWS)
21
#if !defined(ASIO_WINDOWS_RUNTIME)
22
#if !defined(__CYGWIN__)
23
#if !defined(__SYMBIAN32__)
24
#if !defined(ASIO_HAS_EVENTFD)
25
26
#include "
asio/detail/push_options.hpp
"
27
28
namespace
asio
{
29
namespace
detail {
30
31
class
pipe_select_interrupter
32
{
33
public
:
34
// Constructor.
35
ASIO_DECL
pipe_select_interrupter
();
36
37
// Destructor.
38
ASIO_DECL
~pipe_select_interrupter
();
39
40
// Recreate the interrupter's descriptors. Used after a fork.
41
ASIO_DECL
void
recreate
();
42
43
// Interrupt the select call.
44
ASIO_DECL
void
interrupt
();
45
46
// Reset the select interrupt. Returns true if the call was interrupted.
47
ASIO_DECL
bool
reset
();
48
49
// Get the read descriptor to be passed to select.
50
int
read_descriptor
()
const
51
{
52
return
read_descriptor_;
53
}
54
55
private
:
56
// Open the descriptors. Throws on error.
57
ASIO_DECL
void
open_descriptors();
58
59
// Close the descriptors.
60
ASIO_DECL
void
close_descriptors();
61
62
// The read end of a connection used to interrupt the select call. This file
63
// descriptor is passed to select such that when it is time to stop, a single
64
// byte will be written on the other end of the connection and this
65
// descriptor will become readable.
66
int
read_descriptor_;
67
68
// The write end of a connection used to interrupt the select call. A single
69
// byte may be written to this to wake up the select which is waiting for the
70
// other end to become readable.
71
int
write_descriptor_;
72
};
73
74
}
// namespace detail
75
}
// namespace asio
76
77
#include "
asio/detail/pop_options.hpp
"
78
79
#if defined(ASIO_HEADER_ONLY)
80
# include "
asio/detail/impl/pipe_select_interrupter.ipp
"
81
#endif // defined(ASIO_HEADER_ONLY)
82
83
#endif // !defined(ASIO_HAS_EVENTFD)
84
#endif // !defined(__SYMBIAN32__)
85
#endif // !defined(__CYGWIN__)
86
#endif // !defined(ASIO_WINDOWS_RUNTIME)
87
#endif // !defined(ASIO_WINDOWS)
88
89
#endif // ASIO_DETAIL_PIPE_SELECT_INTERRUPTER_HPP
asio::detail::pipe_select_interrupter::interrupt
ASIO_DECL void interrupt()
Definition:
pipe_select_interrupter.ipp:91
config.hpp
asio::detail::pipe_select_interrupter
Definition:
pipe_select_interrupter.hpp:31
push_options.hpp
asio::detail::pipe_select_interrupter::reset
ASIO_DECL bool reset()
Definition:
pipe_select_interrupter.ipp:98
asio::detail::pipe_select_interrupter::recreate
ASIO_DECL void recreate()
Definition:
pipe_select_interrupter.ipp:81
pop_options.hpp
asio::detail::pipe_select_interrupter::pipe_select_interrupter
ASIO_DECL pipe_select_interrupter()
Definition:
pipe_select_interrupter.ipp:40
ASIO_DECL
#define ASIO_DECL
Definition:
config.hpp:43
pipe_select_interrupter.ipp
asio::detail::pipe_select_interrupter::read_descriptor
int read_descriptor() const
Definition:
pipe_select_interrupter.hpp:50
asio::detail::pipe_select_interrupter::~pipe_select_interrupter
ASIO_DECL ~pipe_select_interrupter()
Definition:
pipe_select_interrupter.ipp:68
asio
Definition:
async_result.hpp:23
Generated by
1.8.11