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
scoped_ptr.hpp
Go to the documentation of this file.
1
//
2
// detail/scoped_ptr.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_SCOPED_PTR_HPP
12
#define ASIO_DETAIL_SCOPED_PTR_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
#include "
asio/detail/push_options.hpp
"
21
22
namespace
asio
{
23
namespace
detail {
24
25
template
<
typename
T>
26
class
scoped_ptr
27
{
28
public
:
29
// Constructor.
30
explicit
scoped_ptr
(T* p = 0)
31
: p_(p)
32
{
33
}
34
35
// Destructor.
36
~scoped_ptr
()
37
{
38
delete
p_;
39
}
40
41
// Access.
42
T*
get
()
43
{
44
return
p_;
45
}
46
47
// Access.
48
T*
operator->
()
49
{
50
return
p_;
51
}
52
53
// Dereference.
54
T&
operator*
()
55
{
56
return
*p_;
57
}
58
59
// Reset pointer.
60
void
reset
(T* p = 0)
61
{
62
delete
p_;
63
p_ = p;
64
}
65
66
private
:
67
// Disallow copying and assignment.
68
scoped_ptr
(
const
scoped_ptr
&);
69
scoped_ptr
& operator=(
const
scoped_ptr
&);
70
71
T* p_;
72
};
73
74
}
// namespace detail
75
}
// namespace asio
76
77
#include "
asio/detail/pop_options.hpp
"
78
79
#endif // ASIO_DETAIL_SCOPED_PTR_HPP
asio::detail::scoped_ptr::operator*
T & operator*()
Definition:
scoped_ptr.hpp:54
config.hpp
push_options.hpp
asio::detail::scoped_ptr::operator->
T * operator->()
Definition:
scoped_ptr.hpp:48
pop_options.hpp
asio::detail::scoped_ptr::reset
void reset(T *p=0)
Definition:
scoped_ptr.hpp:60
asio::detail::scoped_ptr
Definition:
scoped_ptr.hpp:26
asio::detail::scoped_ptr::scoped_ptr
scoped_ptr(T *p=0)
Definition:
scoped_ptr.hpp:30
asio
Definition:
async_result.hpp:23
asio::detail::scoped_ptr::~scoped_ptr
~scoped_ptr()
Definition:
scoped_ptr.hpp:36
Generated by
1.8.11