示例#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 );
     }
 }