Struct in_memory_file_storage

Nested Relationships

Nested Types

Struct Documentation

struct in_memory_file_storage

Public Types

typedef std::map<const ifcopenshell::declaration*, std::vector<express::base>> entities_by_type
typedef std::unordered_map<uint32_t, shared_pointer_type> entity_instance_by_name_storage
typedef map_transformer<entity_instance_by_name_storage, std::function<express::base(shared_pointer_type)>> entity_instance_by_name
typedef std::unordered_map<uint32_t, shared_pointer_type> type_instance_by_name
typedef std::unordered_map<std::array<char, 22>, express::base, guid_key_hash> entity_instance_by_guid
typedef inverse_index entities_by_ref
typedef entity_instance_by_name::iterator iterator

Public Functions

inline std::vector<shared_pointer_type> steal_instances()
bool index_lazily(const std::string &path, const ifcopenshell::schema_definition *&schema, unsigned int &max_id, const std::set<std::string> &types_to_bypass)
void materialize(instance_data *data)
inline in_memory_file_storage(ifcopenshell::file *owner_file = nullptr, ifcopenshell::logger &logger = ifcopenshell::logger::root())
in_memory_file_storage(const in_memory_file_storage &other) = delete
in_memory_file_storage(const in_memory_file_storage &&other) = delete
~in_memory_file_storage()
template<typename Reader>
shared_pointer_type load(ifcopenshell::spf_lexer<Reader> *tokens, std::optional<size_t> entity_instance_name, const ifcopenshell::declaration *declaration, const ifcopenshell::entity *entity, int attribute_index = -1, bool coerce_attribute_count = true)
template<typename Reader, typename Storage>
Storage load_attributes(ifcopenshell::spf_lexer<Reader> *tokens, std::optional<size_t> entity_instance_name, const ifcopenshell::declaration *declaration, const ifcopenshell::entity *entity, int attribute_index = -1)
void resolve_instance_references(const shared_pointer_type &data, const std::vector<unsigned> &bypassed)
void register_inverse(unsigned referenced_id, const ifcopenshell::entity *from_entity, int instance_id, int attribute_index)
void unregister_inverse(unsigned referenced_id, const ifcopenshell::entity *from_entity, const express::base &entity, int attribute_index)
template<typename Reader>
void read_from_stream(Reader *stream, const ifcopenshell::schema_definition *&schema, unsigned int &max_id, const std::set<std::string> &types_to_bypass)
express::base instance_by_id(int instance_id)
inline void sort_type_lists()
inline void add_type_ref(const express::base &new_entity)
inline void remove_type_ref(const express::base &entity)
void process_deletion_inverse(const express::base &entity)
template<typename T>
T create(int instance_id = -1)
express::base create(const ifcopenshell::declaration *declaration, int instance_id = -1)

Public Members

std::vector<shared_pointer_type> read_simple_type_instances
std::reference_wrapper<ifcopenshell::logger> logger_
ifcopenshell::file *file
const ifcopenshell::schema_definition *schema
unresolved_references *references_to_resolve = nullptr
bool resolve_references_in_place = false
bool lazy_ = false
bool register_inverses_ = true
std::unique_ptr<lazy_source, void (*)(lazy_source*)> lazy_source_ = {nullptr, nullptr}
std::vector<unsigned> lazy_bypassed_
std::vector<std::pair<uint32_t, uint64_t>> lazy_offsets_
entity_instance_by_name_storage byid_
type_instance_by_name tbyid_
entities_by_type bytype_excl_
entities_by_ref byref_excl_
entity_instance_by_guid byguid_
entity_instance_by_name byid_read_
file_open_status good_ = file_open_status::SUCCESS

Public Static Functions

static inline bool guid_key(const std::string &text, std::array<char, 22> &key)
static inline bool id_before(const express::base &instance, uint32_t id)
static inline bool id_after(uint32_t id, const express::base &instance)
static inline void sort_type_list(std::vector<express::base> &instances)
struct guid_key_hash

Public Functions

inline size_t operator()(const std::array<char, 22> &key) const