[haiku-development] Re: Question about saving list of objects.

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 28 Mar 2021 15:50:05 +0000

So any suggestions on how to store objects in a list, without rewriting 
BluetoothSettings..

Usually settings are stored in BMessage format, using subclasses of BArchivable 
to easily load/save them from disk.

This is better than just dumping the struct to a settings file, it allows to 
add and remove fields later on and have not too hard backwards compatibility. 
It also allows dumping the content of the file using the "message" tool.

-- 
Adrien.


Other related posts: