| 7 | #include "../ifcparse/IfcLogger.h" |
| 8 | |
| 9 | RocksDbSerializer::RocksDbSerializer(IfcParse::IfcFile* file, const std::string& rocksdb_filename) |
| 10 | : file_(file) |
| 11 | , rocksdb_filename_(rocksdb_filename) |
| 12 | { |
| 13 | /*rocksdb::Options options; |
| 14 | options.create_if_missing = true; |
| 15 | options.merge_operator.reset(new ConcatenateIdMergeOperator()); |
| 16 | rocksdb::Status status = rocksdb::DB::Open(options, rocksdb_filename, &db_);*/ |
| 17 | |
| 18 | output_file_ = new IfcParse::IfcFile(file->schema(), IfcParse::FT_ROCKSDB, rocksdb_filename_); |
| 19 | |
| 20 | // We promise never to add the same instance twice |
| 21 | output_file_->check_existance_before_adding = false; |
| 22 | // We only copy one file into an empty container so units will match |
| 23 | output_file_->calculate_unit_factors = false; |
| 24 | } |
| 25 | |
| 26 | RocksDbSerializer::RocksDbSerializer(const std::string& input_filename, const std::string& rocksdb_filename, bool stream) |
| 27 | : file_(input_filename) |
no test coverage detected