Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: File I/O with the classes?  (Read 2344 times)

0 Members and 1 Guest are viewing this topic.

Leugim

  • Newbie
  • *
  • Posts: 9
    • MSN Messenger - miguel_is_sexy@hotmail.com
    • View Profile
File I/O with the classes?
« 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
File I/O with the classes?
« Reply #1 on: September 23, 2011, 10:09:11 am »
No, SFML doesn't (and won't) handle that. You have to write your own functions.
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
File I/O with the classes?
« Reply #2 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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: