/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
library/cpp/protobuf/json/unknown_fields_collector.h
29 строк
830 B
innokentii
Add basic unknown fields collector
29 сен 2023, 01:19
29 сен 2023, 01:19
67546c3
Код
Авторство
О чём код?
#pragma once #include <util/generic/string.h> namespace google { namespace protobuf { class FieldDescriptor; class Descriptor; } } namespace NProtobufJson { /* Methods OnEnter.../OnLeave... are called on every field of structure * during traverse and should be used to build context * Method OnUnknownField are called every time when field which can't * be mapped */ struct IUnknownFieldsCollector { virtual ~IUnknownFieldsCollector() = default; virtual void OnEnterMapItem(const TString& key) = 0; virtual void OnLeaveMapItem() = 0; virtual void OnEnterArrayItem(ui64 id) = 0; virtual void OnLeaveArrayItem() = 0; virtual void OnUnknownField(const TString& key, const google::protobuf::Descriptor& value) = 0; }; }