MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / constexpr

Function constexpr

src/ifcparse/IfcParse.cpp:2380–2393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2378 }
2379#ifdef IFOPSH_WITH_ROCKSDB
2380 else if constexpr (std::is_same_v<std::decay_t<decltype(x)>, impl::rocks_db_file_storage>) {
2381 // @todo no lower/upper_bounds() implemented yet
2382 auto prefix = "v|" + std::to_string(t) + "|";
2383 auto it = std::unique_ptr<rocksdb::Iterator>(x.db->NewIterator(rocksdb::ReadOptions()));
2384 it->Seek(prefix);
2385 while (it->Valid() && it->key().starts_with(prefix)) {
2386 std::vector<uint32_t> vals(it->value().size() / sizeof(uint32_t));
2387 memcpy(vals.data(), it->value().data(), it->value().size());
2388 for (auto& v : vals) {
2389 ret->push(instance_by_id(v));
2390 }
2391 it->Next();
2392 }
2393 }
2394#endif
2395 else {
2396 throw std::runtime_error("Storage not initialized");

Callers

nothing calls this directly

Calls 10

to_stringFunction · 0.85
ReadOptionsClass · 0.85
dataMethod · 0.80
keyMethod · 0.45
sizeMethod · 0.45
valueMethod · 0.45
pushMethod · 0.45
NextMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected