10 namespace launchdarkly {
36 using SetType = std::set<AttributeReference>;
48 [[nodiscard]] std::string
const&
Component(std::size_t depth)
const;
56 [[nodiscard]] std::size_t
Depth()
const;
63 [[nodiscard]]
bool IsKind()
const;
69 [[nodiscard]]
bool Valid()
const;
105 std::vector<std::string_view> path);
107 friend std::ostream& operator<<(std::ostream& os,
132 return components_ == other.components_;
135 bool operator==(std::vector<std::string_view>
const& path)
const {
136 return components_.size() == path.size() &&
137 std::equal(components_.begin(), components_.end(), path.begin());
141 return !(*
this == other);
144 bool operator!=(std::vector<std::string_view>
const& path)
const {
145 return !(*
this == path);
149 return components_ < rhs.components_;
157 std::string redaction_name_;
158 std::vector<std::string> components_;
159 inline static const std::string empty_;
Definition: attribute_reference.hpp:34
bool IsKind() const
Definition: attribute_reference.cpp:215
static AttributeReference FromReferenceStr(std::string ref_str)
Definition: attribute_reference.cpp:200
std::string const & RedactionName() const
Definition: attribute_reference.cpp:223
static AttributeReference FromLiteralStr(std::string lit_str)
Definition: attribute_reference.cpp:196
bool Valid() const
Definition: attribute_reference.cpp:219
std::size_t Depth() const
Definition: attribute_reference.cpp:211
AttributeReference()
Definition: attribute_reference.cpp:233
static std::string PathToStringReference(std::vector< std::string_view > path)
Definition: attribute_reference.cpp:235
std::string const & Component(std::size_t depth) const
Definition: attribute_reference.cpp:204