There is no cashflowtype in the Outputfile of ORE. As I could not find any option in the configuration files to add the type, i tried to implement it myself. I added some lines in the OREAnalytics/reportwriter.cpp->writeCashflows(…).At the moment I determin the type from the dynamic_cast of this object “ptrFlow”.
The problem we have seen before is from a QuantLib point of view, there is no categorisation of cashflows built in, they are just amount/date pairs. If you make assumptions (e.g. that Coupon means cashflow=INT) this might not always work (e.g. for something that inherits from Coupon). There is already some logic in writeCashflows() to handle some of the different cashflow types, is but as more trade types are added it might become difficult.
So if you really need this categorisation than I don’t think there is a better way to get this information, are you going to create an MR on github?
As it is all open source, you can of course make the code changes you suggest and submit them to the project on github. This submission is a merge request, if it is successful then it will be added to ORE.