MCPcopy Create free account
hub / github.com/catboost/catboost / Store

Method Store

library/cpp/resource/registry.cpp:56–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 }
55
56 void Store(const TStringBuf key, const TStringBuf data) override {
57 auto kk = ToK(key);
58
59 const auto [it, unique] = try_emplace(kk, nullptr);
60 if (!unique) {
61 const auto& [_, value] = *it->second;
62 if (value != data) {
63 ReportRedefinitionError(key, data, kk, *it->second);
64 Y_UNREACHABLE();
65 }
66 } else {
67 D_.push_back(TDescriptor(key, data));
68 it->second = &D_.back();
69 }
70
71 Y_ABORT_UNLESS(size() == Count(), "size mismatch");
72 }
73
74 bool Has(const TStringBuf key) const override {
75 return contains(ToK(key));

Callers 3

TRegHelperMethod · 0.45
LightRegisterIMethod · 0.45
LightRegisterSMethod · 0.45

Calls 6

ReportRedefinitionErrorFunction · 0.85
TDescriptorClass · 0.85
sizeFunction · 0.50
CountFunction · 0.50
push_backMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected