don't define EMPTY_PARAMETER_VALUE macro without wx prefix, this is an invitation for name clash; instead define wxEMPTY_PARAMETER_VALUE and use it in both variant.h and event.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -47,5 +47,11 @@
|
|||||||
/* Create a "unique" name with the given prefix */
|
/* Create a "unique" name with the given prefix */
|
||||||
#define wxMAKE_UNIQUE_NAME(text) wxCONCAT_LINE(text)
|
#define wxMAKE_UNIQUE_NAME(text) wxCONCAT_LINE(text)
|
||||||
|
|
||||||
|
/*
|
||||||
|
This macro can be passed as argument to another macro when you don't have
|
||||||
|
anything to pass in fact.
|
||||||
|
*/
|
||||||
|
#define wxEMPTY_PARAMETER_VALUE /* Fake macro parameter value */
|
||||||
|
|
||||||
#endif // _WX_CPP_H_
|
#endif // _WX_CPP_H_
|
||||||
|
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
#define _WX_EVENT_H__
|
#define _WX_EVENT_H__
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
#include "wx/cpp.h"
|
||||||
#include "wx/object.h"
|
#include "wx/object.h"
|
||||||
#include "wx/clntdata.h"
|
#include "wx/clntdata.h"
|
||||||
|
|
||||||
@@ -94,8 +95,6 @@ typedef int wxEventType;
|
|||||||
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
|
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
|
||||||
wxEventTableEntry(type, winid, idLast, fn, obj)
|
wxEventTableEntry(type, winid, idLast, fn, obj)
|
||||||
|
|
||||||
#define EMPTY_PARAMETER_VALUE /* Fake macro parameter value */
|
|
||||||
|
|
||||||
#define BEGIN_DECLARE_EVENT_TYPES()
|
#define BEGIN_DECLARE_EVENT_TYPES()
|
||||||
#define END_DECLARE_EVENT_TYPES()
|
#define END_DECLARE_EVENT_TYPES()
|
||||||
#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \
|
#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \
|
||||||
@@ -103,7 +102,7 @@ typedef int wxEventType;
|
|||||||
#define DECLARE_EVENT_TYPE(name, value) \
|
#define DECLARE_EVENT_TYPE(name, value) \
|
||||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, name, value)
|
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, name, value)
|
||||||
#define DECLARE_LOCAL_EVENT_TYPE(name, value) \
|
#define DECLARE_LOCAL_EVENT_TYPE(name, value) \
|
||||||
DECLARE_EXPORTED_EVENT_TYPE(EMPTY_PARAMETER_VALUE, name, value)
|
DECLARE_EXPORTED_EVENT_TYPE(wxEMPTY_PARAMETER_VALUE, name, value)
|
||||||
#define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType();
|
#define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType();
|
||||||
#define DEFINE_LOCAL_EVENT_TYPE(name) DEFINE_EVENT_TYPE(name)
|
#define DEFINE_LOCAL_EVENT_TYPE(name) DEFINE_EVENT_TYPE(name)
|
||||||
|
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
#include "wx/arrstr.h"
|
#include "wx/arrstr.h"
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
|
#include "wx/cpp.h"
|
||||||
|
|
||||||
#if wxUSE_DATETIME
|
#if wxUSE_DATETIME
|
||||||
#include "wx/datetime.h"
|
#include "wx/datetime.h"
|
||||||
@@ -316,21 +317,15 @@ private:
|
|||||||
DECLARE_DYNAMIC_CLASS(wxVariant)
|
DECLARE_DYNAMIC_CLASS(wxVariant)
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Fake macro parameter value */
|
|
||||||
#ifdef EMPTY_PARAMETER_VALUE
|
|
||||||
#undef EMPTY_PARAMETER_VALUE
|
|
||||||
#endif
|
|
||||||
#define EMPTY_PARAMETER_VALUE
|
|
||||||
|
|
||||||
#define DECLARE_VARIANT_OBJECT(classname) \
|
#define DECLARE_VARIANT_OBJECT(classname) \
|
||||||
DECLARE_VARIANT_OBJECT_EXPORTED(classname,EMPTY_PARAMETER_VALUE)
|
DECLARE_VARIANT_OBJECT_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE)
|
||||||
|
|
||||||
#define DECLARE_VARIANT_OBJECT_EXPORTED(classname,expdecl) \
|
#define DECLARE_VARIANT_OBJECT_EXPORTED(classname,expdecl) \
|
||||||
expdecl classname& operator << ( classname &object, const wxVariant &variant ); \
|
expdecl classname& operator << ( classname &object, const wxVariant &variant ); \
|
||||||
expdecl wxVariant& operator << ( wxVariant &variant, const classname &object );
|
expdecl wxVariant& operator << ( wxVariant &variant, const classname &object );
|
||||||
|
|
||||||
#define IMPLEMENT_VARIANT_OBJECT(classname) \
|
#define IMPLEMENT_VARIANT_OBJECT(classname) \
|
||||||
IMPLEMENT_VARIANT_OBJECT_EXPORTED(classname,EMPTY_PARAMETER_VALUE)
|
IMPLEMENT_VARIANT_OBJECT_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE)
|
||||||
|
|
||||||
#define IMPLEMENT_VARIANT_OBJECT_EXPORTED_NO_EQ(classname,expdecl) \
|
#define IMPLEMENT_VARIANT_OBJECT_EXPORTED_NO_EQ(classname,expdecl) \
|
||||||
class classname##VariantData: public wxVariantData \
|
class classname##VariantData: public wxVariantData \
|
||||||
|
Reference in New Issue
Block a user