Storage rework WIP

This commit is contained in:
Thomas Krijnen
2025-10-13 20:47:43 +02:00
parent 60d85b4259
commit 4d688170e0
15 changed files with 788 additions and 475 deletions
+7 -7
View File
@@ -125,7 +125,7 @@ namespace IfcParse {
class IfcFile;
class IfcSpfLexer;
class IfcSpfStream;
class FileReader;
enum TokenType {
Token_NONE,
@@ -142,7 +142,7 @@ namespace IfcParse {
struct Token {
IfcSpfLexer* lexer; //TODO: remove it from here
unsigned startPos;
size_t startPos;
TokenType type;
union {
char value_char; //types: OPERATOR
@@ -154,7 +154,7 @@ namespace IfcParse {
startPos(0),
type(Token_NONE) {
}
Token(IfcSpfLexer* _lexer, unsigned _startPos, unsigned /*_endPos*/, TokenType _type)
Token(IfcSpfLexer* _lexer, size_t _startPos, TokenType _type)
: lexer(_lexer),
startPos(_startPos),
type(_type) {
@@ -184,7 +184,7 @@ namespace IfcParse {
void push(IfcUtil::IfcBaseClass* inst);
IfcEntityInstanceData construct(int name, unresolved_references& references_to_resolve, const IfcParse::declaration* decl, boost::optional<size_t> expected_size, int resolve_reference_index, bool coerce_attribute_count=true);
IfcEntityInstanceData construct(boost::optional<size_t> name, unresolved_references& references_to_resolve, const IfcParse::declaration* decl, boost::optional<size_t> expected_size, int resolve_reference_index, bool coerce_attribute_count=true);
};
namespace impl {
@@ -195,7 +195,7 @@ namespace IfcParse {
}
IfcParse::IfcSpfLexer* tokens;
// IfcParse::IfcSpfStream* stream;
// IfcParse::FileReader* stream;
// Either one of these needs to be set
IfcParse::IfcFile* file;
@@ -260,7 +260,7 @@ namespace IfcParse {
entities_by_ref_t byref_excl_;
entity_instance_by_guid_t byguid_;
void load(unsigned entity_instance_name, const IfcParse::entity* entity, parse_context&, int attribute_index = -1);
void load(boost::optional<size_t> entity_instance_name, const IfcParse::entity* entity, parse_context&, int attribute_index = -1);
void try_read_semicolon() const;
void register_inverse(unsigned, const IfcParse::entity* from_entity, int inst_id, int attribute_index);
@@ -268,7 +268,7 @@ namespace IfcParse {
// @todo is this still used
IfcEntityInstanceData read(unsigned int index);
void read_from_stream(IfcParse::IfcSpfStream* stream, const IfcParse::schema_definition*& schema, unsigned int& max_id);
void read_from_stream(IfcParse::FileReader* stream, const IfcParse::schema_definition*& schema, unsigned int& max_id);
file_open_status good_ = file_open_status::SUCCESS;