Kea 2.7.4
config_backend_dhcp4_mgr.cc
Go to the documentation of this file.
1// Copyright (C) 2018-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
12namespace isc {
13namespace dhcp {
14
15boost::scoped_ptr<ConfigBackendDHCPv4Mgr>&
16ConfigBackendDHCPv4Mgr::getConfigBackendDHCPv4MgrPtr() {
17 static boost::scoped_ptr<ConfigBackendDHCPv4Mgr> cb_dhcp4_mgr;
18 return (cb_dhcp4_mgr);
19}
20
21void
23 getConfigBackendDHCPv4MgrPtr().reset(new ConfigBackendDHCPv4Mgr());
24}
25
26void
28 getConfigBackendDHCPv4MgrPtr().reset();
29}
30
33 boost::scoped_ptr<ConfigBackendDHCPv4Mgr>& cb_dhcp4_mgr = getConfigBackendDHCPv4MgrPtr();
34 if (!cb_dhcp4_mgr) {
35 create();
36 }
37 return (*cb_dhcp4_mgr);
38}
39
40} // end of isc::dhcp namespace
41} // end of isc namespace
Configuration Backend Manager for DHPCv4 servers.
static void create()
Creates new instance of the ConfigBackendDHCPv4Mgr.
static void destroy()
Destroys the instance of the ConfigBackendDHCPv4Mgr.
static ConfigBackendDHCPv4Mgr & instance()
Returns a sole instance of the ConfigBackendDHCPv4Mgr.
Defines the logger used by the top-level component of kea-lfc.