// Licence:
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "property.h"
-#endif
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
-#include "wx/wx.h"
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
#include "property.h"
if (oldProp)
m_list.DeleteObject(oldProp);
- wxNode* insertBeforeNode = NULL;
if (insertAfter)
{
ctProperty* insertAfterProp = FindProperty(insertAfter);
if (insertAfterProp)
{
- wxNode* node = m_list.Member(insertAfterProp);
+ wxObjectList::compatibility_iterator node = m_list.Member(insertAfterProp);
if (node)
- insertBeforeNode = node->GetNext();
+ {
+ wxObjectList::compatibility_iterator insertBeforeNode = node->GetNext();
+ m_list.Insert(insertBeforeNode, property);
+ }
+ else
+ m_list.Append(property);
}
+ else
+ m_list.Append(property);
}
- if (insertBeforeNode)
- m_list.Insert(insertBeforeNode, property);
else
m_list.Append(property);
ctProperty* ctProperties::FindProperty(const wxString& name) const
{
- wxNode* node = m_list.GetFirst();
+ wxObjectList::compatibility_iterator node = m_list.GetFirst();
while (node)
{
ctProperty* prop = (ctProperty*) node->GetData();
void ctProperties::Clear()
{
- m_list.DeleteContents(true);
- m_list.Clear();
- m_list.DeleteContents(false);
+ WX_CLEAR_LIST(wxObjectList,m_list);
}
void ctProperties::Copy(const ctProperties& properties)
{
- wxNode* node = properties.m_list.GetFirst();
+ wxObjectList::compatibility_iterator node = properties.m_list.GetFirst();
while (node)
{
ctProperty* prop = (ctProperty*) node->GetData();
wxASSERT( i < (int) GetCount() );
if (i < (int) GetCount())
{
- wxNode* node = m_list.Item(i);
+ wxObjectList::compatibility_iterator node = m_list.Item(i);
return (ctProperty*) node->GetData();
}
return NULL;