mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-01 01:16:27 +00:00
Further implement serialization
This commit is contained in:
@@ -333,23 +333,22 @@ bool impl::serialize(std::string& val, const empty_aggregate_t& t)
|
|||||||
{
|
{
|
||||||
val.resize(1);
|
val.resize(1);
|
||||||
val[0] = TypeEncoder::encode_type<empty_aggregate_t>();
|
val[0] = TypeEncoder::encode_type<empty_aggregate_t>();
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool impl::serialize(std::string& val, const empty_aggregate_of_aggregate_t& t)
|
bool impl::serialize(std::string& val, const empty_aggregate_of_aggregate_t& t)
|
||||||
{
|
{
|
||||||
val.resize(1);
|
val.resize(1);
|
||||||
val[0] = TypeEncoder::encode_type<empty_aggregate_of_aggregate_t>();
|
val[0] = TypeEncoder::encode_type<empty_aggregate_of_aggregate_t>();
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool impl::serialize(std::string& val, const boost::logic::tribool& t)
|
bool impl::serialize(std::string& val, const boost::logic::tribool& t)
|
||||||
{
|
{
|
||||||
using T = char;
|
char tt = t == boost::logic::indeterminate ? 2 : t ? 1 : 0;
|
||||||
T tt = t == boost::logic::indeterminate ? 2 : t ? 1 : 0;
|
val.resize(sizeof(char) + 1);
|
||||||
val.resize(sizeof(T) + 1);
|
val[0] = TypeEncoder::encode_type<boost::logic::tribool>();
|
||||||
val[0] = TypeEncoder::encode_type<T>();
|
memcpy(val.data() + 1, &tt, sizeof(char));
|
||||||
memcpy(val.data() + 1, &tt, sizeof(T));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -421,6 +421,10 @@ namespace {
|
|||||||
tbo.pin_top_level_index_and_filter = true;
|
tbo.pin_top_level_index_and_filter = true;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// 28: 256MB
|
||||||
|
// 29: 512MB
|
||||||
|
// 30: 1GB
|
||||||
|
|
||||||
auto block_cache = rocksdb::NewLRUCache(1ULL << 30);
|
auto block_cache = rocksdb::NewLRUCache(1ULL << 30);
|
||||||
tbo.block_cache = block_cache;
|
tbo.block_cache = block_cache;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user