From 68219958d08681064380cc1f2b68a92ee1a22b28 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 12 Jan 2010 08:48:55 +0000 Subject: Fl_Preferences now have an API to delete all nodes or entries at once. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6995 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Preferences.H | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'FL') diff --git a/FL/Fl_Preferences.H b/FL/Fl_Preferences.H index a5f56c1e6..44d007f90 100644 --- a/FL/Fl_Preferences.H +++ b/FL/Fl_Preferences.H @@ -57,7 +57,7 @@ yet exist. Entries can be of any length. However, the size of each - preferences file should be kept under 100k for performance + preferences file should be kept small for performance reasons. One application can have multiple preferences files. Extensive binary data however should be stored in separate files: see getUserdataPath(). @@ -116,11 +116,15 @@ public: const char *group( int num_group ); char groupExists( const char *key ); char deleteGroup( const char *group ); + char deleteAllGroups(); int entries(); const char *entry( int index ); char entryExists( const char *key ); char deleteEntry( const char *entry ); + char deleteAllEntries(); + + char clear(); char set( const char *entry, int value ); char set( const char *entry, float value ); @@ -223,6 +227,7 @@ private: RootNode *findRoot(); char remove(); char dirty(); + void deleteAllChildren(); // entry methods int nChildren(); const char *child( int ix ); @@ -232,6 +237,7 @@ private: const char *get( const char *name ); int getEntry( const char *name ); char deleteEntry( const char *name ); + void deleteAllEntries(); // public values Entry *entry; int nEntry, NEntry; -- cgit v1.2.3