Closed noodlecollie closed 2 years ago
We don't need the setter and getter. The other members are just public members, and I think this should be as well.
Thank you for youre contribution btw! Will you be able to remove the getter and setter or should I do it?
That's a good point, I'll quickly remove them.
For my particular use case, I have to use
const char*
members in my structs instead ofstd::string
. To accomplish this, I have to keep the parsed strings somewhere in memory and use a custom type handler to provide theconst char*
pointer to the output struct.I realised this process would be made at least a little safer if the
ParseContext
class had support for some user data, since then my string memory pools could be provided on a per-parse basis rather than needing to be static global pools. I've created this PR simply to add avoid*
member to theParseContext
for this purpose. This should allow anyone else to provide context-specific data for when they do their own parsing.