+// -----------------------------------------------------------------------------
+// convinience macros
+// -----------------------------------------------------------------------------
+
+// append all element of one array to another one
+#define WX_APPEND_ARRAY(array, other) \
+ { \
+ size_t count = other.Count(); \
+ for ( size_t n = 0; n < count; n++ ) \
+ { \
+ array.Add(other[n]); \
+ } \
+ }
+
+// delete all array elements
+//
+// NB: the class declaration of the array elements must be visible from the
+// place where you use this macro, otherwise the proper destructor may not
+// be called (a decent compiler should give a warning about it, but don't
+// count on it)!
+#define WX_CLEAR_ARRAY(array) \
+ { \
+ size_t count = array.Count(); \
+ for ( size_t n = 0; n < count; n++ ) \
+ { \
+ delete array[n]; \
+ } \
+ \
+ array.Empty(); \
+ }
+