mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
Conditional compilation
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
#include "IfcFile.h"
|
#include "IfcFile.h"
|
||||||
#include "IfcLogger.h"
|
#include "IfcLogger.h"
|
||||||
|
|
||||||
|
#ifdef IFOPSH_WITH_ROCKSDB
|
||||||
#include <rocksdb/table.h>
|
#include <rocksdb/table.h>
|
||||||
#include <rocksdb/convenience.h>
|
#include <rocksdb/convenience.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
IfcParse::parse_context::~parse_context() {
|
IfcParse::parse_context::~parse_context() {
|
||||||
for (auto& t : tokens_) {
|
for (auto& t : tokens_) {
|
||||||
@@ -462,7 +464,9 @@ IfcParse::impl::rocks_db_file_storage::rocks_db_file_storage(const std::string&
|
|||||||
// @todo by_identity is probably not correct here, this mapping is Name -> Identity, so Fn should have access to full pair?
|
// @todo by_identity is probably not correct here, this mapping is Name -> Identity, so Fn should have access to full pair?
|
||||||
// , byidentity_(&byid_, [this](size_t v) { return assert_existance(v, by_identity); }, [](IfcUtil::IfcBaseClass* v) { return v->identity(); })
|
// , byidentity_(&byid_, [this](size_t v) { return assert_existance(v, by_identity); }, [](IfcUtil::IfcBaseClass* v) { return v->identity(); })
|
||||||
{
|
{
|
||||||
|
#ifdef IFOPSH_WITH_ROCKSDB
|
||||||
wopts.disableWAL = true;
|
wopts.disableWAL = true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
IfcParse::impl::rocks_db_file_storage::~rocks_db_file_storage()
|
IfcParse::impl::rocks_db_file_storage::~rocks_db_file_storage()
|
||||||
|
|||||||
@@ -2529,6 +2529,7 @@ std::vector<int> IfcFile::get_inverse_indices(int instance_id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if constexpr (std::is_same_v<std::decay_t<decltype(x)>, impl::rocks_db_file_storage>) {
|
} else if constexpr (std::is_same_v<std::decay_t<decltype(x)>, impl::rocks_db_file_storage>) {
|
||||||
|
#ifdef IFOPSH_WITH_ROCKSDB
|
||||||
// @todo no lower/upper_bounds() implemented yet
|
// @todo no lower/upper_bounds() implemented yet
|
||||||
auto prefix = "v|" + std::to_string(instance_id) + "|";
|
auto prefix = "v|" + std::to_string(instance_id) + "|";
|
||||||
auto it = std::unique_ptr<rocksdb::Iterator>(x.db->NewIterator(rocksdb::ReadOptions()));
|
auto it = std::unique_ptr<rocksdb::Iterator>(x.db->NewIterator(rocksdb::ReadOptions()));
|
||||||
@@ -2542,7 +2543,7 @@ std::vector<int> IfcFile::get_inverse_indices(int instance_id) {
|
|||||||
}
|
}
|
||||||
it->Next();
|
it->Next();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}, storage_);
|
}, storage_);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user