예제 #1
0
 ReadStream::ReadStream( const AutoPointer & value ): _cfObject( NULL )
 {
     if( value.IsValid() && value.GetTypeID() == this->GetTypeID() )
     {
         this->_cfObject = static_cast< CFReadStreamRef >( const_cast< void * >( CFRetain( value ) ) );
     }
 }
예제 #2
0
 String::String( const AutoPointer & value ): _cfObject( nullptr )
 {
     if( value.IsValid() && value.GetTypeID() == this->GetTypeID() )
     {
         this->_cfObject = static_cast< CFStringRef >( const_cast< void * >( CFRetain( value ) ) );
     }
 }
예제 #3
0
 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 );
     }
 }