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

Method RocksDbSerializer

src/serializers/RocksDbSerializer.cpp:9–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include "../ifcparse/IfcLogger.h"
8
9RocksDbSerializer::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
26RocksDbSerializer::RocksDbSerializer(const std::string& input_filename, const std::string& rocksdb_filename, bool stream)
27 : file_(input_filename)

Callers 1

convert_path_to_rocksdbFunction · 0.80

Calls 1

schemaMethod · 0.45

Tested by

no test coverage detected