xtd 0.2.0
Loading...
Searching...
No Matches

◆ top_file_comment() [2/2]

file_settings & xtd::configuration::file_settings::top_file_comment ( const xtd::string value)
noexcept

Sets top file comment text.

Parameters
valueTop file comment textr.
Returns
This current instance.
Remarks
Generally used to write descriptions of the xtd::configuration::file_settings : authors, copyright, version, etc.
Examples
The following example shows how to create xtd::configuration::file_settings and use xtd::configuration::file_settings::top_file_comment property, xtd::configuration::file_settings::write and xtd::configuration::file_settings::save_as methods.
auto file = file_settings {};
file.top_file_comment("Contains settings for my_app application.\nCopyright, (c) 2024 MyCompany. All rights reserved.");
file.write("pictures \"Menu\"", "file_open", "resources/symbolic_open.png");
file.write("pictures \"Menu\"", "file_save", "resources/symbolic_save.png");
file.save_as("my_app.ini");
xtd::string top_file_comment() const noexcept
Gets top file comment text.
Represents an object for storing and retrieving configuration information using text files in INI for...
Definition file_settings.h:32
my_app.ini:
# Contains settings for my_app application.
# Copyright, (c) 2024 MyCompany. All rights reserved.
[pictures "Menu"]
file_open = resources/symbolic_open.png
file_save = resources/symbolic_save.png