Function get_table

Synopsis

#include <include/cpptoml.h>

std::shared_ptr< table > get_table(const std::string &key) const

Description

Obtains a table for a given key, if possible.

Mentioned in

Source

Lines 1376-1381 in include/cpptoml.h.

std::shared_ptr<table> get_table(const std::string& key) const
{
    if (contains(key) && get(key)->is_table())
        return std::static_pointer_cast<table>(get(key));
    return nullptr;
}





Add Discussion as Guest

Log in