Line data Source code
1 : /**
2 : * @file
3 : *
4 : * @brief
5 : *
6 : * @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
7 : */
8 :
9 : #include <backendbuilder.hpp>
10 : #include <backends.hpp>
11 :
12 : #include <iostream>
13 :
14 0 : int main ()
15 : {
16 : using namespace kdb;
17 : using namespace kdb::tools;
18 0 : MountBackendBuilder b;
19 0 : b.setMountpoint (Key ("/", KEY_CASCADING_NAME, KEY_END), KeySet (0, KS_END));
20 0 : b.addPlugin (PluginSpec ("resolver"));
21 0 : b.addPlugin (PluginSpec ("dump"));
22 0 : b.useConfigFile ("file.ecf");
23 0 : b.validated ();
24 :
25 0 : KeySet mountConfig;
26 0 : b.serialize (mountConfig);
27 :
28 : mountConfig.rewind ();
29 0 : while (mountConfig.next ())
30 : {
31 0 : std::cout << mountConfig.current ().getName () << " = " << mountConfig.current ().getString () << std::endl;
32 : }
33 0 : }
|