| 65 | |
| 66 | template<typename T> |
| 67 | inline bool dispatch_has_(AttributeValue::pointer_type array_, uint8_t storage_model_, size_t instance_name_, const IfcParse::declaration* entity_or_type, uint8_t index_) |
| 68 | { |
| 69 | if (storage_model_ == 0) { |
| 70 | return array_.storage_ptr->has<T>(index_); |
| 71 | } |
| 72 | #ifdef IFOPSH_WITH_ROCKSDB |
| 73 | else { |
| 74 | std::string str; |
| 75 | const bool is_header = entity_or_type->schema() == &Header_section_schema::get_schema(); |
| 76 | array_.db_ptr->db->Get(rocksdb::ReadOptions{}, |
| 77 | (is_header ? "h|" : (entity_or_type->as_entity() ? "i|" : "t|")) + |
| 78 | (is_header ? entity_or_type->name() : std::to_string(instance_name_)) + "|" + |
| 79 | std::to_string(index_), &str); |
| 80 | if constexpr (std::is_same_v<T, Blank>) { |
| 81 | if (str.size() == 0) { |
| 82 | return true; |
| 83 | } |
| 84 | } |
| 85 | return str[0] == TypeEncoder::encode_type<T>(); |
| 86 | } |
| 87 | #endif |
| 88 | } |
| 89 | |
| 90 | inline size_t dispatch_index_(AttributeValue::pointer_type array_, uint8_t storage_model_, size_t instance_name_, const IfcParse::declaration* entity_or_type, uint8_t index_) |
| 91 | { |