public: \
typedef wxArray_SortFunction<T>::CMPFUNC CMPFUNC; \
public: \
+ name() : std::vector<T>() { } \
+ name(size_type n) : std::vector<T>(n) { } \
+ name(size_type n, const_reference v) : std::vector<T>(n, v) { } \
+ \
void Empty() { clear(); } \
void Clear() { clear(); } \
void Alloc(size_t uiSize) { reserve(uiSize); } \
classexp name : public base \
{ \
public: \
+ name() : base() { } \
+ name(size_type n) : base(n) { } \
+ name(size_type n, const_reference v) : base(n, v) { } \
+ \
T& operator[](size_t uiIndex) const \
{ return (T&)(base::operator[](uiIndex)); } \
T& Item(size_t uiIndex) const \
name() { } \
~name() { } \
\
- name& operator=(const name& src) \
- { base* temp = (base*) this; \
- (*temp) = ((const base&)src); \
- return *this; } \
- \
T& operator[](size_t uiIndex) const \
{ return (T&)(base::operator[](uiIndex)); } \
T& Item(size_t uiIndex) const \
bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }\
}; \
\
+ name(size_type n) { assign(n, value_type()); } \
name(size_type n, const_reference v) { assign(n, v); } \
name(const_iterator first, const_iterator last) \
{ assign(first, last); } \
const_reverse_iterator rbegin() const; \
reverse_iterator rend() { return reverse_iterator(begin() - 1); } \
const_reverse_iterator rend() const; \
- void reserve(size_type n) { base::reserve(n); }; \
+ void reserve(size_type n) { base::reserve(n); } \
void resize(size_type n, value_type v = value_type()) \
{ base::resize(n, v); } \
}
\
~name(); \
\
- void Alloc(size_t count) { reserve(count); } \
+ void Alloc(size_t count) { base::reserve(count); } \
+ void reserve(size_t count) { base::reserve(count); } \
size_t GetCount() const { return base_array::size(); } \
size_t size() const { return base_array::size(); } \
bool IsEmpty() const { return base_array::empty(); } \
WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, wxARRAY_DEFAULT_EXPORT)
#define WX_DECLARE_EXPORTED_BASEARRAY(T, name) \
- WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, WXDLLEXPORT)
+ WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, WXDLLIMPEXP_CORE)
#define WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, expmode) \
typedef T _wxArray##name; \
WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, class wxARRAY_DEFAULT_EXPORT)
#define WX_DEFINE_EXPORTED_TYPEARRAY(T, name, base) \
- WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class WXDLLEXPORT)
+ WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class WXDLLIMPEXP_CORE)
#define WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, base) \
- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, class WXDLLEXPORT)
+ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, class WXDLLIMPEXP_CORE)
#define WX_DEFINE_USER_EXPORTED_TYPEARRAY(T, name, base, expdecl) \
WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class expdecl)
wxARRAY_DEFAULT_EXPORT)
#define WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, base) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, base, WXDLLEXPORT)
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, base, WXDLLIMPEXP_CORE)
#define WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, base, expmode) \
typedef T _wxArray##name; \
#define WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base) \
WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base, \
- WXDLLEXPORT)
+ WXDLLIMPEXP_CORE)
#define WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base, \
expmode) \
WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, wxARRAY_DEFAULT_EXPORT)
#define WX_DECLARE_EXPORTED_OBJARRAY(T, name) \
- WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, WXDLLEXPORT)
+ WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, WXDLLIMPEXP_CORE)
#define WX_DECLARE_OBJARRAY_WITH_DECL(T, name, decl) \
typedef T _wxObjArray##name; \
#define WX_PREPEND_ARRAY(array, other) \
{ \
size_t wxAAcnt = (other).size(); \
- (array).Alloc(wxAAcnt); \
+ (array).reserve(wxAAcnt); \
for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \
{ \
(array).Insert((other)[wxAAn], wxAAn); \
#define WX_APPEND_ARRAY(array, other) \
{ \
size_t wxAAcnt = (other).size(); \
- (array).Alloc(wxAAcnt); \
+ (array).reserve(wxAAcnt); \
for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \
{ \
(array).push_back((other)[wxAAn]); \