forked from PolymerLabs/arcs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
schema2cpp: abandon inheritance and use a simple template ctor (Polym…
…erLabs#4059) * schema2cpp: abandon inheritance and use a simple template ctor Using inheritance to mirror the type lattice Just Doesn't Work(TM) in C++ because even completely abstract classes aren't really interfaces. So, if two unrelated base classes have a common field, this introduces ambiguity even if they are just declaring an accessor method and don't have the field actually defined. Sigh. So, no more inheritance. All entity classes are stand-alone, but with a template constructor which allows slicable entities to be implicitly converted at call sites, which is reasonable (and actually a lot easier to implement). * Removed TODO, added comment
- Loading branch information
Showing
9 changed files
with
198 additions
and
311 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.