Kea: config_backend_dhcp6_mgr.cc Source File

| Kea 3.2.0-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>
8#include <dhcpsrv/config_backend_dhcp6_mgr.h>
9
10#include <boost/scoped_ptr.hpp>
11
12namespace isc {
13namespace dhcp {
14
15boost::scoped_ptr<ConfigBackendDHCPv6Mgr>&
16ConfigBackendDHCPv6Mgr::getConfigBackendDHCPv6MgrPtr() {
17 static boost::scoped_ptr<ConfigBackendDHCPv6Mgr> cb_dhcp6_mgr;
18 return (cb_dhcp6_mgr);
19}
20
21void
22ConfigBackendDHCPv6Mgr::create() {
23 getConfigBackendDHCPv6MgrPtr().reset(new ConfigBackendDHCPv6Mgr());
24}
25
26void
27ConfigBackendDHCPv6Mgr::destroy() {
28 getConfigBackendDHCPv6MgrPtr().reset();
29}
30
31 ConfigBackendDHCPv6Mgr&
32ConfigBackendDHCPv6Mgr::instance() {
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
isc::dhcp::ConfigBackendDHCPv6Mgr
Configuration Backend Manager for DHCPv6 servers.
Definition config_backend_dhcp6_mgr.h:34
isc::dhcp::ConfigBackendDHCPv6Mgr::create
static void create()
Creates new instance of the ConfigBackendDHCPv6Mgr.
Definition config_backend_dhcp6_mgr.cc:22
isc::dhcp::ConfigBackendDHCPv6Mgr::destroy
static void destroy()
Destroys the instance of the ConfigBackendDHCPv6Mgr.
Definition config_backend_dhcp6_mgr.cc:27
isc::dhcp::ConfigBackendDHCPv6Mgr::instance
static ConfigBackendDHCPv6Mgr & instance()
Returns a sole instance of the ConfigBackendDHCPv6Mgr.
Definition config_backend_dhcp6_mgr.cc:32
config_backend_dhcp6_mgr.h
isc::dhcp
Definition dhcp4/client_handler.cc:20
isc
Defines the logger used by the top-level component of kea-lfc.
Definition check_exists_add.cc:18