i'm currently working on a system, which needs an eventhandling. One for a global-state of the system, one for an internal state.
I thought of a class, that has a vector<string:string> that is being appended anytime, a new event is being produced. In this vector the first part would be the type of event (warning, exception etc) and the 2nd part a description. It is not seen as errorhandling, more likely than an eventhandling.
I would use this class then two times, one as instance for the globalevents and one for the internalevents.
Then I would think of implementing a search-function to search for a specific event, and functions for getting specific events, like the first/last/byIndex.
I do not want you to program that thing for me. I just like to hear (more likely read) your opinion on that, or more likely if you have any better ideas.