jdeans289 / icg2

Interface Code Generator 2: Electric Boogaloo
Other
0 stars 2 forks source link

Namespace Support #3

Closed jdeans289 closed 12 months ago

jdeans289 commented 1 year ago

Namespaces are very commonly used, we need to have robust support for them.

Inspired by a paper I read on how Swig handles this issue, I think that a nested TypeDictionary structure is the way to handle this. A type dictionary will have a map of string->BaseDataType that it tracks and another map of string->TypeDictionary for namespaces nested within the current namespace. The base type dictionary represents the global namespace, and everything else is nested within it. We can treat namespaces and nested classes the same way here.

ICG support for namespaces is another issue. I will have to do some investigating to see how easy it is to track (or just get?) the fully qualified name for things from LibClang.