| 498 | |
| 499 | template<typename T> |
| 500 | void rocks_db_attribute_storage::set(void* storage, const IfcParse::declaration* decl, std::size_t identity, std::size_t index, const T& value) |
| 501 | { |
| 502 | const bool is_header = decl->schema() == &Header_section_schema::get_schema(); |
| 503 | IfcParse::impl::rocks_db_file_storage* rdb_storage = (IfcParse::impl::rocks_db_file_storage*)storage; |
| 504 | std::string v; |
| 505 | impl::serialize(v, value); |
| 506 | rdb_storage->db->Put( |
| 507 | rdb_storage->wopts, |
| 508 | (is_header ? "h|" : (decl->as_entity() ? "i|" : "t|")) + |
| 509 | (is_header ? decl->name() : std::to_string(identity)) + "|" + |
| 510 | std::to_string(index), v); |
| 511 | } |
| 512 | |
| 513 | template IFC_PARSE_API void rocks_db_attribute_storage::set<Blank>(void* storage, const IfcParse::declaration* decl, std::size_t identity, size_t index, const Blank& value); |
| 514 | template IFC_PARSE_API void rocks_db_attribute_storage::set<int>(void* storage, const IfcParse::declaration* decl, std::size_t identity, size_t index, const int& value); |
no test coverage detected