GrailGUI is a prototype of a replacement for web programming (HTTP, HTML, CSS, JavaScript) and GUI programming. It includes a client graphical API, a browser implemented in C++ and OpenGL, a protocol to transmit metadata and data in binary, a language (XDL) to describe the binary data, and local storage to retain data on the client should that be necessary. Encrypted communications (equivalent of TLS) have not yet been implemented.
GNU General Public License v3.0
7
stars
14
forks
source link
Consider generating XDL Builtin Types from a script similar to #22 #25
Currently util/datatype.hh and util/datatype.cc have to be updated by hand whenever we add a new builtin XDL Type, and while this isn't the worst thing in the world, we should really consider just auto-generating the class and header so we can just add a line to a JSON file whenever we update std.cc to have a new type.
Proposal:
[x] Create a file /proj/xdl_types.json
[x] Insert each type in a format similar to "TYPE": "Type String"
[x] Create a script /proj/xdl_type_gen.py
[x] Read in each key-value pair
[x] Write out all the keys (Types) to datatype.hh as part of the existing enum
[x] Write out all the values (Type Strings) to datatype.cc as part of the existing enum
[x] Add execution of /proj/xdl_type_gen.py to CMake
[x] Make sure build waits for /proj/error_gen.py to run and has all required types
Note: There is a bit more code to write for this one than in #22 because there are other libraries and functions that need to get generated, but those should not change and can probably be written out as a constant string.
Currently
util/datatype.hh
andutil/datatype.cc
have to be updated by hand whenever we add a new builtin XDL Type, and while this isn't the worst thing in the world, we should really consider just auto-generating the class and header so we can just add a line to a JSON file whenever we update std.cc to have a new type.Proposal:
/proj/xdl_types.json
"TYPE": "Type String"
/proj/xdl_type_gen.py
/proj/xdl_type_gen.py
to CMake/proj/error_gen.py
to run and has all required types