I think this should be pretty straightforward. We need to add another data structure to the DataTypeInator - something like TypedefDictionary. This will be just a simple map <string, string> that maps a typedef'ed name to the declared type, which can then be looked up in the TypeDictionary. The DataTypeInator should take care of all of this.
ICG Changes:
We need to have some intermediate representation for typedefs, which can be simple. Need a visitor for typedefs, which only needs to scrape the names. Get the canonical name of the RHS type to avoid dealing with typedefs of other typedefs. Add something to the template engine to represent them. Should just be dealing with string representations.
DataTypes Changes:
The changes here should be limited to within the DataTypeInator only. We'll have to add some tracking structure, add a way register a typedef, and include a lookup in the typedef dictionary before the normal type dictionary.
We need to support typedefs.
We need to support all the above.
I think this should be pretty straightforward. We need to add another data structure to the DataTypeInator - something like
TypedefDictionary
. This will be just a simple map <string, string> that maps a typedef'ed name to the declared type, which can then be looked up in theTypeDictionary
. The DataTypeInator should take care of all of this.ICG Changes: We need to have some intermediate representation for typedefs, which can be simple. Need a visitor for typedefs, which only needs to scrape the names. Get the canonical name of the RHS type to avoid dealing with typedefs of other typedefs. Add something to the template engine to represent them. Should just be dealing with string representations.
DataTypes Changes: The changes here should be limited to within the DataTypeInator only. We'll have to add some tracking structure, add a way register a typedef, and include a lookup in the typedef dictionary before the normal type dictionary.