size_t GetCount() const { return m_count; }
// operations
+
// delete all nodes
void Clear();
+
// instruct it to destroy user data when deleting nodes
void DeleteContents(bool destroy) { m_destroy = destroy; }
+ // query if to delete
+ bool GetDeleteContents() const
+ { return m_destroy; }
+
+ // get the keytype
+ wxKeyType GetKeyType() const
+ { return m_keyType; }
+
+ // set the keytype (required by the serial code)
+ void SetKeyType(wxKeyType keyType)
+ { wxASSERT( m_count==0 ); m_keyType = keyType; }
+
protected:
// all methods here are "overloaded" in derived classes to provide compile
// time type checking
void *FirstThat(wxListIterateFunction func);
void ForEach(wxListIterateFunction func);
void *LastThat(wxListIterateFunction func);
-
+
private:
// helpers
// common part of all ctors
wxNode *Add(const char *s)
{ return (wxNode *)wxStringListBase::Append(copystring(s)); }
- void Delete(const char *s)
- { wxStringListBase::DeleteObject((char *)s); }
+ bool Delete(const char *s);
char **ListToArray(bool new_copies = FALSE) const;
bool Member(const char *s) const;