aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/resource/resource.h
blob: 18aa5bd6b21357d6802806240390423ca734b3da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once 
 
#include <util/generic/string.h>
#include <util/generic/strbuf.h> 
#include <util/generic/vector.h> 
 
namespace NResource { 
    struct TResource { 
        TStringBuf Key; 
        TString Data;
    }; 
 
    typedef TVector<TResource> TResources;
 
    TString Find(const TStringBuf key);
    bool FindExact(const TStringBuf key, TString* out);
    //perform full scan for now 
    void FindMatch(const TStringBuf subkey, TResources* out);
    size_t Count() noexcept;
    TStringBuf KeyByIndex(size_t idx); 
    TVector<TStringBuf> ListAllKeys();
}