This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Replying to my own email, here's the explanation from Ed about why what I did appeared to work. It's not inheritance at all, it's just that the types are global: Actually the type path is never needed. The typeid is file global, but the catch is you must scan the whole file to find where the types are hidden. So if you tuck all your types away when writing the file, you make it hard for the reader to find them, but they are still global, and once the reader does find them, only the typeid is needed. Inheritance is not appropriate for types in a data file, I think. Too complicated! Containment of named types is really all you need. If there is a lot of commonality of type metadata, define some core types, and use arrays and vlens of those... OK, this is odd, but I just looked, and there is no way at all to look up types by name. You can provide a group, and learn all the typeids in that group, but you can not provide a name, and get a typeid. Probably this is a mistake and I need to add this function (not for 4.0.1 obviously, but for 4.1). I also asked if we could add type inheritance in a future version in a backward-compatible way, because any files that rely on such inheritance would just not be valid today, but making that change would give them a consistent meaning. That actually holds for other kinds of inheritance too, such as inheriting coordinate variables and attributes along the Group hierarchy. Ed responded It is true that this could be done in a backward compatible way. Using inheritance, as with dimensions, makes conceptual sense too. Clearly C++ has many opportunities to present a less primitive looking API. I look forward to seeing what he comes up with. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: MSV-188900 Department: Support netCDF Priority: Normal Status: Closed