mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
LibCore: Convert ConfigFile to east const
This commit is contained in:
parent
2ea2d026c2
commit
54bbe52b51
2 changed files with 24 additions and 24 deletions
|
@ -31,22 +31,22 @@ public:
|
|||
static NonnullRefPtr<ConfigFile> open(String const& filename, int fd);
|
||||
~ConfigFile();
|
||||
|
||||
bool has_group(const String&) const;
|
||||
bool has_key(const String& group, const String& key) const;
|
||||
bool has_group(String const&) const;
|
||||
bool has_key(String const& group, String const& key) const;
|
||||
|
||||
Vector<String> groups() const;
|
||||
Vector<String> keys(const String& group) const;
|
||||
Vector<String> keys(String const& group) const;
|
||||
|
||||
size_t num_groups() const { return m_groups.size(); }
|
||||
|
||||
String read_entry(const String& group, const String& key, const String& default_value = String()) const;
|
||||
int read_num_entry(const String& group, const String& key, int default_value = 0) const;
|
||||
bool read_bool_entry(const String& group, const String& key, bool default_value = false) const;
|
||||
String read_entry(String const& group, String const& key, String const& default_value = String()) const;
|
||||
int read_num_entry(String const& group, String const& key, int default_value = 0) const;
|
||||
bool read_bool_entry(String const& group, String const& key, bool default_value = false) const;
|
||||
|
||||
void write_entry(const String& group, const String& key, const String& value);
|
||||
void write_num_entry(const String& group, const String& key, int value);
|
||||
void write_bool_entry(const String& group, const String& key, bool value);
|
||||
void write_color_entry(const String& group, const String& key, Color value);
|
||||
void write_entry(String const& group, String const& key, String const& value);
|
||||
void write_num_entry(String const& group, String const& key, int value);
|
||||
void write_bool_entry(String const& group, String const& key, bool value);
|
||||
void write_color_entry(String const& group, String const& key, Color value);
|
||||
|
||||
void dump() const;
|
||||
|
||||
|
@ -54,8 +54,8 @@ public:
|
|||
|
||||
bool sync();
|
||||
|
||||
void remove_group(const String& group);
|
||||
void remove_entry(const String& group, const String& key);
|
||||
void remove_group(String const& group);
|
||||
void remove_entry(String const& group, String const& key);
|
||||
|
||||
String filename() const { return m_file->filename(); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue