Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
macmade committed Apr 12, 2016
2 parents 2bd1f0e + fe5d3d8 commit 152d5cd
Show file tree
Hide file tree
Showing 32 changed files with 3,569 additions and 4,150 deletions.
3,629 changes: 1,610 additions & 2,019 deletions Apple/lib/win32/CoreFoundation.def

Large diffs are not rendered by default.

Binary file modified Apple/lib/win32/CoreFoundation.exp
Binary file not shown.
Binary file modified Apple/lib/win32/CoreFoundation.lib
Binary file not shown.
3,598 changes: 1,592 additions & 2,006 deletions Apple/lib/win64/CoreFoundation.def

Large diffs are not rendered by default.

Binary file modified Apple/lib/win64/CoreFoundation.exp
Binary file not shown.
Binary file modified Apple/lib/win64/CoreFoundation.lib
Binary file not shown.
4 changes: 2 additions & 2 deletions CF++/include/CF++/CFPP-Array.hpp
Expand Up @@ -69,8 +69,8 @@ namespace CF

Array & operator << ( CFTypeRef value );
Array & operator << ( const char * value );
Array & operator << ( String value );
Array & operator << ( Number value );
Array & operator << ( const String & value );
Array & operator << ( const Number & value );

CFTypeRef operator [] ( int index ) const;

Expand Down
8 changes: 4 additions & 4 deletions CF++/include/CF++/CFPP-Data.hpp
Expand Up @@ -59,8 +59,8 @@ namespace CF
Data( CFTypeRef value );
Data( CFDataRef value );
Data( CFStringRef value );
Data( std::string value );
Data( Byte * value, CFIndex length );
Data( const std::string & value );
Data( const Byte * value, CFIndex length );

#ifdef CFPP_HAS_CPP11
Data( std::initializer_list< Byte > value );
Expand All @@ -74,7 +74,7 @@ namespace CF
Data & operator = ( CFTypeRef value );
Data & operator = ( CFDataRef value );
Data & operator = ( CFStringRef value );
Data & operator = ( std::string value );
Data & operator = ( const std::string & value );

operator const Byte * () const;
operator std::string () const;
Expand All @@ -85,7 +85,7 @@ namespace CF
Data & operator += ( CFStringRef value );
Data & operator += ( CFDataRef value );
Data & operator += ( const Data & value );
Data & operator += ( std::string value );
Data & operator += ( const std::string & value );

virtual CFTypeID GetTypeID( void ) const;
virtual CFTypeRef GetCFObject( void ) const;
Expand Down
6 changes: 3 additions & 3 deletions CF++/include/CF++/CFPP-Dictionary.hpp
Expand Up @@ -63,12 +63,12 @@ namespace CF
Dictionary & operator = ( CFTypeRef value );
Dictionary & operator = ( CFDictionaryRef value );

Dictionary & operator += ( Pair pair );
Dictionary & operator << ( Pair pair );
Dictionary & operator += ( const Pair & pair );
Dictionary & operator << ( const Pair & pair );

CFTypeRef operator [] ( CFTypeRef key ) const;
CFTypeRef operator [] ( const char * key ) const;
CFTypeRef operator [] ( String key ) const;
CFTypeRef operator [] ( const String & key ) const;

virtual CFTypeID GetTypeID( void ) const;
virtual CFTypeRef GetCFObject( void ) const;
Expand Down
10 changes: 5 additions & 5 deletions CF++/include/CF++/CFPP-Error.hpp
Expand Up @@ -47,14 +47,14 @@ namespace CF
Error( const AutoPointer & value );
Error( CFTypeRef value );
Error( CFErrorRef value );
Error( String domain, Number code );
Error( String domain, Number code, Dictionary userInfo );
Error( const String & domain, const Number & code );
Error( const String & domain, const Number & code, const Dictionary & userInfo );
Error( CFStringRef domain, CFIndex code );
Error( CFStringRef domain, CFIndex code, CFDictionaryRef userInfo );
Error( std::string domain, CFIndex code );
Error( std::string domain, CFIndex code, Dictionary userInfo );
Error( const std::string & domain, CFIndex code );
Error( const std::string & domain, CFIndex code, const Dictionary & userInfo );
Error( const char * domain, CFIndex code );
Error( const char * domain, CFIndex code, Dictionary userInfo );
Error( const char * domain, CFIndex code, const Dictionary & userInfo );

#ifdef CFPP_HAS_CPP11
Error( Error && value );
Expand Down
12 changes: 6 additions & 6 deletions CF++/include/CF++/CFPP-Pair.hpp
Expand Up @@ -44,14 +44,14 @@ namespace CF

