Created
January 28, 2014 16:49
-
-
Save AlexDenisov/8671497 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::ostream& operator << (std::ostream& os, NSString *string); | |
std::ostream& operator << (std::ostream& os, UIEdgeInsets edgeInsets); | |
std::ostream& operator << (std::ostream& os, CGSize size); | |
std::ostream& operator << (std::ostream& os, CGPoint point); | |
std::ostream& operator << (std::ostream& os, CGRect rect); | |
std::ostream& operator << (std::ostream& os, SEL selector); | |
std::ostream& operator << (std::ostream& os, Class cls); | |
std::ostream& operator << (std::ostream& os, BOOL boolean); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::ostream& operator << (std::ostream& os, NSString *string) | |
{ | |
return os << [string UTF8String]; | |
} | |
std::ostream& operator << (std::ostream& os, UIEdgeInsets edgeInsets) | |
{ | |
return os << NSStringFromUIEdgeInsets(edgeInsets); | |
} | |
std::ostream& operator << (std::ostream& os, CGSize size) | |
{ | |
return os << NSStringFromCGSize(size); | |
} | |
std::ostream& operator << (std::ostream& os, CGPoint point) | |
{ | |
return os << NSStringFromCGPoint(point); | |
} | |
std::ostream& operator << (std::ostream& os, CGRect rect) | |
{ | |
return os << NSStringFromCGRect(rect); | |
} | |
std::ostream& operator << (std::ostream& os, SEL selector) | |
{ | |
return os << NSStringFromSelector(selector); | |
} | |
std::ostream& operator << (std::ostream& os, Class cls) | |
{ | |
return os << NSStringFromClass(cls); | |
} | |
std::ostream& operator << (std::ostream& os, BOOL boolean) | |
{ | |
return os << (boolean ? true : false); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#include "logging.h" | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
cout << @"Hello" << "\t" << @"World" << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment