+// ----------------------------------------------------------------------------
+// wxPrivateDataObject
+// ----------------------------------------------------------------------------
+
+wxPrivateDataObject::wxPrivateDataObject()
+{
+ m_size = 0;
+ m_data = NULL;
+}
+
+void wxPrivateDataObject::Free()
+{
+ if ( m_data )
+ free(m_data);
+}
+
+void wxPrivateDataObject::SetData( const void *data, size_t size )
+{
+ Free();
+
+ m_size = size;
+ m_data = malloc(size);
+
+ memcpy( m_data, data, size );
+}
+
+void wxPrivateDataObject::WriteData( void *dest ) const
+{
+ WriteData( m_data, dest );
+}
+
+size_t wxPrivateDataObject::GetSize() const
+{
+ return m_size;
+}
+
+void wxPrivateDataObject::WriteData( const void *data, void *dest ) const
+{
+ memcpy( dest, data, GetSize() );
+}
+