[gmx-developers] XML and std::map?

David van der Spoel spoel at xray.bmc.uu.se
Tue Sep 22 12:32:17 CEST 2015


On 22/09/15 11:47, Vedran Miletić wrote:
> 2015-09-21 22:29 GMT+02:00 David van der Spoel <spoel at xray.bmc.uu.se>:
>> Hi,
>>
>> one possibility to store the contents of an XML file without reinventing
>> many wheels would be to use std::map. I.e.
>>
>> std::map *readXml(std::string filename);
>>
>> Some background reference on the map data structure:
>> http://www.cplusplus.com/reference/map/map/
>>
>> Before I spend any time on this I would like to invite some feedback.
>>
>> Advantages: standard stuff with iterators etc.
>> Disadvantages: don't know (yet).
>>
>
> Hello David,
>
> would the approach you have in mind imply some kind of nested
> std::map<std::string, std::map<...> > type?

I guess something like that. Any suggestions or experience?

>
> Regards,
> Vedran
>


-- 
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205.
spoel at xray.bmc.uu.se    http://folding.bmc.uu.se


More information about the gromacs.org_gmx-developers mailing list