gcc fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2011-01-07 22:52:46 +00:00
parent 47f73cc455
commit bca6bd3823
3 changed files with 34 additions and 27 deletions

View File

@@ -58,6 +58,7 @@ private :
};
#include "wx/xtiprop.h"
#include "wx/xtictor.h"
// ----------------------------------------------------------------------------
// wxIMPLEMENT class macros for concrete classes
@@ -239,6 +240,29 @@ template<typename T>
void wxFromStringConverter( const wxString &s, wxAny &v)
{ T d; wxStringReadValue(s, d); v = wxAny(d); }
// --------------------------------------------------------------------------
// Collection Support
// --------------------------------------------------------------------------
template<typename iter, typename collection_t > void wxListCollectionToAnyList(
const collection_t& coll, wxAnyList &value )
{
for ( iter current = coll.GetFirst(); current;
current = current->GetNext() )
{
value.Append( new wxAny(current->GetData()) );
}
}
template<typename collection_t> void wxArrayCollectionToVariantArray(
const collection_t& coll, wxAnyList &value )
{
for( size_t i = 0; i < coll.GetCount(); i++ )
{
value.Append( new wxAny(coll[i]) );
}
}
#endif
#endif // _WX_XTIH2__