aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/util/path.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/protobuf/util/path.h
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/protobuf/util/path.h')
-rw-r--r--library/cpp/protobuf/util/path.h64
1 files changed, 32 insertions, 32 deletions
diff --git a/library/cpp/protobuf/util/path.h b/library/cpp/protobuf/util/path.h
index 487f643a2d6..99cf1984157 100644
--- a/library/cpp/protobuf/util/path.h
+++ b/library/cpp/protobuf/util/path.h
@@ -6,47 +6,47 @@
#include <util/generic/vector.h>
namespace NProtoBuf {
- class TFieldPath {
- public:
- TFieldPath();
- TFieldPath(const Descriptor* msgType, const TStringBuf& path); // throws exception if path doesn't exist
- TFieldPath(const TVector<const FieldDescriptor*>& path);
+ class TFieldPath {
+ public:
+ TFieldPath();
+ TFieldPath(const Descriptor* msgType, const TStringBuf& path); // throws exception if path doesn't exist
+ TFieldPath(const TVector<const FieldDescriptor*>& path);
TFieldPath(const TFieldPath&) = default;
TFieldPath& operator=(const TFieldPath&) = default;
- bool InitUnsafe(const Descriptor* msgType, const TStringBuf path); // noexcept
- void Init(const Descriptor* msgType, const TStringBuf& path); // throws
+ bool InitUnsafe(const Descriptor* msgType, const TStringBuf path); // noexcept
+ void Init(const Descriptor* msgType, const TStringBuf& path); // throws
- const TVector<const FieldDescriptor*>& Fields() const {
- return Path;
- }
+ const TVector<const FieldDescriptor*>& Fields() const {
+ return Path;
+ }
- void AddField(const FieldDescriptor* field) {
- Path.push_back(field);
- }
+ void AddField(const FieldDescriptor* field) {
+ Path.push_back(field);
+ }
- const Descriptor* ParentType() const {
- return Empty() ? nullptr : Path.front()->containing_type();
- }
+ const Descriptor* ParentType() const {
+ return Empty() ? nullptr : Path.front()->containing_type();
+ }
- const FieldDescriptor* FieldDescr() const {
- return Empty() ? nullptr : Path.back();
- }
+ const FieldDescriptor* FieldDescr() const {
+ return Empty() ? nullptr : Path.back();
+ }
- bool Empty() const {
- return Path.empty();
- }
+ bool Empty() const {
+ return Path.empty();
+ }
- explicit operator bool() const {
- return !Empty();
- }
+ explicit operator bool() const {
+ return !Empty();
+ }
- bool operator!() const {
- return Empty();
- }
+ bool operator!() const {
+ return Empty();
+ }
- private:
- TVector<const FieldDescriptor*> Path;
- };
+ private:
+ TVector<const FieldDescriptor*> Path;
+ };
-}
+}