75#include "cppzmqzoltanext/czze_export.h"
84class CZZE_EXPORT
zpl_error :
public std::runtime_error {
86 using std::runtime_error::runtime_error;
107 std::size_t line()
const noexcept;
118 using zpl_error::zpl_error;
171 static zpl_config_t from_file(
const std::string& file_path);
182 void load(std::istream& input);
193 void load_from_file(
const std::string& file_path);
200 bool empty()
const noexcept;
207 const std::string&
name()
const noexcept;
214 const std::string&
value()
const noexcept;
222 bool contains(
const std::string& path)
const noexcept;
231 const std::string& get(
const std::string& path)
const;
239 std::optional<std::string> try_get(
const std::string& path)
const noexcept;
248 std::string get_or(
const std::string& path, std::string default_value)
const noexcept;
265 std::optional<zpl_config_t> try_child(
const std::string& path)
const noexcept;
272 std::vector<zpl_config_t> children()
const noexcept;
279 std::shared_ptr<impl_t> _impl;
ZPL configuration tree loaded from text or file.
Base exception for ZPL configuration errors.
Exception thrown when a badly formatted ZPL input is encountered during parsing.
Exception thrown when a requested property is missing.
std::string value
Raw string value.
std::string name
Node name segment.