]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/object.h
compilation fix for recent commit
[wxWidgets.git] / include / wx / object.h
index 3384b88562ad541255d33dc8acc17d0b321e0250..43688968ab40ef3f0419af1ae64d146e8c60ccf3 100644 (file)
@@ -56,11 +56,11 @@ typedef wxObject *(*wxObjectConstructorFn)(void);
 class WXDLLEXPORT wxClassInfo
 {
 public:
 class WXDLLEXPORT wxClassInfo
 {
 public:
-    wxClassInfo::wxClassInfo(const wxChar *className,
-                             const wxChar *baseName1,
-                             const wxChar *baseName2,
-                             int size,
-                             wxObjectConstructorFn ctor)
+    wxClassInfoconst wxChar *className,
+                 const wxChar *baseName1,
+                 const wxChar *baseName2,
+                 int size,
+                 wxObjectConstructorFn ctor )
         : m_className(className)
         , m_baseClassName1(baseName1)
         , m_baseClassName2(baseName2)
         : m_className(className)
         , m_baseClassName1(baseName1)
         , m_baseClassName2(baseName2)
@@ -195,32 +195,25 @@ WXDLLEXPORT wxObject *wxCreateDynamicObject(const wxChar *name);
 
 #if wxUSE_NESTED_CLASSES
 
 
 #if wxUSE_NESTED_CLASSES
 
-#if 0
-#define _DECLARE_DL_SENTINEL(name)         \
- wxPluginSentinel m_pluginsentinel;
-
-#else
-
-#define _DECLARE_DL_SENTINEL(name)          \
-class  name##PluginSentinel {               \
-private:                                    \
-    static const wxString sm_className;     \
-public:                                     \
-    name##PluginSentinel();                 \
-    ~##name##PluginSentinel();              \
-};                                          \
+#define _DECLARE_DL_SENTINEL(name, exportdecl)  \
+class exportdecl name##PluginSentinel {         \
+private:                                        \
+    static const wxString sm_className;         \
+public:                                         \
+    name##PluginSentinel();                     \
+    ~name##PluginSentinel();                    \
+};                                              \
 name##PluginSentinel  m_pluginsentinel;
 name##PluginSentinel  m_pluginsentinel;
-#endif
 
 #define _IMPLEMENT_DL_SENTINEL(name)                                \
  const wxString name::name##PluginSentinel::sm_className(#name);    \
  name::name##PluginSentinel::name##PluginSentinel() {               \
 
 #define _IMPLEMENT_DL_SENTINEL(name)                                \
  const wxString name::name##PluginSentinel::sm_className(#name);    \
  name::name##PluginSentinel::name##PluginSentinel() {               \
-    wxDLManifestEntry *e = (wxDLManifestEntry*) wxDLManifestEntry::ms_classes.Get(#name);   \
-    if( e != 0 ) { e->Ref(); }                                      \
+    wxPluginLibrary *e = (wxPluginLibrary*) wxPluginLibrary::ms_classes.Get(#name);   \
+    if( e != 0 ) { e->RefObj(); }                                      \
  }                                                                  \
  name::name##PluginSentinel::~##name##PluginSentinel() {            \
  }                                                                  \
  name::name##PluginSentinel::~##name##PluginSentinel() {            \
-    wxDLManifestEntry *e = (wxDLManifestEntry*) wxDLManifestEntry::ms_classes.Get(#name);   \
-    if( e != 0 ) { wxCHECK_RET( !e->Unref(), _T("premature library unlinking") ); }         \
+    wxPluginLibrary *e = (wxPluginLibrary*) wxPluginLibrary::ms_classes.Get(#name);   \
+    if( e != 0 ) { e->UnrefObj(); }                                 \
  }
 #else
 
  }
 #else
 
@@ -230,21 +223,33 @@ name##PluginSentinel  m_pluginsentinel;
 #endif  // wxUSE_NESTED_CLASSES
 
 #define DECLARE_PLUGGABLE_CLASS(name) \
 #endif  // wxUSE_NESTED_CLASSES
 
 #define DECLARE_PLUGGABLE_CLASS(name) \
