Revert "[Tizen] Revert "Remove TypeRegistration from deprecated Image classes""
authorJiyun Yang <ji.yang@samsung.com>
Thu, 22 Nov 2018 02:19:51 +0000 (11:19 +0900)
committerJiyun Yang <ji.yang@samsung.com>
Thu, 22 Nov 2018 02:19:51 +0000 (11:19 +0900)
This reverts commit 698c38bd1a76158dd449639aaf014d7046dd3ae4.

dali/internal/event/images/buffer-image-impl.cpp
dali/internal/event/images/encoded-buffer-image-impl.cpp
dali/internal/event/images/frame-buffer-image-impl.cpp
dali/internal/event/images/image-impl.cpp
dali/internal/event/images/image-impl.h
dali/internal/event/images/native-image-impl.cpp
dali/internal/event/images/nine-patch-image-impl.cpp
dali/internal/event/images/resource-image-impl.cpp
dali/internal/event/images/resource-image-impl.h

index 008a361..7ad879b 100644 (file)
@@ -34,11 +34,6 @@ namespace Dali
 namespace Internal
 {
 
-namespace
-{
-TypeRegistration mType( typeid( Dali::BufferImage ), typeid( Dali::Image ), NULL );
-} // unnamed namespace
-
 BufferImagePtr BufferImage::New( unsigned int width,
                                  unsigned int height,
                                  Pixel::Format pixelformat )
index d6d5de0..255709a 100644 (file)
@@ -35,8 +35,6 @@ namespace Internal
 namespace
 {
 
-TypeRegistration mType( typeid( Dali::EncodedBufferImage ), typeid( Dali::Image ), NULL );
-
 /** Raw bytes of a resource laid out exactly as it would be in a file, but in memory. */
 typedef Dali::RefCountedVector<uint8_t> RequestBuffer;
 /** Counting smart pointer for managing a buffer of raw bytes. */
index 15aa6a8..def730a 100644 (file)
@@ -30,8 +30,6 @@ namespace Internal
 
 namespace
 {
-TypeRegistration mType( typeid( Dali::FrameBufferImage ), typeid( Dali::Image ), NULL );
-
 const int RenderBufferFormatToFrameBufferAttachments[]  = { Dali::FrameBuffer::Attachment::NONE,
                                                             Dali::FrameBuffer::Attachment::DEPTH,
                                                             Dali::FrameBuffer::Attachment::STENCIL,
index 8357fcf..49d7f54 100644 (file)
@@ -37,38 +37,6 @@ namespace Dali
 namespace Internal
 {
 
-namespace
-{
-
-// Signals
-
-const char* const SIGNAL_IMAGE_UPLOADED = "uploaded";
-
-TypeRegistration mType( typeid( Dali::Image ), typeid( Dali::BaseHandle ), NULL );
-
-Dali::SignalConnectorType signalConnector1( mType, SIGNAL_IMAGE_UPLOADED, &Image::DoConnectSignal );
-
-}
-
-bool Image::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
-{
-  bool connected( true );
-  DALI_ASSERT_DEBUG( dynamic_cast<Image*>( object ) && "Failed to downcast from BaseObject to Image.\n" );
-  Image* image = static_cast<Image*>(object);
-
-  if( 0 == strcmp( signalName.c_str(), SIGNAL_IMAGE_UPLOADED ) )
-  {
-    image->UploadedSignal().Connect( tracker, functor );
-  }
-  else
-  {
-    // signalName does not match any signal
-    connected = false;
-  }
-
-  return connected;
-}
-
 unsigned int Image::GetWidth() const
 {
   return mWidth;
index 2a4f142..de6df50 100644 (file)
@@ -51,17 +51,6 @@ public:
   Dali::Image::ImageSignalType& UploadedSignal() { return mUploaded; }
 
   /**
-   * Connects a callback function with the object's signals.
-   * @param[in] object The object providing the signal.
-   * @param[in] tracker Used to disconnect the signal.
-   * @param[in] signalName The signal to connect to.
-   * @param[in] functor A newly allocated FunctorDelegate.
-   * @return True if the signal was connected.
-   * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
-   */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
-
-  /**
    * Get the width of the image.
    * Only to be used after the image has finished loading.
    * (Ticket's LoadingSucceeded callback was called)
index d7e3f9e..39c8ecb 100644 (file)
@@ -33,11 +33,6 @@ namespace Dali
 namespace Internal
 {
 
-namespace
-{
-TypeRegistration mType( typeid(Dali::NativeImage), typeid(Dali::Image), NULL );
-}
-
 NativeImage::NativeImage( NativeImageInterface& resourceData )
 : Image()
 {
index 7662edc..ca96236 100644 (file)
@@ -167,11 +167,6 @@ namespace Dali
 namespace Internal
 {
 
-namespace
-{
-TypeRegistration mType( typeid( Dali::NinePatchImage ), typeid( Dali::Image ), NULL );
-} // unnamed namespace
-
 NinePatchImagePtr NinePatchImage::New( const std::string& filename )
 {
   Internal::NinePatchImagePtr internal( new NinePatchImage( filename ) );
index 5efe567..737eb37 100644 (file)
@@ -38,26 +38,6 @@ namespace Dali
 namespace Internal
 {
 
-namespace
-{
-
-// Signals
-
-const char* const SIGNAL_IMAGE_LOADING_FINISHED = "imageLoadingFinished";
-
-
-BaseHandle CreateImage()
-{
-  ImagePtr image = ResourceImage::New();
-  return Dali::Image(image.Get());
-}
-
-TypeRegistration mType( typeid( Dali::ResourceImage ), typeid( Dali::Image ), CreateImage );
-
-Dali::SignalConnectorType signalConnector1( mType, SIGNAL_IMAGE_LOADING_FINISHED, &ResourceImage::DoConnectSignal );
-
-}
-
 ResourceImage::ResourceImage()
 : Image(),
   mLoadingFinished(),
@@ -107,26 +87,6 @@ ResourceImage::~ResourceImage()
 {
 }
 
-bool ResourceImage::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
-{
-  bool connected( true );
-  DALI_ASSERT_DEBUG( dynamic_cast<ResourceImage*>( object ) && "Failed to downcast from BaseObject to ResourceImage.\n" );
-  ResourceImage* image = static_cast<ResourceImage*>(object);
-
-  if( 0 == strcmp( signalName.c_str(), SIGNAL_IMAGE_LOADING_FINISHED ) )
-  {
-    image->LoadingFinishedSignal().Connect( tracker, functor );
-  }
-  else
-  {
-    // signalName does not match any signal
-    connected = false;
-  }
-
-  return connected;
-}
-
-
 const ImageAttributes& ResourceImage::GetAttributes() const
 {
   return mAttributes;
index 5843fd8..ce1d227 100644 (file)
@@ -71,17 +71,6 @@ public:
   Dali::ResourceImage::ResourceImageSignal& LoadingFinishedSignal() { return mLoadingFinished; }
 
   /**
-   * Connects a callback function with the object's signals.
-   * @param[in] object The object providing the signal.
-   * @param[in] tracker Used to disconnect the signal.
-   * @param[in] signalName The signal to connect to.
-   * @param[in] functor A newly allocated FunctorDelegate.
-   * @return True if the signal was connected.
-   * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
-   */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
-
-  /**
    * Get the attributes of the image.
    * Only to be used after the image has finished loading.
    * (Ticket's LoadingSucceeded callback was called)