aboutsummaryrefslogtreecommitdiff
path: root/net/nginx-util/src/uci-cxx.cpp
blob: c8805482b83a8678796480311d57ecbbcf03e625 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
#include <mutex>
#include <string>
#include <string_view>
#include <vector>

#include "uci-cxx.hpp"

auto main() -> int
{
    uci::element p = uci::package{"nginx"};
    std::cout << "package " << p.name() << "\n\n";
    for (auto s : p) {
        std::cout << "config " << s.type() << " '" << s.name() << "'\n";
        for (auto o : s) {
            for (auto i : o) {
                std::cout << "\t" << o.type() << " " << o.name() << " '" << i.name() << "'\n";
            }
        }
        std::cout << "\n";
    }
}