- DECLARE_DYNAMIC_CLASS(name) _DECLARE_DL_SENTINEL(name)
-
+ DECLARE_DYNAMIC_CLASS(name) _DECLARE_DL_SENTINEL(name, WXDLLEXPORT)
 #define DECLARE_ABSTRACT_PLUGGABLE_CLASS(name)  \
 #define DECLARE_ABSTRACT_PLUGGABLE_CLASS(name)  \
- DECLARE_ABSTRACT_CLASS(name) _DECLARE_DL_SENTINEL(name)
+ DECLARE_ABSTRACT_CLASS(name) _DECLARE_DL_SENTINEL(name, WXDLLEXPORT)
+
+#define DECLARE_USER_EXPORTED_PLUGGABLE_CLASS(name, usergoo) \
+ DECLARE_DYNAMIC_CLASS(name) _DECLARE_DL_SENTINEL(name, usergoo)
+#define DECLARE_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS(name, usergoo)  \
+ DECLARE_ABSTRACT_CLASS(name) _DECLARE_DL_SENTINEL(name, usergoo)
 
 #define IMPLEMENT_PLUGGABLE_CLASS(name, basename) \
  IMPLEMENT_DYNAMIC_CLASS(name, basename) _IMPLEMENT_DL_SENTINEL(name)
 #define IMPLEMENT_PLUGGABLE_CLASS2(name, basename1, basename2)  \
  IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) _IMPLEMENT_DL_SENTINEL(name)
 
 #define IMPLEMENT_PLUGGABLE_CLASS(name, basename) \
  IMPLEMENT_DYNAMIC_CLASS(name, basename) _IMPLEMENT_DL_SENTINEL(name)
 #define IMPLEMENT_PLUGGABLE_CLASS2(name, basename1, basename2)  \
  IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) _IMPLEMENT_DL_SENTINEL(name)
-
 #define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(name, basename) \
  IMPLEMENT_ABSTRACT_CLASS(name, basename) _IMPLEMENT_DL_SENTINEL(name)
 #define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2)  \
  IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) _IMPLEMENT_DL_SENTINEL(name)
 
 #define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(name, basename) \
  IMPLEMENT_ABSTRACT_CLASS(name, basename) _IMPLEMENT_DL_SENTINEL(name)
 #define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2)  \
  IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) _IMPLEMENT_DL_SENTINEL(name)
 
+#define IMPLEMENT_USER_EXPORTED_PLUGGABLE_CLASS(name, basename) \
+ IMPLEMENT_PLUGGABLE_CLASS(name, basename)
+#define IMPLEMENT_USER_EXPORTED_PLUGGABLE_CLASS2(name, basename1, basename2)  \
+ IMPLEMENT_PLUGGABLE_CLASS2(name, basename1, basename2)
+#define IMPLEMENT_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS(name, basename) \
+ IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(name, basename)
+#define IMPLEMENT_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2)  \
+ IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2)
+
 
 #define CLASSINFO(name) (&name::sm_class##name)
 
 
 #define CLASSINFO(name) (&name::sm_class##name)
 
@@ -269,6 +274,13 @@ name##PluginSentinel  m_pluginsentinel;
 #define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(name, basename)
 #define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2)
 
 #define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(name, basename)
 #define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2)
 
+#define DECLARE_USER_EXPORTED_PLUGGABLE_CLASS(name, usergoo)
+#define DECLARE_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS(name, usergoo)
+#define IMPLEMENT_USER_EXPORTED_PLUGGABLE_CLASS(name, basename)
+#define IMPLEMENT_USER_EXPORTED_PLUGGABLE_CLASS2(name, basename1, basename2)
+#define IMPLEMENT_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS(name, basename)
+#define IMPLEMENT_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2)
+
 #endif // wxUSE_DYNAMIC_CLASSES
 
 
 #endif // wxUSE_DYNAMIC_CLASSES