cpp-hocon 0.3.0
Loading...
Searching...
No Matches
config_origin.hpp
1#pragma once
2
3#include "types.hpp"
4#include <memory>
5#include <string>
6#include <vector>
7#include "export.h"
8
9namespace hocon {
10
32 public:
39 LIBCPP_HOCON_EXPORT virtual std::string const& description() const = 0;
40
58 LIBCPP_HOCON_EXPORT virtual shared_origin with_line_number(int line_number) const = 0;
59
66 LIBCPP_HOCON_EXPORT virtual int line_number() const = 0;
67
78 LIBCPP_HOCON_EXPORT virtual std::vector<std::string> const& comments() const = 0;
79
95 LIBCPP_HOCON_EXPORT virtual shared_origin with_comments(std::vector<std::string> comments) const = 0;
96 };
97
98} // namespace hocon
Represents the origin (such as filename and line number) of a config_value for use in error messages.
virtual LIBCPP_HOCON_EXPORT shared_origin with_comments(std::vector< std::string > comments) const =0
Returns a config_origin based on this one, but with the given comments.
virtual LIBCPP_HOCON_EXPORT int line_number() const =0
Returns a line number where the value or exception originated.
virtual LIBCPP_HOCON_EXPORT std::string const & description() const =0
Returns a string describing the origin of a value or exception.
virtual LIBCPP_HOCON_EXPORT shared_origin with_line_number(int line_number) const =0
Returns a ConfigOrigin based on this one, but with the given line number.
virtual LIBCPP_HOCON_EXPORT std::vector< std::string > const & comments() const =0
Returns any comments that appeared to "go with" this place in the file.
Factory for creating config_document instances.
Definition: config.hpp:18