Esempio n. 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 ) ) );
     }
 }
Esempio n. 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 ) ) );
     }
 }
Esempio n. 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 );
     }
 }