Right - the way to generate them is to set up a build environment and build DFHack (specifically, at least the "generate_headers" target). If you're only interested in the type definitions and don't need the exact headers, they are generated from df.*.xml files in
https://github.com/dfhack/df-structures/ (loosely organized into separate files, as PatrikLundell mentioned). The specific class you asked about is defined
here.
https://docs.dfhack.org/en/stable/docs/Structures-intro.html goes into a bit of detail about how DF-structures works, and links to some other pages.
Having the generated .h files float around on github would result in issues when you generate them locally (e.g. after updating the XML locally), unless there's a way get them to be visible on github but be exempt from source control so they are readily replaced by local generation after being downloaded (but how would that logic know when to download and when not to?).
codegen.pl will always generate new headers and replace the existing ones if necessary, although it's only run by CMake if codegen.out.xml is "out-of-date", i.e. older than the df.*.xml files. There are a couple reasons we don't include the headers in the DFHack repo:
- They're generated, and including generated files in source control usually isn't a good idea (among other reasons, it isn't necessary since the files can be generated, and it leads to larger diffs)
- They're generated from source files in another repo (from df-structures, and stored in library/include/df of the main DFHack repo), so keeping them in sync with the source files would be an additional challenge
- There are a lot of them (around 1750 as of 0.47.04-r4), so keeping them in source control would lead to rather large diffs
There is actually a CMake option that installs the generated headers (and as a result, includes them in release packages), but we haven't enabled it in a while because it leads to larger archives that take a long time for some unzipping tools to extract, and there isn't a very well-defined process for using the headers outside of DFHack currently.