Pair( CFTypeRef key, CFTypeRef value );
Pair( const Pair & value );
Pair( String key, CFTypeRef value );
Pair( const String & key, CFTypeRef value );
Pair( const char * key, CFTypeRef value );
Pair( String key, String value );
Pair( const char * key, String value );
Pair( String key, const char * value );
Pair( const String & key, const String & value );
Pair( const char * key, const String & value );
Pair( const String & key, const char * value );
Pair( const char * key, const char * value );
Pair( String key, Number value );
Pair( const char * key, Number value );
Pair( const String & key, const Number & value );
Pair( const char * key, const Number & value );

#ifdef CFPP_HAS_CPP11
Pair( Pair && value );
Expand Down
23 changes: 16 additions & 7 deletions CF++/include/CF++/CFPP-PropertyListType-Definition.hpp
Expand Up @@ -39,7 +39,7 @@
namespace CF
{
template < class T >
T PropertyListType< T >::FromPropertyList( std::string path )
T PropertyListType< T >::FromPropertyList( const std::string & path )
{
Data data;
URL url;
Expand All @@ -65,24 +65,33 @@ namespace CF
}

template < class T >
T PropertyListType< T >::FromPropertyListString( std::string plist )
T PropertyListType< T >::FromPropertyListString( const std::string & plist )
{
if( plist.length() == 0 )
{
return static_cast< CFTypeRef >( NULL );
}

return FromPropertyListData( Data( plist ) );
}

template < class T >
T PropertyListType< T >::FromPropertyListData( const Data & plist )
{
AutoPointer ap;
Data data;

if( plist.length() == 0 )
if( plist.GetLength() == 0 )
{
return static_cast< CFTypeRef >( NULL );
}

data = CF::Data( plist );
ap = CFPropertyListCreateWithData( static_cast< CFAllocatorRef >( NULL ), data, 0, NULL, NULL );
ap = CFPropertyListCreateWithData( static_cast< CFAllocatorRef >( NULL ), plist, 0, NULL, NULL );

return ap.As< T >();
}

template < class T >
bool PropertyListType< T >::ToPropertyList( std::string path, PropertyListFormat format ) const
bool PropertyListType< T >::ToPropertyList( const std::string & path, PropertyListFormat format ) const
{
URL url;
Data d;
Expand Down
7 changes: 4 additions & 3 deletions CF++/include/CF++/CFPP-PropertyListType.hpp
Expand Up @@ -52,9 +52,10 @@ namespace CF
{
public:

static T FromPropertyList( std::string path );
static T FromPropertyListString( std::string plist );
bool ToPropertyList( std::string path, PropertyListFormat format = PropertyListFormatXML ) const;
static T FromPropertyList( const std::string & path );
static T FromPropertyListString( const std::string & plist );
static T FromPropertyListData( const Data & plist );
bool ToPropertyList( const std::string & path, PropertyListFormat format = PropertyListFormatXML ) const;
Data ToPropertyList( PropertyListFormat format = PropertyListFormatXML ) const;
};
}
Expand Down
10 changes: 5 additions & 5 deletions CF++/include/CF++/CFPP-ReadStream.hpp
Expand Up @@ -43,7 +43,7 @@ namespace CF
public:

ReadStream( void );
ReadStream( std::string path );
ReadStream( const std::string & path );
ReadStream( const char * path );
ReadStream( URL url );
ReadStream( const ReadStream & value );
Expand All @@ -66,18 +66,18 @@ namespace CF
virtual CFTypeRef GetCFObject( void ) const;

bool Open( void ) const;
bool Open( std::string path );
bool Open( const std::string & path );
bool Open( const char * path );
bool Open( URL url );
bool Open( const URL & url );
void Close( void ) const;
bool HasBytesAvailable( void ) const;
CFStreamStatus GetStatus( void ) const;
Error GetError( void ) const;
CFIndex Read( Data::Byte * buffer, CFIndex length ) const;
Data Read( CFIndex length = 0 ) const;
const Data::Byte * GetBuffer( CFIndex maxBytesToRead, CFIndex * numBytesRead ) const;
AutoPointer GetProperty( String name );
bool SetProperty( String name, CFTypeRef value );
AutoPointer GetProperty( const String & name );
bool SetProperty( const String & name, CFTypeRef value );
bool SetClient( CFOptionFlags events, CFReadStreamClientCallBack callback, CFStreamClientContext * context );
void ScheduleWithRunLoop( CFRunLoopRef runLoop, CF::String mode );
void UnscheduleFromRunLoop( CFRunLoopRef runLoop, CF::String mode );
Expand Down
20 changes: 10 additions & 10 deletions CF++/include/CF++/CFPP-String.hpp
Expand Up @@ -49,7 +49,7 @@ namespace CF
String( const AutoPointer & value, std::string defaultValueIfNULL, CFStringEncoding encoding = kCFStringEncodingUTF8 );
String( CFTypeRef cfObject, std::string defaultValueIfNULL, CFStringEncoding encoding = kCFStringEncodingUTF8 );
String( CFStringRef cfObject, std::string defaultValueIfNULL, CFStringEncoding encoding = kCFStringEncodingUTF8 );
String( std::string value, CFStringEncoding encoding = kCFStringEncodingUTF8 );
String( const std::string & value, CFStringEncoding encoding = kCFStringEncodingUTF8 );
String( char * value, CFStringEncoding encoding = kCFStringEncodingUTF8 );
String( const char * value, CFStringEncoding encoding = kCFStringEncodingUTF8 );
String( const String & value );
Expand All @@ -64,27 +64,27 @@ namespace CF
String & operator = ( const AutoPointer & value );
String & operator = ( CFTypeRef value );
String & operator = ( CFStringRef value );
String & operator = ( std::string value );
String & operator = ( const std::string & value );
String & operator = ( char * value );
String & operator = ( const char * value );

bool operator == ( const String & value ) const;
bool operator == ( CFTypeRef value ) const;
bool operator == ( CFStringRef value ) const;
bool operator == ( std::string value ) const;
bool operator == ( const std::string & value ) const;
bool operator == ( char * value ) const;
bool operator == ( const char * value ) const;

bool operator != ( const String & value ) const;
bool operator != ( CFTypeRef value ) const;
bool operator != ( CFStringRef value ) const;
bool operator != ( std::string value ) const;
bool operator != ( const std::string & value ) const;
bool operator != ( char * value ) const;
bool operator != ( const char * value ) const;

String & operator += ( const String & value );
String & operator += ( CFStringRef value );
String & operator += ( std::string value );
String & operator += ( const std::string & value );
String & operator += ( char * value );
String & operator += ( const char * value );

Expand All @@ -95,18 +95,18 @@ namespace CF
virtual CFTypeID GetTypeID( void ) const;
virtual CFTypeRef GetCFObject( void ) const;

bool HasPrefix( String value ) const;
bool HasPrefix( const String & value ) const;
bool HasPrefix( CFStringRef value ) const;
bool HasPrefix( std::string value ) const;
bool HasSuffix( String value ) const;
bool HasPrefix( const std::string & value ) const;
bool HasSuffix( const String & value ) const;
bool HasSuffix( CFStringRef value ) const;
bool HasSuffix( std::string value ) const;
bool HasSuffix( const std::string & value ) const;

CFIndex GetLength( void ) const;

std::string GetValue( CFStringEncoding encoding = kCFStringEncodingUTF8 ) const;
const char * GetCStringValue( CFStringEncoding encoding = kCFStringEncodingUTF8 ) const;
void SetValue( std::string value, CFStringEncoding encoding = kCFStringEncodingUTF8 );
void SetValue( const std::string & value, CFStringEncoding encoding = kCFStringEncodingUTF8 );

friend void swap( String & v1, String & v2 );

Expand Down
16 changes: 8 additions & 8 deletions CF++/include/CF++/CFPP-URL.hpp
Expand Up @@ -69,7 +69,7 @@ namespace CF
}
PathStyle;

