SET_PROPERTY_REFERENCE(PROPERTY__HASBUSINESSFUNCTION,mBusinessFunction,Variant);
SET_PROPERTYLIST_REFERENCE(PROPERTY__INCLUDES,mIncludes,SomeItems)
SET_PROPERTYLIST_REFERENCE(PROPERTY__INCLUDESOBJECT,mTypeAndQuantityNodes,TypeAndQuantityNode)
- SET_PROPERTYLIST_REFERENCE(PROPERTY__HASPRICESPECIFICATION,mPriceSpecifications,PriceSpecification)
+ COPY_PROPERTYLIST(PROPERTY__HASPRICESPECIFICATION,mPriceSpecifications,PriceSpecification)
setType(RESOURCE__OFFERING);
}
#define CLEAR_PROPERTYLIST(list,trashHolder) list.destroyCascade(trashHolder);
//#define COPY_PROPERTYLIST(from,toList,getter) if (from != NULL) toList = from->getter();
#define SET_PROPERTYLIST_REFERENCE(property,local,klass) if (has(property)) { PropertyList<GraphItem*> l = getAll(property); PropertyList<klass*> pl; for (int i = 0; i < l.length(); i++) { pl.append((klass*)l.at(i)); } local = pl; }
+#define COPY_PROPERTYLIST(property,local,klass) if (has(property)) { PropertyList<GraphItem*> l = getAll(property); PropertyList<klass*> pl; for (int i = 0; i < l.length(); i++) { klass* o = new klass((klass*)l.at(i)); pl.append(o); } local = pl; }
#include <QList>
#include <QSet>