They are generated from the StructureDefinition resources that are the master definitions for the resources and data types. They are linked from the download page (see ‘package’). I would never try to generate from the xsd’s - they are an information poor representation of the underlying classes
Next I would like to understand how the classes are generated. Which framework is used? (Open source would be great.) Are there more examples of generated code from similar definitions…?
…but that class relies on a bunch of other framework. Bottom line, using the structure definitions is the way to go. It’s not trivial by any means, but they are fairly straightforward to generate code from once you’re used to their patterns.
You could consider using the protobuf-generated code for C++ if you’re happy with using STU3. The proto files have been generated from the FHIR standard, and then C++ (and other language) generation follows the standard protobuf generation.