ReadStream::ReadStream( const AutoPointer & value ): _cfObject( NULL ) { if( value.IsValid() && value.GetTypeID() == this->GetTypeID() ) { this->_cfObject = static_cast< CFReadStreamRef >( const_cast< void * >( CFRetain( value ) ) ); } }
String::String( const AutoPointer & value ): _cfObject( nullptr ) { if( value.IsValid() && value.GetTypeID() == this->GetTypeID() ) { this->_cfObject = static_cast< CFStringRef >( const_cast< void * >( CFRetain( value ) ) ); } }
String::String( const AutoPointer & value, std::string defaultValueIfNULL, CFStringEncoding encoding ): _cfObject( nullptr ) { if( value.IsValid() && value.GetTypeID() == this->GetTypeID() ) { this->_cfObject = static_cast< CFStringRef >( const_cast< void * >( CFRetain( value ) ) ); } else { this->SetValue( defaultValueIfNULL, encoding ); } }