Files
wxWidgets/src/common/clntdata.cpp
Vadim Zeitlin 3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00

83 lines
2.3 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: src/common/clntdata.cpp
// Purpose: A mixin class for holding a wxClientData or void pointer
// Author: Robin Dunn
// Modified by:
// Created: 9-Oct-2001
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/clntdata.h"
// ----------------------------------------------------------------------------
wxClientDataContainer::wxClientDataContainer()
{
// no client data (yet)
m_clientData = NULL;
m_clientDataType = wxClientData_None;
}
wxClientDataContainer::~wxClientDataContainer()
{
// we only delete object data, not untyped
if ( m_clientDataType == wxClientData_Object )
delete m_clientObject;
}
void wxClientDataContainer::DoSetClientObject( wxClientData *data )
{
wxASSERT_MSG( m_clientDataType != wxClientData_Void,
wxT("can't have both object and void client data") );
if ( m_clientObject )
delete m_clientObject;
m_clientObject = data;
m_clientDataType = wxClientData_Object;
}
wxClientData *wxClientDataContainer::DoGetClientObject() const
{
// it's not an error to call GetClientObject() on a window which doesn't
// have client data at all - NULL will be returned
wxASSERT_MSG( m_clientDataType != wxClientData_Void,
wxT("this window doesn't have object client data") );
return m_clientObject;
}
void wxClientDataContainer::DoSetClientData( void *data )
{
wxASSERT_MSG( m_clientDataType != wxClientData_Object,
wxT("can't have both object and void client data") );
m_clientData = data;
m_clientDataType = wxClientData_Void;
}
void *wxClientDataContainer::DoGetClientData() const
{
// it's not an error to call GetClientData() on a window which doesn't have
// client data at all - NULL will be returned
wxASSERT_MSG( m_clientDataType != wxClientData_Object,
wxT("this window doesn't have void client data") );
return m_clientData;
}
// ----------------------------------------------------------------------------