Sha256: 51d81e8c985e5399a9c21c7f5696272a223f330fd2cc5c7abbc4de87237110ba

Contents?: true

Size: 1.13 KB

Versions: 16

Compression:

Stored size: 1.13 KB

Contents

#include <internal/nodes/config_node_include.hpp>
#include <internal/nodes/config_node_simple_value.hpp>

using namespace std;

namespace hocon {

    config_node_include::config_node_include(shared_node_list children,
                                             config_include_kind kind) :
        _children(move(children)), _kind(kind) { }

    token_list config_node_include::get_tokens() const {
        token_list tokens;
        for (auto&& node : _children) {
            token_list node_tokens = node->get_tokens();
            tokens.insert(tokens.end(), node_tokens.begin(), node_tokens.end());
        }
        return tokens;
    }

    shared_node_list const& config_node_include::children() const {
        return _children;
    }

    config_include_kind config_node_include::kind() const {
        return _kind;
    }

    string config_node_include::name() const {
        for (auto&& node : _children) {
            if (auto simple = dynamic_cast<const config_node_simple_value*>(node.get())) {
                return simple->get_value()->transform_to_string();
            }
        }
        return "";
    }

}  // namesapce hocon

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
facter-3.12.2.cfacter.20181217 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.12.1.cfacter.20181031 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.11.6.cfacter.20181031 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.12.1.cfacter.20181023 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.11.5.cfacter.20181022 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.12.0.cfacter.20181004 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.12.0.cfacter.20181001 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.12.0.cfacter.20180918 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.11.4.cfacter.20180821 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.11.3.cfacter.20180716 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.11.2.cfacter.20180612 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.9.6.cfacter.20180612 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.11.2.cfacter.20180606 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.9.6.cfacter.20180606 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
facter-3.11.0.cfacter.20180319 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc
cfacter-3.11.0.rc.20180314 ext/facter/cpp-hocon/lib/src/nodes/config_node_include.cc