Header for operator<<(std::ostream&, NSObject*) et al.
Boris Dušek
me at dusek.me
Mon Aug 12 00:09:09 PDT 2013
Hello,
I want to submit implementation of Objective-C-related operators <<, like:
std::ostream &operator<<(std::ostream &o, NSString *s)
std::ostream &operator<<(std::ostream &o, NSObject *obj)
std::ostream &operator<<(std::ostream &o, NSPoint point)
etc., motivation is for easy logging with SAL_INFO, SAL_WARN, SAL_DEBUG
I was wondering what would be the best header for that? I am asking the list because also other platforms could use some more special logging of their types (I was thinking stuff like GObject * etc.), so some coordination is needed.
One option is to put all of this stuff e.g. into include/sal/system-type-logging.hxx and there by #ifdef's check what is the current platform and define the appropriate operators for that platform in the respective #ifdef section. So the header would contain stuff for all platforms.
Do you think that is acceptable, or do you suggest a better approach?
Thanks,
Boris
More information about the LibreOffice
mailing list