static URL FileSystemURL( std::string path, bool isDir = false );
static URL FileSystemURL( const std::string & path, bool isDir = false );
static URL FileSystemURL( const char * path, bool isDir = false );
static URL FileSystemURL( CFTypeRef path, bool isDir = false );
static URL FileSystemURL( CFStringRef path, bool isDir = false );
Expand All @@ -80,7 +80,7 @@ namespace CF
URL( CFTypeRef value );
URL( CFURLRef value );
URL( CFStringRef value );
URL( std::string value );
URL( const std::string & value );
URL( const char * value );

#ifdef CFPP_HAS_CPP11
Expand All @@ -94,25 +94,25 @@ namespace CF
URL & operator = ( CFTypeRef value );
URL & operator = ( CFURLRef value );
URL & operator = ( CFStringRef value );
URL & operator = ( std::string value );
URL & operator = ( const std::string & value );
URL & operator = ( const char * value );

bool operator == ( const URL & value ) const;
bool operator == ( CFTypeRef value ) const;
bool operator == ( CFURLRef value ) const;
bool operator == ( CFStringRef value ) const;
bool operator == ( std::string value ) const;
bool operator == ( const std::string & value ) const;
bool operator == ( const char * value ) const;

bool operator != ( const URL & value ) const;
bool operator != ( CFTypeRef value ) const;
bool operator != ( CFURLRef value ) const;
bool operator != ( CFStringRef value ) const;
bool operator != ( std::string value ) const;
bool operator != ( const std::string & value ) const;
bool operator != ( const char * value ) const;

