diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/resource/registry.h | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 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 fe67702cbc..a15e000e0a 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); + } + }; +} |