2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
15 \brief ConfigFile inline non-template implementation */
17 #include "ConfigFile.ih"
21 #define prefix_ inline
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 // senf::console::detail::ConfigFileSource
28 prefix_ senf::console::detail::ConfigFileSource::ptr
29 senf::console::detail::ConfigFileSource::create(std::string const & filename)
31 return ptr(new ConfigFileSource(filename));
34 prefix_ senf::console::detail::ConfigFileSource::ptr
35 senf::console::detail::ConfigFileSource::ignoreMissing()
37 ignoreMissing_ = true;
41 prefix_ senf::console::detail::ConfigFileSource::ConfigFileSource(std::string const & filename)
42 : filename_ (filename), ignoreMissing_ (false)
46 //-/////////////////////////////////////////////////////////////////////////////////////////////////
47 // senf::console::ConfigFile
49 prefix_ senf::console::ConfigFile::ConfigFile(std::string const & filename,
51 : detail::BundleMixin(root), self_ (add(detail::ConfigFileSource::create(filename)))
54 prefix_ void senf::console::ConfigFile::ignoreMissing()
56 self_.ignoreMissing();
59 //-/////////////////////////////////////////////////////////////////////////////////////////////////
61 prefix_ senf::console::detail::ConfigFileSource::ptr
62 senf::console::FileConfig(std::string const & filename)
64 return detail::ConfigFileSource::create(filename);
67 //-/////////////////////////////////////////////////////////////////////////////////////////////////
75 // c-file-style: "senf"
76 // indent-tabs-mode: nil
77 // ispell-local-dictionary: "american"
78 // compile-command: "scons -u test"