URL & operator /= ( CFStringRef value );
URL & operator /= ( std::string value );
URL & operator /= ( const std::string & value );
URL & operator /= ( const char * value );

std::string operator [] ( Part part ) const;
Expand All @@ -139,10 +139,10 @@ namespace CF
Number GetPortNumber( void ) const;
bool HasDirectoryPath( void ) const;
void AppendPathComponent( CFStringRef component, bool isDirectory = false );
void AppendPathComponent( std::string component, bool isDirectory = false );
void AppendPathComponent( const std::string & component, bool isDirectory = false );
void AppendPathComponent( const char * component, bool isDirectory = false );
void AppendPathExtension( CFStringRef extension );
void AppendPathExtension( std::string extension );
void AppendPathExtension( const std::string & extension );
void AppendPathExtension( const char * extension );
void DeleteLastPathComponent( void );
void DeletePathExtension( void );
Expand Down
11 changes: 9 additions & 2 deletions CF++/include/CF++/CFPP-UUID.hpp
Expand Up @@ -47,6 +47,8 @@ namespace CF
UUID( const AutoPointer & value );
UUID( CFTypeRef value );
UUID( CFUUIDRef value );
UUID( const std::string & value );
UUID( const Data & value );

#ifdef CFPP_HAS_CPP11
UUID( UUID && value );
Expand All @@ -58,23 +60,28 @@ namespace CF
UUID & operator = ( const AutoPointer & value );
UUID & operator = ( CFTypeRef value );
UUID & operator = ( CFUUIDRef value );
UUID & operator = ( const std::string & value );
UUID & operator = ( const Data & value );

bool operator == ( const UUID & value ) const;
bool operator == ( CFTypeRef value ) const;
bool operator == ( CFUUIDRef value ) const;
bool operator == ( std::string value ) const;
bool operator == ( const std::string & value ) const;
bool operator == ( const Data & value ) const;

bool operator != ( const UUID & value ) const;
bool operator != ( CFTypeRef value ) const;
bool operator != ( CFUUIDRef value ) const;
bool operator != ( std::string value ) const;
bool operator != ( const std::string & value ) const;
bool operator != ( const Data & value ) const;

operator std::string () const;

virtual CFTypeID GetTypeID( void ) const;
virtual CFTypeRef GetCFObject( void ) const;

String GetString( void ) const;
Data GetData( void ) const;

friend void swap( UUID & v1, UUID & v2 );

Expand Down
12 changes: 6 additions & 6 deletions CF++/include/CF++/CFPP-WriteStream.hpp
Expand Up @@ -43,7 +43,7 @@ namespace CF
public:

WriteStream( void );
WriteStream( std::string path );
WriteStream( const std::string & path );
WriteStream( const char * path );
WriteStream( URL url );
WriteStream( const WriteStream & value );
Expand All @@ -66,17 +66,17 @@ namespace CF
virtual CFTypeRef GetCFObject( void ) const;

bool Open( void ) const;
bool Open( std::string path );
bool Open( const std::string & path );
bool Open( const char * path );
bool Open( URL url );
bool Open( const URL & url );
void Close( void ) const;
bool CanAcceptBytes( void ) const;
CFStreamStatus GetStatus( void ) const;
Error GetError( void ) const;
CFIndex Write( const Data::Byte * buffer, CFIndex length ) const;
CFIndex Write( Data data ) const;
AutoPointer GetProperty( String name );
bool SetProperty( String name, CFTypeRef value );
CFIndex Write( const Data & data ) const;
AutoPointer GetProperty( const String & name );
bool SetProperty( const String & name, CFTypeRef value );
bool SetClient( CFOptionFlags events, CFWriteStreamClientCallBack callback, CFStreamClientContext * context );
void ScheduleWithRunLoop( CFRunLoopRef runLoop, CF::String mode );
void UnscheduleFromRunLoop( CFRunLoopRef runLoop, CF::String mode );
Expand Down

0 comments on commit 152d5cd

Please sign in to comment.