Kea  1.9.9-git
config_backend_dhcp6_mgr.cc
Go to the documentation of this file.
1 // Copyright (C) 2019 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 #include <config.h>
9 
10 #include <boost/scoped_ptr.hpp>
11 
12 namespace isc {
13 namespace dhcp {
14 
15 boost::scoped_ptr<ConfigBackendDHCPv6Mgr>&
16 ConfigBackendDHCPv6Mgr::getConfigBackendDHCPv6MgrPtr() {
17  static boost::scoped_ptr<ConfigBackendDHCPv6Mgr> cb_dhcp6_mgr;
18  return (cb_dhcp6_mgr);
19 }
20 
21 void
23  getConfigBackendDHCPv6MgrPtr().reset(new ConfigBackendDHCPv6Mgr());
24 }
25 
26 void
28  getConfigBackendDHCPv6MgrPtr().reset();
29 }
30 
33  boost::scoped_ptr<ConfigBackendDHCPv6Mgr>& cb_dhcp6_mgr = getConfigBackendDHCPv6MgrPtr();
34  if (!cb_dhcp6_mgr) {
35  create();
36  }
37  return (*cb_dhcp6_mgr);
38 }
39 
40 } // end of isc::dhcp namespace
41 } // end of isc namespace
static ConfigBackendDHCPv6Mgr & instance()
Returns a sole instance of the ConfigBackendDHCPv6Mgr.
Configuration Backend Manager for DHPCv6 servers.
Defines the logger used by the top-level component of kea-dhcp-ddns.
static void destroy()
Destroys the instance of the ConfigBackendDHCPv6Mgr.
static void create()
Creates new instance of the ConfigBackendDHCPv6Mgr.