Gnats 4629 Original Title: Supplied deleted when Exchange is deleted. (that's not actually happening). Revised Title: Removing a Supply reference from an Exchange or Payback corrupts the Supply Type. ============= ------------------------------- Accounting/AccountingCBData.hpp Accounting/Supply.hpp Accounting/Supply.cpp ------------------------------- Added AccountingCBData CallbackSubType: supply_role_changed New callbacks generated from the following methods, using this call: callSupplyChangedCallbacks (AccountingCBData::supply_role_changed, ..); (1) void Supply::setStandaloneRole(); <<< NEW METHOD [Gnats 4629] (2) void Supply::setStandaloneRole(SupplyDemandType_t) throw (cwException); (3) void Supply::setExchangeInputRole (Exchange*) throw (cwException); (4) void Supply::setExchangeBorrowRole (Exchange*) throw (cwException); (5) void Supply::setExchangeDestRole (Exchange*) throw (cwException); (6) void Supply::setExchangePaybackRole (Payback*) throw (cwException); ----------------------- Accounting/Exchange.hpp Accounting/Exchange.cpp ----------------------- When removing the _borrowSupply or _destSupply references from the Exchange, those Supplies' Roles are now set back to "Stand Alone" by the Supply method which doesn't effect the Supplies' Types. Changes in: void Exchange::setBorrowSupply (Supply*, bool origDeleted) void Exchange::setDestSupply (Supply*, bool origDeleted) ============= ---------------------- Accounting/Payback.cpp ---------------------- Gnats 4629: Removing a Supply reference from an Exchange (OR PAYBACK) corrupts the Supply Type. [i.e. This bug APPLIES ALSO to the Payback Supplies]. In method, void Payback::setPaybackSupply (Supply*, bool origDeleted) When releasing the previously referenced Supply, call the new version of the Supply::setStandaloneRole() which doesn't nail the Supply Type. ---