Add schema parser and register schema classes#363
Merged
Conversation
Introduce a schema-driven data model: add source/data/data_schema.c and data_schema.h implementing DS_ParseSchema/DS_ParseSchemaFromString, DS_FreeSchema, and lookup helpers; these register/unregister ClassDesc entries for schema-generated entity classes. Expose OBJ_UnregisterClass and PF_DATA_FIELD in include/orca.h and implement OBJ_UnregisterClass in core_main.c to remove class/property type slots. Update core docs (core.cgen) and remove legacy typed DataObject start handlers; simplify property lookup and stop propagating Name->property updates in Lua setters. Build config (premake5.lua) now includes source/data files. Update sample data (ApplicationData, Games, Tabs) to schema-backed XML and add corresponding Schema.xml files; package.lua now references the schema files. These changes enable compact schema-generated entity classes with inline typed properties and lifecycle management for dynamic schemas.
…eSlot - Add 'data' to MODULES in Makefile (data_schema.c was never compiled) - Pass NULL, NULL for node() schema/entity params in property loading - Declare PROP_GetRawValueSlot via extern in fs_xml.c - Remove duplicate XMLSTR macro from data_schema.c
Owner
Author
|
@copilot fix builds/tests (see failing checks) |
Co-authored-by: corepunch <83646194+corepunch@users.noreply.github.com>
Contributor
Fixed the failing checks in commit
Validated locally with:
|
- Add Name fallback in binding engine for any object via OBJ_GetName - Send Object.Start to XmlDataSource children in FS_LoadBundle - Add Data module to Makefile MODULES list - Fix fs_xml.c node() calls with NULL schema/entity params - Extern declare PROP_GetRawValueSlot in fs_xml.c - Remove duplicate XMLSTR macro in data_schema.c - Fix test_layout.lua Name/name case mismatch in XML searches - Fix test_listbox.lua nested path test - Add DataObject back to core.cgen with Value property
Owner
Author
|
@copilot Fix webgl build |
Co-authored-by: corepunch <83646194+corepunch@users.noreply.github.com>
Contributor
Fixed in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a schema-driven data model: add source/data/data_schema.c and data_schema.h implementing DS_ParseSchema/DS_ParseSchemaFromString, DS_FreeSchema, and lookup helpers; these register/unregister ClassDesc entries for schema-generated entity classes. Expose OBJ_UnregisterClass and PF_DATA_FIELD in include/orca.h and implement OBJ_UnregisterClass in core_main.c to remove class/property type slots. Update core docs (core.cgen) and remove legacy typed DataObject start handlers; simplify property lookup and stop propagating Name->property updates in Lua setters. Build config (premake5.lua) now includes source/data files. Update sample data (ApplicationData, Games, Tabs) to schema-backed XML and add corresponding Schema.xml files; package.lua now references the schema files. These changes enable compact schema-generated entity classes with inline typed properties and lifecycle management for dynamic schemas.