diff options
author | eshemchik <eshemchik@yandex-team.ru> | 2022-02-10 16:50:53 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:53 +0300 |
commit | 9905811fdc643c722d6464b8cf6661f931510f2f (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/archive/directory_models_archive_reader.h | |
parent | face8a85ff3525043b92e692a9891cd1c19519c4 (diff) | |
download | ydb-9905811fdc643c722d6464b8cf6661f931510f2f.tar.gz |
Restoring authorship annotation for <eshemchik@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/archive/directory_models_archive_reader.h')
-rw-r--r-- | library/cpp/archive/directory_models_archive_reader.h | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/library/cpp/archive/directory_models_archive_reader.h b/library/cpp/archive/directory_models_archive_reader.h index 7c479970e1..d16d6d728d 100644 --- a/library/cpp/archive/directory_models_archive_reader.h +++ b/library/cpp/archive/directory_models_archive_reader.h @@ -1,38 +1,38 @@ -#pragma once - -#include "models_archive_reader.h" - -#include <util/folder/path.h> -#include <util/generic/fwd.h> -#include <util/generic/hash.h> -#include <util/generic/ptr.h> -#include <util/generic/vector.h> - - -class IInputStream; - -class TBlob; - -class TDirectoryModelsArchiveReader : public IModelsArchiveReader { -public: +#pragma once + +#include "models_archive_reader.h" + +#include <util/folder/path.h> +#include <util/generic/fwd.h> +#include <util/generic/hash.h> +#include <util/generic/ptr.h> +#include <util/generic/vector.h> + + +class IInputStream; + +class TBlob; + +class TDirectoryModelsArchiveReader : public IModelsArchiveReader { +public: TDirectoryModelsArchiveReader(const TString& path, bool lockMemory = false, bool ownBlobs = false); - virtual ~TDirectoryModelsArchiveReader() override; - - virtual size_t Count() const noexcept override; - virtual TString KeyByIndex(size_t n) const override; - virtual bool Has(const TStringBuf key) const override; - virtual TAutoPtr<IInputStream> ObjectByKey(const TStringBuf key) const override; - virtual TBlob ObjectBlobByKey(const TStringBuf key) const override; - virtual TBlob BlobByKey(const TStringBuf key) const override; - virtual bool Compressed() const override; - -private: - TString NormalizePath(TString path) const; // in archive path works unix-like path delimiter and leading slash is neccesery + virtual ~TDirectoryModelsArchiveReader() override; + + virtual size_t Count() const noexcept override; + virtual TString KeyByIndex(size_t n) const override; + virtual bool Has(const TStringBuf key) const override; + virtual TAutoPtr<IInputStream> ObjectByKey(const TStringBuf key) const override; + virtual TBlob ObjectBlobByKey(const TStringBuf key) const override; + virtual TBlob BlobByKey(const TStringBuf key) const override; + virtual bool Compressed() const override; + +private: + TString NormalizePath(TString path) const; // in archive path works unix-like path delimiter and leading slash is neccesery void LoadFilesAndSubdirs(const TString& subPath, bool lockMemory, bool ownBlobs); - -private: - TString Path_; + +private: + TString Path_; THashMap<TString, TString> PathByKey_; - THashMap<TString, TBlob> BlobByKey_; - TVector<TString> Recs_; -}; + THashMap<TString, TBlob> BlobByKey_; + TVector<TString> Recs_; +}; |