Kea
1.9.9-git
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
rdata_pimpl_holder.h
Go to the documentation of this file.
1
// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
2
//
3
// This Source Code Form is subject to the terms of the Mozilla Public
4
// License, v. 2.0. If a copy of the MPL was not distributed with this
5
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7
#ifndef DNS_RDATA_PIMPL_HOLDER_H
8
#define DNS_RDATA_PIMPL_HOLDER_H 1
9
10
#include <boost/noncopyable.hpp>
11
12
#include <cstddef>
// for NULL
13
14
namespace
isc
{
15
namespace
dns {
16
namespace
rdata {
17
18
template
<
typename
T>
19
class
RdataPimplHolder
: boost::noncopyable {
20
public
:
21
RdataPimplHolder
(T* obj = NULL) :
22
obj_(obj)
23
{}
24
25
~RdataPimplHolder
() {
26
delete
obj_;
27
}
28
29
void
reset
(T* obj = NULL) {
30
delete
obj_;
31
obj_ = obj;
32
}
33
34
T*
get
() {
35
return
(obj_);
36
}
37
38
T*
release
() {
39
T* obj = obj_;
40
obj_ = NULL;
41
return
(obj);
42
}
43
44
private
:
45
T* obj_;
46
};
47
48
}
// namespace rdata
49
}
// namespace dns
50
}
// namespace isc
51
52
#endif // DNS_RDATA_PIMPL_HOLDER_H
isc::dns::rdata::RdataPimplHolder::reset
void reset(T *obj=NULL)
Definition:
rdata_pimpl_holder.h:29
isc::dns::rdata::RdataPimplHolder::RdataPimplHolder
RdataPimplHolder(T *obj=NULL)
Definition:
rdata_pimpl_holder.h:21
isc::dns::rdata::RdataPimplHolder
Definition:
rdata_pimpl_holder.h:19
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition:
agent_parser.cc:143
isc::dns::rdata::RdataPimplHolder::~RdataPimplHolder
~RdataPimplHolder()
Definition:
rdata_pimpl_holder.h:25
isc::dns::rdata::RdataPimplHolder::release
T * release()
Definition:
rdata_pimpl_holder.h:38
src
lib
dns
rdata_pimpl_holder.h
Generated on Wed Sep 15 2021 10:48:33 for Kea by
1.8.9.1