#pragma once
#include <map>
#include <optional>
#include <ostream>
#include <string>
#include <string_view>
#include <vector>
namespace solidity::langutil
{
struct DebugInfoSelection
{
static DebugInfoSelection const All(bool _value = true) noexcept;
static DebugInfoSelection const None() noexcept { return All(false); }
static DebugInfoSelection const Only(bool DebugInfoSelection::* _member) noexcept;
static DebugInfoSelection const Default() noexcept { return All(); }
static std::optional<DebugInfoSelection> fromString(std::string_view _input);
static std::optional<DebugInfoSelection> fromComponents(
std::vector<std::string> const& _componentNames,
bool _acceptWildcards = false
);
bool enable(std::string _component);
bool all() const noexcept;
bool any() const noexcept;
bool none() const noexcept { return !any(); }
bool only(bool DebugInfoSelection::* _member) const noexcept { return *this == Only(_member); }
DebugInfoSelection& operator&=(DebugInfoSelection const& _other);
DebugInfoSelection& operator|=(DebugInfoSelection const& _other);
DebugInfoSelection operator&(DebugInfoSelection _other) const noexcept;
DebugInfoSelection operator|(DebugInfoSelection _other) const noexcept;
bool operator!=(DebugInfoSelection const& _other) const noexcept { return !(*this == _other); }
bool operator==(DebugInfoSelection const& _other) const noexcept;
friend std::ostream& operator<<(std::ostream& _stream, DebugInfoSelection const& _selection);
static auto const& componentMap()
{
static std::map<std::string, bool DebugInfoSelection::*> const components = {
{"location", &DebugInfoSelection::location},
{"snippet", &DebugInfoSelection::snippet},
{"ast-id", &DebugInfoSelection::astID},
};
return components;
}
bool location = false; bool snippet = false; bool astID = false; };
std::ostream& operator<<(std::ostream& _stream, DebugInfoSelection const& _selection);
}