SFML community forums

General => Feature requests => Topic started by: Leugim on September 23, 2011, 10:02:18 am

Title: File I/O with the classes?
Post by: Leugim on September 23, 2011, 10:02:18 am
Is it possible to make File I/O with the classes, like for example the Window class could have like an exportSettings function or something that writes to a file that has it's current settings in plain text. Like for example:

Code: [Select]

Screen_Height= 640
Screen_Width= 480
Bits_Per_Pixel= 32
Window_Title= Window
etc...


Is there anything already implemented like that? Or will I have to write it manually as global functions or something?
Title: File I/O with the classes?
Post by: Laurent on September 23, 2011, 10:09:11 am
No, SFML doesn't (and won't) handle that. You have to write your own functions.
Title: File I/O with the classes?
Post by: Nexus on September 23, 2011, 10:23:30 am
You can use Boost.Serialization. I think there was even somebody who began to write serialize() functions for SFML classes, search for it on the forum.