1 // Copyright (C) 2017-2020 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 <cc/user_context.h> 9 10 11 namespace isc { 12 namespace data { 13 14 void contextToElement(ElementPtr map) const15UserContext::contextToElement(ElementPtr map) const { 16 // Set user-context extracting comment 17 ConstElementPtr context = getContext(); 18 if (context) { 19 map->set("user-context", context); 20 } 21 } 22 23 ElementPtr toElement(ConstElementPtr map)24UserContext::toElement(ConstElementPtr map) { 25 ElementPtr result = isc::data::copy(map); 26 return (result); 27 } 28 29 }; // end of isc::dhcp namespace 30 }; // end of isc namespace 31