File: config_string.hpp

package info (click to toggle)
cpp-hocon 0.3.0-1.2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,320 kB
  • sloc: cpp: 12,223; makefile: 4
file content (32 lines) | stat: -rw-r--r-- 874 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include <hocon/config_value.hpp>
#include <internal/config_util.hpp>

namespace hocon {

    enum class config_string_type { QUOTED, UNQUOTED };

    class config_string : public config_value {
    public:
        config_string(shared_origin origin, std::string text, config_string_type quoted);

        config_value::type value_type() const override;
        std::string transform_to_string() const override;

        unwrapped_value unwrapped() const override;

        bool was_quoted() const;
        bool operator==(config_value const& other) const override;

    protected:
        shared_value new_copy(shared_origin) const override;

        void render(std::string& s, int indent, bool at_root, config_render_options options) const override;

    private:
        std::string _text;
        config_string_type _quoted;
    };

}  // namespace hocon