--- /dev/null
+/////////////////////////////////////////////////////////////////////////////\r
+// Name: wx/xtitypes.h\r
+// Purpose: enum, set, basic types support\r
+// Author: Stefan Csomor\r
+// Modified by: Francesco Montorsi\r
+// Created: 27/07/03\r
+// RCS-ID: $Id: xti.h 47299 2007-07-10 15:58:27Z FM $\r
+// Copyright: (c) 1997 Julian Smart\r
+// (c) 2003 Stefan Csomor\r
+// Licence: wxWindows licence\r
+/////////////////////////////////////////////////////////////////////////////\r
+\r
+#ifndef _XTITYPES_H_\r
+#define _XTITYPES_H_\r
+\r
+#include "wx/defs.h"\r
+\r
+#if wxUSE_EXTENDED_RTTI\r
+\r
+#include "wx/string.h"\r
+#include "wx/hashmap.h"\r
+#include "wx/arrstr.h"\r
+#include "wx/flags.h"\r
+#include "wx/intl.h"\r
+#include "wx/log.h"\r
+#include <typeinfo>\r
+\r
+class WXDLLIMPEXP_BASE wxClassInfo;\r
+\r
+// ----------------------------------------------------------------------------\r
+// Enum Support\r
+//\r
+// In the header files XTI requires no change from pure c++ code, however in the\r
+// implementation, an enum needs to be enumerated eg:\r
+//\r
+// wxBEGIN_ENUM( wxFlavor )\r
+// wxENUM_MEMBER( Vanilla )\r
+// wxENUM_MEMBER( Chocolate )\r
+// wxENUM_MEMBER( Strawberry )\r
+// wxEND_ENUM( wxFlavor )\r
+// ----------------------------------------------------------------------------\r
+\r
+struct WXDLLIMPEXP_BASE wxEnumMemberData\r
+{\r
+ const wxChar* m_name;\r
+ int m_value;\r
+};\r
+\r
+class WXDLLIMPEXP_BASE wxEnumData\r
+{\r
+public:\r
+ wxEnumData( wxEnumMemberData* data );\r
+\r
+ // returns true if the member has been found and sets the int value\r
+ // pointed to accordingly (if ptr != null )\r
+ // if not found returns false, value left unchanged\r
+ bool HasEnumMemberValue( const wxChar *name, int *value = NULL ) const;\r
+\r
+ // returns the value of the member, if not found in debug mode an\r
+ // assert is issued, in release 0 is returned\r
+ int GetEnumMemberValue(const wxChar *name ) const;\r
+\r
+ // returns the name of the enum member having the passed in value\r
+ // returns an emtpy string if not found\r
+ const wxChar *GetEnumMemberName(int value) const;\r
+\r
+ // returns the number of members in this enum\r
+ int GetEnumCount() const { return m_count; }\r
+\r
+ // returns the value of the nth member\r
+ int GetEnumMemberValueByIndex( int n ) const;\r
+\r
+ // returns the value of the nth member\r
+ const wxChar *GetEnumMemberNameByIndex( int n ) const;\r
+\r
+private:\r
+ wxEnumMemberData *m_members;\r
+ int m_count;\r
+};\r
+\r
+#define wxBEGIN_ENUM( e ) \\r
+ wxEnumMemberData s_enumDataMembers##e[] = {\r
+\r
+#define wxENUM_MEMBER( v ) { wxT(#v), v },\r
+\r
+#define wxEND_ENUM( e ) \\r
+ { NULL, 0 } }; \\r
+ wxEnumData s_enumData##e( s_enumDataMembers##e ); \\r
+ wxEnumData *wxGetEnumData(e) { return &s_enumData##e; } \\r
+ template<> void wxStringReadValue(const wxString& s, e &data ) \\r
+ { data = (e) s_enumData##e.GetEnumMemberValue(s); } \\r
+ template<> void wxStringWriteValue(wxString &s, const e &data ) \\r
+ { s = s_enumData##e.GetEnumMemberName((int)data); } \\r
+ void FromLong##e( long data, wxVariantBase& result ) \\r
+ { result = wxVariantBase((e)data); } \\r
+ void ToLong##e( const wxVariantBase& data, long &result ) \\r
+ { result = (long) data.wxTEMPLATED_MEMBER_CALL(Get, e); } \\r
+ \\r
+ wxTO_STRING_IMP( e ) \\r
+ wxFROM_STRING_IMP( e ) \\r
+ wxEnumTypeInfo s_typeInfo##e(wxT_ENUM, &s_enumData##e, \\r
+ &wxTO_STRING( e ), &wxFROM_STRING( e ), &ToLong##e, \\r
+ &FromLong##e, typeid(e).name() );\r
+\r
+\r
+// ----------------------------------------------------------------------------\r
+// Set Support\r
+//\r
+// in the header :\r
+//\r
+// enum wxFlavor\r
+// {\r
+// Vanilla,\r
+// Chocolate,\r
+// Strawberry,\r
+// };\r
+//\r
+// typedef wxBitset<wxFlavor> wxCoupe;\r
+//\r
+// in the implementation file :\r
+//\r
+// wxBEGIN_ENUM( wxFlavor )\r
+// wxENUM_MEMBER( Vanilla )\r
+// wxENUM_MEMBER( Chocolate )\r
+// wxENUM_MEMBER( Strawberry )\r
+// wxEND_ENUM( wxFlavor )\r
+//\r
+// wxIMPLEMENT_SET_STREAMING( wxCoupe, wxFlavor )\r
+//\r
+// implementation note: no partial specialization for streaming, but a delegation \r
+// to a different class\r
+//\r
+// ----------------------------------------------------------------------------\r
+\r
+// in order to remove dependancy on string tokenizer\r
+void WXDLLIMPEXP_BASE wxSetStringToArray( const wxString &s, wxArrayString &array );\r
+\r
+template<typename e>\r
+void wxSetFromString(const wxString &s, wxBitset<e> &data )\r
+{\r
+ wxEnumData* edata = wxGetEnumData((e) 0);\r
+ data.reset();\r
+\r
+ wxArrayString array;\r
+ wxSetStringToArray( s, array );\r
+ wxString flag;\r
+ for ( int i = 0; i < array.Count(); ++i )\r
+ {\r
+ flag = array[i];\r
+ int ivalue;\r
+ if ( edata->HasEnumMemberValue( flag, &ivalue ) )\r
+ {\r
+ data.set( (e) ivalue );\r
+ }\r
+ }\r
+}\r
+\r
+template<typename e>\r
+void wxSetToString( wxString &s, const wxBitset<e> &data )\r
+{\r
+ wxEnumData* edata = wxGetEnumData((e) 0);\r
+ int count = edata->GetEnumCount();\r
+ int i;\r
+ s.Clear();\r
+ for ( i = 0; i < count; i++ )\r
+ {\r
+ e value = (e) edata->GetEnumMemberValueByIndex(i);\r
+ if ( data.test( value ) )\r
+ {\r
+ // this could also be done by the templated calls\r
+ if ( !s.empty() )\r
+ s += wxT("|");\r
+ s += edata->GetEnumMemberNameByIndex(i);\r
+ }\r
+ }\r
+}\r
+\r
+#define wxIMPLEMENT_SET_STREAMING(SetName,e) \\r
+ template<> void wxStringReadValue(const wxString &s, wxBitset<e> &data ) \\r
+ { wxSetFromString( s, data ); } \\r
+ template<> void wxStringWriteValue( wxString &s, const wxBitset<e> &data ) \\r
+ { wxSetToString( s, data ); } \\r
+ void FromLong##SetName( long data, wxVariantBase& result ) \\r
+ { result = wxVariantBase(SetName((unsigned long)data)); } \\r
+ void ToLong##SetName( const wxVariantBase& data, long &result ) \\r
+ { result = (long) data.wxTEMPLATED_MEMBER_CALL(Get, SetName).to_ulong(); } \\r
+ wxTO_STRING_IMP( SetName ) \\r
+ wxFROM_STRING_IMP( SetName ) \\r
+ wxEnumTypeInfo s_typeInfo##SetName(wxT_SET, &s_enumData##e, \\r
+ &wxTO_STRING( SetName ), &wxFROM_STRING( SetName ), \\r
+ &ToLong##SetName, &FromLong##SetName, typeid(SetName).name() );\r
+\r
+template<typename e>\r
+void wxFlagsFromString(const wxString &s, e &data )\r
+{\r
+ wxEnumData* edata = wxGetEnumData((e*) 0);\r
+ data.m_data = 0;\r
+\r
+ wxArrayString array;\r
+ wxSetStringToArray( s, array );\r
+ wxString flag;\r
+ for ( size_t i = 0; i < array.Count(); ++i )\r
+ {\r
+ flag = array[i];\r
+ int ivalue;\r
+ if ( edata->HasEnumMemberValue( flag, &ivalue ) )\r
+ {\r
+ data.m_data |= ivalue;\r
+ }\r
+ }\r
+}\r
+\r
+template<typename e>\r
+void wxFlagsToString( wxString &s, const e& data )\r
+{\r
+ wxEnumData* edata = wxGetEnumData((e*) 0);\r
+ int count = edata->GetEnumCount();\r
+ int i;\r
+ s.Clear();\r
+ long dataValue = data.m_data;\r
+ for ( i = 0; i < count; i++ )\r
+ {\r
+ int value = edata->GetEnumMemberValueByIndex(i);\r
+ // make this to allow for multi-bit constants to work\r
+ if ( value && ( dataValue & value ) == value )\r
+ {\r
+ // clear the flags we just set\r
+ dataValue &= ~value;\r
+ // this could also be done by the templated calls\r
+ if ( !s.empty() )\r
+ s +=wxT("|");\r
+ s += edata->GetEnumMemberNameByIndex(i);\r
+ }\r
+ }\r
+}\r
+\r
+#define wxBEGIN_FLAGS( e ) \\r
+ wxEnumMemberData s_enumDataMembers##e[] = {\r
+\r
+#define wxFLAGS_MEMBER( v ) { wxT(#v), v },\r
+\r
+#define wxEND_FLAGS( e ) \\r
+ { NULL, 0 } }; \\r
+ wxEnumData s_enumData##e( s_enumDataMembers##e ); \\r
+ wxEnumData *wxGetEnumData(e*) { return &s_enumData##e; } \\r
+ template<> void wxStringReadValue(const wxString &s, e &data ) \\r
+ { wxFlagsFromString<e>( s, data ); } \\r
+ template<> void wxStringWriteValue( wxString &s, const e& data ) \\r
+ { wxFlagsToString<e>( s, data ); } \\r
+ void FromLong##e( long data, wxVariantBase& result ) \\r
+ { result = wxVariantBase(e(data)); } \\r
+ void ToLong##e( const wxVariantBase& data, long &result ) \\r
+ { result = (long) data.wxTEMPLATED_MEMBER_CALL(Get, e).m_data; } \\r
+ wxTO_STRING_IMP( e ) \\r
+ wxFROM_STRING_IMP( e ) \\r
+ wxEnumTypeInfo s_typeInfo##e(wxT_SET, &s_enumData##e, \\r
+ &wxTO_STRING( e ), &wxFROM_STRING( e ), &ToLong##e, \\r
+ &FromLong##e, typeid(e).name() );\r
+\r
+// ----------------------------------------------------------------------------\r
+// Type Information\r
+// ----------------------------------------------------------------------------\r
+\r
+// All data exposed by the RTTI is characterized using the following classes.\r
+// The first characterization is done by wxTypeKind. All enums up to and including\r
+// wxT_CUSTOM represent so called simple types. These cannot be divided any further.\r
+// They can be converted to and from wxStrings, that's all.\r
+// Other wxTypeKinds can instead be splitted recursively into smaller parts until\r
+// the simple types are reached.\r
+\r
+enum wxTypeKind\r
+{\r
+ wxT_VOID = 0, // unknown type\r
+ wxT_BOOL,\r
+ wxT_CHAR,\r
+ wxT_UCHAR,\r
+ wxT_INT,\r
+ wxT_UINT,\r
+ wxT_LONG,\r
+ wxT_ULONG,\r
+ wxT_FLOAT,\r
+ wxT_DOUBLE,\r
+ wxT_STRING, // must be wxString\r
+ wxT_SET, // must be wxBitset<> template\r
+ wxT_ENUM,\r
+ wxT_CUSTOM, // user defined type (e.g. wxPoint)\r
+\r
+ wxT_LAST_SIMPLE_TYPE_KIND = wxT_CUSTOM,\r
+\r
+ wxT_OBJECT_PTR, // object reference\r
+ wxT_OBJECT, // embedded object\r
+ wxT_COLLECTION, // collection\r
+\r
+ wxT_DELEGATE, // for connecting against an event source\r
+\r
+ wxT_LAST_TYPE_KIND = wxT_DELEGATE // sentinel for bad data, asserts, debugging\r
+};\r
+\r
+class WXDLLIMPEXP_BASE wxVariantBase;\r
+class WXDLLIMPEXP_BASE wxTypeInfo;\r
+\r
+WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxTypeInfo*, wxTypeInfoMap, class WXDLLIMPEXP_BASE );\r
+\r
+class WXDLLIMPEXP_BASE wxTypeInfo\r
+{\r
+public:\r
+ typedef void (*wxVariant2StringFnc)( const wxVariantBase& data, wxString &result );\r
+ typedef void (*wxString2VariantFnc)( const wxString& data, wxVariantBase &result );\r
+\r
+ wxTypeInfo(wxTypeKind kind,\r
+ wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL,\r
+ const wxString &name = wxEmptyString):\r
+ m_toString(to), m_fromString(from), m_kind(kind), m_name(name)\r
+ {\r
+ Register();\r
+ }\r
+#if wxUSE_UNICODE\r
+ wxTypeInfo(wxTypeKind kind,\r
+ wxVariant2StringFnc to, wxString2VariantFnc from,\r
+ const char *name):\r
+ m_toString(to), m_fromString(from), m_kind(kind), \r
+ m_name(wxString::FromAscii(name))\r
+ {\r
+ Register();\r
+ }\r
+#endif\r
+\r
+ virtual ~wxTypeInfo()\r
+ {\r
+ Unregister();\r
+ }\r
+\r
+ // return the kind of this type (wxT_... constants)\r
+ wxTypeKind GetKind() const { return m_kind; }\r
+\r
+ // returns the unique name of this type\r
+ const wxString& GetTypeName() const { return m_name; }\r
+\r
+ // is this type a delegate type\r
+ bool IsDelegateType() const { return m_kind == wxT_DELEGATE; }\r
+\r
+ // is this type a custom type\r
+ bool IsCustomType() const { return m_kind == wxT_CUSTOM; }\r
+\r
+ // is this type an object type\r
+ bool IsObjectType() const { return m_kind == wxT_OBJECT || m_kind == wxT_OBJECT_PTR; }\r
+\r
+ // can the content of this type be converted to and from strings ?\r
+ bool HasStringConverters() const { return m_toString != NULL && m_fromString != NULL; }\r
+\r
+ // convert a wxVariantBase holding data of this type into a string\r
+ void ConvertToString( const wxVariantBase& data, wxString &result ) const\r
+ { \r
+ if ( m_toString ) \r
+ (*m_toString)( data, result ); \r
+ else \r
+ wxLogError( wxGetTranslation(_T("String conversions not supported")) ); \r
+ }\r
+\r
+ // convert a string into a wxVariantBase holding the corresponding data in this type\r
+ void ConvertFromString( const wxString& data, wxVariantBase &result ) const\r
+ { \r
+ if( m_fromString ) \r
+ (*m_fromString)( data, result ); \r
+ else \r
+ wxLogError( wxGetTranslation(_T("String conversions not supported")) ); \r
+ }\r
+\r
+ // statics:\r
+\r
+#if wxUSE_UNICODE\r
+ static wxTypeInfo *FindType(const char *typeName) \r
+ { return FindType( wxString::FromAscii(typeName) ); }\r
+#endif\r
+ static wxTypeInfo *FindType(const wxChar *typeName);\r
+ static wxTypeInfo *FindType(const wxString& typeName)\r
+ {\r
+#if wxUSE_UNICODE\r
+ return FindType( typeName.wchar_str() );\r
+#else\r
+ return FindType( typeName.char_str() );\r
+#endif\r
+ }\r
+\r
+private:\r
+ void Register();\r
+ void Unregister();\r
+\r
+ wxVariant2StringFnc m_toString;\r
+ wxString2VariantFnc m_fromString;\r
+\r
+ wxTypeKind m_kind;\r
+ wxString m_name;\r
+\r
+ // the static list of all types we know about\r
+ static wxTypeInfoMap* ms_typeTable;\r
+};\r
+\r
+class WXDLLIMPEXP_BASE wxBuiltInTypeInfo : public wxTypeInfo\r
+{\r
+public:\r
+ wxBuiltInTypeInfo( wxTypeKind kind, wxVariant2StringFnc to = NULL, \r
+ wxString2VariantFnc from = NULL, \r
+ const wxString &name = wxEmptyString ) :\r
+ wxTypeInfo( kind, to, from, name )\r
+ { wxASSERT_MSG( GetKind() < wxT_SET, wxT("Illegal Kind for Base Type") ); }\r
+\r
+#if wxUSE_UNICODE\r
+ wxBuiltInTypeInfo( wxTypeKind kind, wxVariant2StringFnc to, \r
+ wxString2VariantFnc from , const char *name ) :\r
+ wxTypeInfo( kind, to, from, name )\r
+ { wxASSERT_MSG( GetKind() < wxT_SET, wxT("Illegal Kind for Base Type") ); }\r
+#endif\r
+};\r
+\r
+class WXDLLIMPEXP_BASE wxCustomTypeInfo : public wxTypeInfo\r
+{\r
+public:\r
+ wxCustomTypeInfo( const wxString &name, wxVariant2StringFnc to, \r
+ wxString2VariantFnc from ) :\r
+ wxTypeInfo( wxT_CUSTOM, to, from, name )\r
+ {}\r
+\r
+#if wxUSE_UNICODE\r
+ wxCustomTypeInfo( const char *name , wxVariant2StringFnc to, \r
+ wxString2VariantFnc from ) :\r
+ wxTypeInfo( wxT_CUSTOM, to, from, name )\r
+ {}\r
+#endif\r
+};\r
+\r
+class WXDLLIMPEXP_BASE wxEnumTypeInfo : public wxTypeInfo\r
+{\r
+public:\r
+ typedef void (*converterToLong_t)( const wxVariantBase& data, long &result );\r
+ typedef void (*converterFromLong_t)( long data, wxVariantBase &result );\r
+\r
+ wxEnumTypeInfo( wxTypeKind kind, wxEnumData* enumInfo, wxVariant2StringFnc to,\r
+ wxString2VariantFnc from, converterToLong_t toLong,\r
+ converterFromLong_t fromLong, const wxString &name ) :\r
+ wxTypeInfo( kind, to, from, name ), m_toLong( toLong ), m_fromLong( fromLong )\r
+ { \r
+ wxASSERT_MSG( kind == wxT_ENUM || kind == wxT_SET,\r
+ wxT("Illegal Kind for Enum Type")); \r
+ m_enumInfo = enumInfo; \r
+ }\r
+\r
+#if wxUSE_UNICODE\r
+ wxEnumTypeInfo( wxTypeKind kind, wxEnumData* enumInfo, wxVariant2StringFnc to,\r
+ wxString2VariantFnc from, converterToLong_t toLong,\r
+ converterFromLong_t fromLong, const char * name ) :\r
+ wxTypeInfo( kind, to, from, name ), m_toLong( toLong ), m_fromLong( fromLong )\r
+ {\r
+ wxASSERT_MSG( kind == wxT_ENUM || kind == wxT_SET, \r
+ wxT("Illegal Kind for Enum Type")); \r
+ m_enumInfo = enumInfo; \r
+ }\r
+#endif\r
+ const wxEnumData* GetEnumData() const { return m_enumInfo; }\r
+\r
+ // convert a wxVariantBase holding data of this type into a long\r
+ void ConvertToLong( const wxVariantBase& data, long &result ) const\r
+ { \r
+ if( m_toLong ) \r
+ (*m_toLong)( data, result ); \r
+ else \r
+ wxLogError( wxGetTranslation(_T("Long Conversions not supported")) ); \r
+ }\r
+\r
+ // convert a long into a wxVariantBase holding the corresponding data in this type\r
+ void ConvertFromLong( long data, wxVariantBase &result ) const\r
+ { \r
+ if( m_fromLong ) \r
+ (*m_fromLong)( data, result ); \r
+ else \r
+ wxLogError( wxGetTranslation(_T("Long Conversions not supported")) ); \r
+ }\r
+\r
+private:\r
+ converterToLong_t m_toLong;\r
+ converterFromLong_t m_fromLong;\r
+\r
+ wxEnumData *m_enumInfo; // Kind == wxT_ENUM or Kind == wxT_SET\r
+};\r
+\r
+class WXDLLIMPEXP_BASE wxClassTypeInfo : public wxTypeInfo\r
+{\r
+public:\r
+ wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo, \r
+ wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL, \r
+ const wxString &name = wxEmptyString);\r
+\r
+#if wxUSE_UNICODE\r
+ wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo, wxVariant2StringFnc to,\r
+ wxString2VariantFnc from , const char *name );\r
+#endif\r
+\r
+ const wxClassInfo *GetClassInfo() const { return m_classInfo; }\r
+\r
+private:\r
+ wxClassInfo *m_classInfo; // Kind == wxT_OBJECT - could be NULL\r
+};\r
+\r
+class WXDLLIMPEXP_BASE wxCollectionTypeInfo : public wxTypeInfo\r
+{\r
+public:\r
+ wxCollectionTypeInfo( const wxString &elementName, wxVariant2StringFnc to,\r
+ wxString2VariantFnc from , const wxString &name) :\r
+ wxTypeInfo( wxT_COLLECTION, to, from, name )\r
+ { m_elementTypeName = elementName; m_elementType = NULL; }\r
+\r
+#if wxUSE_UNICODE\r
+ wxCollectionTypeInfo( const char *elementName, wxVariant2StringFnc to, \r
+ wxString2VariantFnc from , const char *name ) :\r
+ wxTypeInfo( wxT_COLLECTION, to, from, name )\r
+ { m_elementTypeName = wxString::FromAscii( elementName ); m_elementType = NULL; }\r
+#endif\r
+\r
+ const wxTypeInfo* GetElementType() const\r
+ {\r
+ if ( m_elementType == NULL )\r
+ m_elementType = wxTypeInfo::FindType( m_elementTypeName );\r
+ return m_elementType; \r
+ }\r
+\r
+private:\r
+ mutable wxTypeInfo * m_elementType;\r
+ wxString m_elementTypeName;\r
+};\r
+\r
+class WXDLLIMPEXP_BASE wxEventSourceTypeInfo : public wxTypeInfo\r
+{\r
+public:\r
+ wxEventSourceTypeInfo( int eventType, wxClassInfo* eventClass, \r
+ wxVariant2StringFnc to = NULL, \r
+ wxString2VariantFnc from = NULL );\r
+ wxEventSourceTypeInfo( int eventType, int lastEventType, wxClassInfo* eventClass, \r
+ wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL );\r
+\r
+ int GetEventType() const { return m_eventType; }\r
+ int GetLastEventType() const { return m_lastEventType; }\r
+ const wxClassInfo* GetEventClass() const { return m_eventClass; }\r
+\r
+private:\r
+ const wxClassInfo *m_eventClass; // (extended will merge into classinfo)\r
+ int m_eventType;\r
+ int m_lastEventType;\r
+};\r
+\r
+template<typename T> const wxTypeInfo* wxGetTypeInfo( T * ) \\r
+ { return wxTypeInfo::FindType(typeid(T).name()); }\r
+\r
+// this macro is for usage with custom, non-object derived classes and structs, \r
+// wxPoint is such a custom type\r
+\r
+#if wxUSE_FUNC_TEMPLATE_POINTER\r
+ #define wxCUSTOM_TYPE_INFO( e, toString, fromString ) \\r
+ wxCustomTypeInfo s_typeInfo##e(typeid(e).name(), &toString, &fromString);\r
+#else\r
+ #define wxCUSTOM_TYPE_INFO( e, toString, fromString ) \\r
+ void ToString##e( const wxVariantBase& data, wxString &result ) \\r
+ { toString(data, result); } \\r
+ void FromString##e( const wxString& data, wxVariantBase &result ) \\r
+ { fromString(data, result); } \\r
+ wxCustomTypeInfo s_typeInfo##e(typeid(e).name(), \\r
+ &ToString##e, &FromString##e);\r
+#endif\r
+\r
+#define wxCOLLECTION_TYPE_INFO( element, collection ) \\r
+ wxCollectionTypeInfo s_typeInfo##collection( typeid(element).name(), \\r
+ NULL, NULL, typeid(collection).name() );\r
+\r
+// sometimes a compiler invents specializations that are nowhere called, \r
+// use this macro to satisfy the refs, currently we don't have to play \r
+// tricks, but if we will have to according to the compiler, we will use \r
+// that macro for that\r
+\r
+#define wxILLEGAL_TYPE_SPECIALIZATION( a )\r
+\r
+#endif // wxUSE_EXTENDED_RTTI\r
+#endif // _XTITYPES_H_\r