Stop trying to find the URL parameter multiple times from property map
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / image / batch-image-visual.h
index e5536e9..d670c5d 100644 (file)
  *
  */
 
+// EXTERNAL INCLUDES
+#include <dali/public-api/common/intrusive-ptr.h>
+
 // INTERNAL HEADER
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/internal/visuals/image-atlas-manager.h>
 
-// EXTERNAL INCLUDES
-#include <dali/public-api/images/resource-image.h>
-
 namespace Dali
 {
 namespace Toolkit
@@ -32,21 +32,20 @@ namespace Toolkit
 namespace Internal
 {
 
+class BatchImageVisual;
+typedef IntrusivePtr< BatchImageVisual > BatchImageVisualPtr;
+
 class BatchImageVisual: public Visual::Base, public ConnectionTracker
 {
 public:
 
   /**
-   * @brief Constructor.
+   * @brief Create a new batch-image visual.
    *
-   * @param[in] factoryCache The VisualFactoryCache object
-   */
-  BatchImageVisual( VisualFactoryCache& factoryCache );
-
-  /**
-   * @brief A reference counted object may only be deleted by calling Unreference().
+   * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
+   * @return A smart-pointer to the newly allocated visual.
    */
-  ~BatchImageVisual();
+  static BatchImageVisualPtr New( VisualFactoryCache& factoryCache, const std::string& url );
 
 public:  // from Visual
 
@@ -78,9 +77,21 @@ public:  // from Visual
 protected:
 
   /**
-   * @copydoc Visua::Base::DoInitialize
+   * @brief Constructor.
+   *
+   * @param[in] factoryCache The VisualFactoryCache object
+   */
+  BatchImageVisual( VisualFactoryCache& factoryCache );
+
+  /**
+   * @brief A reference counted object may only be deleted by calling Unreference().
+   */
+  ~BatchImageVisual();
+
+  /**
+   * @copydoc Visua::Base::DoSetProperties
    */
-  virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap );
+  virtual void DoSetProperties( const Property::Map& propertyMap );
 
   /**
    * @copydoc Visual::Base::DoSetOnStage