? (className *)(obj) \
: (className *)0)
+#define wxConstCast(obj, className) ((className *)(obj))
+
+#ifdef __WXDEBUG__
+ inline void wxCheckCast(void *ptr)
+ {
+ wxASSERT_MSG( ptr, _T("wxStaticCast() used incorrectly") );
+ }
+
+ #define wxStaticCast(obj, className) \
+ (wxCheckCast(wxDynamicCast(obj, className)), ((className *)(obj)))
+
+#else // !Debug
+ #define wxStaticCast(obj, className) ((className *)(obj))
+#endif // Debug/!Debug
+
// Unfortunately Borland seems to need this include.
#ifdef __BORLANDC__
#if wxUSE_IOSTREAMH
#if defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING
void * operator new (size_t size, wxChar * fileName = NULL, int lineNum = 0);
+
+#if defined(__VISAGECPP__)
+ #if __DEBUG_ALLOC__
+ void operator delete (void * buf,const char * _fname, size_t _line);
+ #endif //__DEBUG_ALLOC__
+#else
void operator delete (void * buf);
+#endif
+ // defined(__VISAGECPP__)
// VC++ 6.0
#if defined(__VISUALC__) && (__VISUALC__ >= 1200)
- void operator delete(void *buf, char*, int);
+ void operator delete(void *buf, wxChar*, int);
#endif
// Causes problems for VC++
#endif
#ifdef __MWERKS__
- void * operator new[] (size_t size, wxChar * fileName , int lineNum = 0);
+ void * operator new[] (size_t size, wxChar * fileName , int lineNum = 0);
+ void * operator new[] (size_t size) { return operator new[] ( size , NULL , 0 ) ; }
void operator delete[] (void * buf);
#endif
inline wxObjectRefData *GetRefData(void) const { return m_refData; }
inline void SetRefData(wxObjectRefData *data) { m_refData = data; }
+//EK
+#if defined(__WXDEBUG__) && defined(__VISAGECPP__)
+public:
+ static int N;
+ static int Nid; // total number of objects and serial counter
+ int id; // serial number for current object
+#endif // __WXDEBUG__
+
protected:
wxObjectRefData* m_refData;
#if wxUSE_SERIAL