Removed Boost Scoped Pointer 59/31959/6
authorAndrew Cox <andrew.cox@partner.samsung.com>
Fri, 12 Dec 2014 15:02:03 +0000 (15:02 +0000)
committerAndrew Cox <andrew.cox@partner.samsung.com>
Mon, 15 Dec 2014 11:35:14 +0000 (11:35 +0000)
Replaced with our own one in Dali Core.

Change-Id: I597e396c7397db2846b9d973e4994a5513bc10ce
Signed-off-by: Andrew Cox <andrew.cox@partner.samsung.com>
platform-abstractions/slp/resource-loader/model-builder.h
platform-abstractions/slp/resource-loader/resource-loader.cpp
platform-abstractions/slp/resource-loader/resource-loader.h
platform-abstractions/slp/resource-loader/resource-thread-base.cpp
platform-abstractions/slp/resource-loader/resource-thread-model.cpp
platform-abstractions/slp/resource-loader/resource-thread-shader.cpp

index 1ada959..8af238d 100644 (file)
@@ -26,20 +26,26 @@ namespace SlpPlatform
 {
 
 /**
- * Provides a means of creating a Model object from a file, resource or data stream
- * passed in it's ctor.
+ * @brief Provides a means of creating a Model object.
+ *
+ * @sa ResourceThreadModel::CreateModelBuilder
  */
 class ModelBuilder
 {
 public:
   /**
-   * Build the given model
+   * @brief Allow implementing classes to be deleted through a pointer to this interface.
+   */
+  virtual ~ModelBuilder() {}
+
+  /**
+   * @brief Build the given model
    * @param[in] model - the model to build
    */
-  virtual bool Build(ModelData model) = 0;
+  virtual bool Build( ModelData model ) = 0;
 
   /**
-   * Return the model name (usually the basename of the file resource)
+   * @brief Get the model name (usually the basename of the file resource)
    */
   virtual const std::string& GetModelName() = 0;
 };
index 309328a..64b7912 100755 (executable)
@@ -31,6 +31,7 @@
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/common/set-wrapper.h>
 #include <dali/public-api/math/vector2.h>
+#include <dali/public-api/common/scoped-pointer.h>
 #include "resource-requester-base.h"
 #include "resource-bitmap-requester.h"
 #include "resource-model-requester.h"
@@ -55,7 +56,6 @@
 using namespace Dali::Integration;
 using boost::mutex;
 using boost::unique_lock;
-using boost::scoped_ptr;
 
 namespace Dali
 {
@@ -600,7 +600,7 @@ GlyphSet* ResourceLoader::GetGlyphData (const TextResourceType& textRequest,
             then = GetTimeMicroseconds();
           }
 #endif
-          scoped_ptr< GlyphSet::Character > character( GetCharacter(slpFace->face, charCode,
+          ScopedPointer< GlyphSet::Character > character( GetCharacter(slpFace->face, charCode,
                                                                     DISTANCE_FIELD_SIZE, DISTANCE_FIELD_PADDING, textRequest.mMaxGlyphSize,
                                                                     getBitmap, highQuality ) );
 
@@ -613,9 +613,9 @@ GlyphSet* ResourceLoader::GetGlyphData (const TextResourceType& textRequest,
             DALI_LOG_INFO( gLoaderFilter, Log::Verbose, "Generating (%c) in %s quality took %.3f ms\n", charCode, highQuality ? "high" : "low",  1e-3 * ( now - then ) );
           }
 #endif
-          if (character)
+          if (character.Get() != 0 )
           {
-            GlyphSet::Character& glyphCharacter( *character.get() );
+            GlyphSet::Character& glyphCharacter( *character );
 
             glyphCharacter.second.quality = glyphQuality;
             glyphCharacter.second.xPosition = it->xPosition;
index 87506c6..dccb366 100644 (file)
@@ -23,8 +23,6 @@
 #include <dali/integration-api/resource-cache.h>
 #include <dali/public-api/common/dali-vector.h>
 
-#include <boost/scoped_ptr.hpp>
-
 #include <string>
 #include <ft2build.h>
 #include FT_FREETYPE_H
index 5071916..987c073 100644 (file)
@@ -23,7 +23,6 @@
 using namespace Dali::Integration;
 using boost::mutex;
 using boost::unique_lock;
-using boost::scoped_ptr;
 
 namespace Dali
 {
index 9f91292..9b2b49a 100644 (file)
@@ -25,6 +25,7 @@
 #include <dali/public-api/dali-core.h>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/object/base-object.h>
+#include <dali/public-api/common/scoped-pointer.h>
 
 #include "binary-model-builder.h"
 
@@ -38,7 +39,6 @@
 using namespace Dali::Integration;
 using boost::mutex;
 using boost::unique_lock;
-using boost::scoped_ptr;
 
 namespace Dali
 {
@@ -72,9 +72,9 @@ void ResourceThreadModel::Load(const ResourceRequest& request)
   bool success(false);
   ModelData modelData;
 
-  scoped_ptr<ModelBuilder> modelBuilder( CreateModelBuilder(request.GetPath()) );
+  ScopedPointer<ModelBuilder> modelBuilder( CreateModelBuilder(request.GetPath()) );
 
-  if( modelBuilder )
+  if( modelBuilder.Get() != 0 )
   {
     modelData = ModelData::New(modelBuilder->GetModelName());
     success = modelBuilder->Build(modelData);
@@ -111,7 +111,7 @@ void ResourceThreadModel::Save(const ResourceRequest& request)
     ModelData modelData = ModelData::DownCast(baseHandle);
     if( modelData )
     {
-      scoped_ptr<BinaryModelBuilder> modelBuilder (new BinaryModelBuilder(request.GetPath().c_str()));
+      ScopedPointer<BinaryModelBuilder> modelBuilder (new BinaryModelBuilder(request.GetPath().c_str()));
       if ( modelBuilder->Write(modelData) )
       {
         success = true;
index dc72fae..886e700 100644 (file)
 #include <stdio.h>
 
 #include "resource-thread-shader.h"
-
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/shader-data.h>
+#include <dali/public-api/common/scoped-pointer.h>
 
 using namespace Dali::Integration;
 using boost::mutex;
 using boost::unique_lock;
-using boost::scoped_ptr;
 
 namespace Dali
 {