#ifndef _WX_LISTH__
#define _WX_LISTH__
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "list.h"
#endif
{
public:
// implicit ctors
- wxListKey()
- { m_keyType = wxKEY_NONE; }
- wxListKey(long i)
- { m_keyType = wxKEY_INTEGER; m_key.integer = i; }
- wxListKey(const wxChar *s)
- { m_keyType = wxKEY_STRING; m_key.string = wxStrdup(s); }
- wxListKey(const wxString& s)
- { m_keyType = wxKEY_STRING; m_key.string = wxStrdup(s.c_str()); }
+ wxListKey() : m_keyType(wxKEY_NONE)
+ { }
+ wxListKey(long i) : m_keyType(wxKEY_INTEGER)
+ { m_key.integer = i; }
+ wxListKey(const wxChar *s) : m_keyType(wxKEY_STRING)
+ { m_key.string = wxStrdup(s); }
+ wxListKey(const wxString& s) : m_keyType(wxKEY_STRING)
+ { m_key.string = wxStrdup(s.c_str()); }
// accessors
wxKeyType GetKeyType() const { return m_keyType; }
*m_previous;
wxListBase *m_list; // list we belong to
+
+ DECLARE_NO_COPY_CLASS(wxNodeBase)
};
// -----------------------------------------------------------------------------
void Init(wxKeyType keyType = wxKEY_NONE); // Must be declared before it's used (for VC++ 1.5)
public:
// default ctor & dtor
- wxListBase(wxKeyType keyType = wxKEY_NONE) { Init(keyType); }
+ wxListBase(wxKeyType keyType = wxKEY_NONE)
+ { Init(keyType); }
virtual ~wxListBase();
// accessors
// count of items in the list
size_t GetCount() const { return m_count; }
+ // return TRUE if this list is empty
+ bool IsEmpty() const { return m_count == 0; }
+
// operations
// delete all nodes
: wxListBase(count, (void **)elements) { } \
\
name& operator=(const name& list) \
- { return (name&)wxListBase::operator=(list); } \
+ { (void) wxListBase::operator=(list); return *this; } \
\
nodetype *GetFirst() const \
{ return (nodetype *)wxListBase::GetFirst(); } \
~wxList() { }
wxList& operator=(const wxList& list)
- { return (wxList&)wxListBase::operator=(list); }
+ { (void) wxListBase::operator=(list); return *this; }
// compatibility methods
void Sort(wxSortCompareFunction compfunc) { wxListBase::Sort(compfunc); }