MCPcopy Create free account
hub / github.com/activeloopai/deeplake / string_array

Class string_array

cpp/nd/impl/vector_array.hpp:165–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163};
164
165class string_array
166{
167public:
168 struct holder_t
169 {
170 explicit holder_t(std::string&& d)
171 : data(std::move(d))
172 {
173 }
174
175 std::string data;
176 };
177
178public:
179 explicit string_array(std::string&& value)
180 : value_(std::make_shared<holder_t>(std::move(value)))
181 {
182 }
183
184public:
185 enum dtype dtype() const
186 {
187 return dtype::string;
188 }
189
190 std::span<const uint8_t> data() const
191 {
192 return base::span_cast<const uint8_t>(base::span_cast(std::string_view(value_->data)));
193 }
194
195 const auto& owner() const
196 {
197 return value_;
198 }
199
200 icm::shape shape() const
201 {
202 return icm::shape();
203 }
204
205 constexpr bool is_dynamic() const noexcept
206 {
207 return false;
208 }
209
210private:
211 std::shared_ptr<holder_t> value_;
212};
213
214} // namespace impl
215

Callers 1

getMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected