| 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 | { |
| 92 | if (storage_model_ == 0) { |
| 93 | return array_.storage_ptr->index(index_); |
| 94 | } |
| 95 | #ifdef IFOPSH_WITH_ROCKSDB |
| 96 | else { |
| 97 | std::string str; |
| 98 | const bool is_header = entity_or_type->schema() == &Header_section_schema::get_schema(); |
| 99 | if (!array_.db_ptr->db->Get(rocksdb::ReadOptions{}, |
| 100 | (is_header ? "h|" : (entity_or_type->as_entity() ? "i|" : "t|")) + |
| 101 | (is_header ? entity_or_type->name() : std::to_string(instance_name_)) + "|" + |
| 102 | std::to_string(index_), &str).ok()) { |
| 103 | return TypeEncoder::encode_type<Blank>() - 'A'; |
| 104 | } |
| 105 | return (size_t) str[0] - 'A'; |
| 106 | } |
| 107 | #endif |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | AttributeValue::operator int() const |