Using AXE I can write in a few lines to parse sections, properties and comments:. More detailed example can be found in the Reference. Regarding not reading the whole file, it can be done in different ways.
First of all, parser for INI format requires at least forward iterators, so you can't use stream iterators, since they are input iterators.
You can either create a separate class for stream with required iterators I wrote one such class in the past with sliding buffer.
You can use memory mapped file. Or you can use a dynamic buffer, reading from the standard stream and supplying to parser until you found the values. The problem was in passing the filename.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Helping communities build their own LTE networks. Podcast Making Agile work for data science.
Featured on Meta. Value2" constants? PropertyTree — user. And here it is solved: stackoverflow. The problem I have always had with Boost. PropertyTree is the use of , between section names and value names. True INI files support section names and value names that include the '. Is it possible to customize this behavior? Show 2 more comments. Gene Bushuyev Gene Bushuyev 5, 18 18 silver badges 19 19 bronze badges.
Jan Hudec Jan Hudec It's simple one. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Helping communities build their own LTE networks. Podcast Making Agile work for data science. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
0コメント