Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


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



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.