- virtual bool GetFirstEntry(wxString& str, long& lIndex) = 0;
- virtual bool GetNextEntry (wxString& str, long& lIndex) = 0;
+ virtual bool GetFirstEntry(wxString& str, long& lIndex) const = 0;
+ virtual bool GetNextEntry (wxString& str, long& lIndex) const = 0;
+ // get number of entries/subgroups in the current group, with or without
+ // it's subgroups
+ virtual uint GetNumberOfEntries(bool bRecursive = FALSE) const = 0;
+ virtual uint GetNumberOfGroups(bool bRecursive = FALSE) const = 0;
+
+ // tests of existence
+ // returns TRUE if the group by this name exists
+ virtual bool HasGroup(const wxString& strName) const = 0;
+ // same as above, but for an entry
+ virtual bool HasEntry(const wxString& strName) const = 0;
+ // returns TRUE if either a group or an entry with a given name exist
+ bool Exists(const wxString& strName) const
+ { return HasGroup(strName) || HasEntry(strName); }