Open mondus opened 1 month ago
I disagree with this approach. Rapidjson is fast because it uses CRTP aka static-polymorphism. Introducing virtual on all the handler callbacks will cause a significant overhead for other users of the library. IMO you should introduce a writer template to your JSONStateWriter so you can have two implementations. one for writer and one for prettywriter.
It looks like you already do use templates for your JSONGraphWriter
template<typename T> void writeAnyVertex(T &writer
PrettyWritter
extends theWriter
class but the base class methods are not virtual and as such if a pointer to aPrettyWriter
is cast to aWriter
the default behaviour is that output is not written using pretty formatting.See: https://github.com/FLAMEGPU/FLAMEGPU2/issues/1205