diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/resource/registry.h | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/resource/registry.h')
-rw-r--r-- | library/cpp/resource/registry.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/library/cpp/resource/registry.h b/library/cpp/resource/registry.h index a15e000e0a..fe67702cbc 100644 --- a/library/cpp/resource/registry.h +++ b/library/cpp/resource/registry.h @@ -1,35 +1,35 @@ -#pragma once - +#pragma once + #include <util/generic/string.h> -#include <util/generic/strbuf.h> - -#include "resource.h" - -namespace NResource { +#include <util/generic/strbuf.h> + +#include "resource.h" + +namespace NResource { TString Compress(const TStringBuf data); TString Decompress(const TStringBuf data); - - class IMatch { - public: - virtual void OnMatch(const TResource& res) = 0; - }; - - class IStore { - public: + + class IMatch { + public: + virtual void OnMatch(const TResource& res) = 0; + }; + + class IStore { + public: virtual void Store(const TStringBuf key, const TStringBuf data) = 0; virtual bool FindExact(const TStringBuf key, TString* out) const = 0; virtual void FindMatch(const TStringBuf subkey, IMatch& cb) const = 0; virtual size_t Count() const noexcept = 0; - virtual TStringBuf KeyByIndex(size_t idx) const = 0; + virtual TStringBuf KeyByIndex(size_t idx) const = 0; virtual ~IStore() { } - }; - - IStore* CommonStore(); - - struct TRegHelper { + }; + + IStore* CommonStore(); + + struct TRegHelper { inline TRegHelper(const TStringBuf key, const TStringBuf data) { - CommonStore()->Store(key, data); - } - }; -} + CommonStore()->Store(key, data); + } + }; +} |