"When choosing a container, remember vector is best;
Leave a comment to explain if you choose from the rest!"-Tony Van Eerd, Postmodern C++.
CallDescriptionMap would encapsulate the procedure of figuring out if any of the supported CallDescriptions apply to a given CallEvent. Without such facility i constantly worry about somebody bashing me on reviews for using slow string switches and stuff. However when a CallDescription isn't a simple string, a linear lookup is almost unavoidable. So even though for now i only implement a linear lookup, i guess with a single interface we can later afford a string-map optimization specifically for simple CallDescriptions.
I also add a few unittests for CallDescription with the help of this class.
What about Optional<>? When I first met that function I have fallen in love.