Kea  1.9.9-git
cfg_to_element.h
Go to the documentation of this file.
1 // Copyright (C) 2017 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 CFG_TO_ELEMENT_H
8 #define CFG_TO_ELEMENT_H
9 
10 #include <exceptions/exceptions.h>
11 #include <cc/data.h>
12 
13 namespace isc {
14 
20 public:
21  ToElementError(const char* file, size_t line, const char* what) :
22  isc::Exception(file, line, what) { };
23 };
24 
25 namespace data {
26 
29 struct CfgToElement {
31  virtual ~CfgToElement() { }
32 
42  virtual isc::data::ElementPtr toElement() const = 0;
43 };
44 
45 }; // namespace isc::dhcp
46 }; // namespace isc
47 
48 #endif // CFG_TO_ELEMENT_H
virtual ~CfgToElement()
Destructor.
Cannot unparse error.
boost::shared_ptr< Element > ElementPtr
Definition: data.h:20
ToElementError(const char *file, size_t line, const char *what)
Abstract class for configuration Cfg_* classes.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual isc::data::ElementPtr toElement() const =0
Unparse a configuration object.