1 // Copyright (C) 2016 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 9 #include <hooks/libinfo.h> 10 11 namespace isc { 12 namespace hooks { 13 14 /// @brief Extracts names from HookLibsCollection 15 /// 16 /// @param libraries Hook libraries collection 17 /// @return vector of strings with library names 18 std::vector<std::string> extractNames(const isc::hooks::HookLibsCollection & libraries)19extractNames(const isc::hooks::HookLibsCollection& libraries) { 20 std::vector<std::string> names; 21 22 for (isc::hooks::HookLibsCollection::const_iterator it = libraries.begin(); 23 it != libraries.end(); ++it) { 24 names.push_back(it->first); 25 } 26 return (names); 27 } 28 29 }; 30 }; 31