--- a/src/property.h Fri Dec 06 21:30:58 2013 +0200 +++ b/src/property.h Sat Dec 07 00:01:20 2013 +0200 @@ -39,6 +39,7 @@ #define GET_READ_METHOD_NO_OPS( NAME ) get##NAME() #define GET_READ_METHOD_STR_OPS( NAME ) get##NAME() #define GET_READ_METHOD_NUM_OPS( NAME ) get##NAME() +#define GET_READ_METHOD_LIST_OPS( NAME ) get##NAME() #define DEFINE_WRITE_METHOD_STOCK_WRITE( TYPE, NAME ) \ inline void set##NAME( TYPE const& NAME##_ ) \ @@ -86,4 +87,15 @@ { set##NAME( !m_##NAME ); \ } +#define DEFINE_PROPERTY_LIST_OPS( TYPE, NAME ) \ + void pushTo##NAME( const TYPE::value_type& a ) \ + { TYPE tmp( m_##NAME ); \ + tmp.push_back( a ); \ + set##NAME( tmp ); \ + } \ + \ + inline void clear##NAME() \ + { set##NAME( TYPE() ); \ + } + #endif // LDFORGE_PROPERTY_H \ No newline at end of file