MCPcopy Create free account
hub / github.com/apache/arrow / Init

Method Init

cpp/src/arrow/util/reflection_test.cc:85–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 void Fail() { obj_ = std::nullopt; }
84
85 void Init(std::string_view class_name, std::string_view repr, size_t num_properties) {
86 if (!repr.starts_with(class_name)) return Fail();
87
88 repr = repr.substr(class_name.size());
89 if (repr.empty()) return Fail();
90 if (repr.front() != '{') return Fail();
91 if (repr.back() != '}') return Fail();
92
93 repr = repr.substr(1, repr.size() - 2);
94 members_ = SplitString(repr, ',');
95 if (members_.size() != num_properties) return Fail();
96 }
97
98 template <typename Property>
99 void operator()(const Property& prop, size_t i) {

Callers

nothing calls this directly

Calls 5

SplitStringFunction · 0.85
substrMethod · 0.80
backMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected