From: Andrew Cox Date: Fri, 12 Dec 2014 15:02:03 +0000 (+0000) Subject: Removed Boost Scoped Pointer X-Git-Tag: dali_1.0.22~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=962c0ecaccaf62124c71e4bbaad146e16c330157;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Removed Boost Scoped Pointer Replaced with our own one in Dali Core. Change-Id: I597e396c7397db2846b9d973e4994a5513bc10ce Signed-off-by: Andrew Cox --- diff --git a/platform-abstractions/slp/resource-loader/model-builder.h b/platform-abstractions/slp/resource-loader/model-builder.h index 1ada959..8af238d 100644 --- a/platform-abstractions/slp/resource-loader/model-builder.h +++ b/platform-abstractions/slp/resource-loader/model-builder.h @@ -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; }; diff --git a/platform-abstractions/slp/resource-loader/resource-loader.cpp b/platform-abstractions/slp/resource-loader/resource-loader.cpp index 309328a..64b7912 100755 --- a/platform-abstractions/slp/resource-loader/resource-loader.cpp +++ b/platform-abstractions/slp/resource-loader/resource-loader.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #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; diff --git a/platform-abstractions/slp/resource-loader/resource-loader.h b/platform-abstractions/slp/resource-loader/resource-loader.h index 87506c6..dccb366 100644 --- a/platform-abstractions/slp/resource-loader/resource-loader.h +++ b/platform-abstractions/slp/resource-loader/resource-loader.h @@ -23,8 +23,6 @@ #include #include -#include - #include #include #include FT_FREETYPE_H diff --git a/platform-abstractions/slp/resource-loader/resource-thread-base.cpp b/platform-abstractions/slp/resource-loader/resource-thread-base.cpp index 5071916..987c073 100644 --- a/platform-abstractions/slp/resource-loader/resource-thread-base.cpp +++ b/platform-abstractions/slp/resource-loader/resource-thread-base.cpp @@ -23,7 +23,6 @@ using namespace Dali::Integration; using boost::mutex; using boost::unique_lock; -using boost::scoped_ptr; namespace Dali { diff --git a/platform-abstractions/slp/resource-loader/resource-thread-model.cpp b/platform-abstractions/slp/resource-loader/resource-thread-model.cpp index 9f91292..9b2b49a 100644 --- a/platform-abstractions/slp/resource-loader/resource-thread-model.cpp +++ b/platform-abstractions/slp/resource-loader/resource-thread-model.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #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( CreateModelBuilder(request.GetPath()) ); + ScopedPointer 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 modelBuilder (new BinaryModelBuilder(request.GetPath().c_str())); + ScopedPointer modelBuilder (new BinaryModelBuilder(request.GetPath().c_str())); if ( modelBuilder->Write(modelData) ) { success = true; diff --git a/platform-abstractions/slp/resource-loader/resource-thread-shader.cpp b/platform-abstractions/slp/resource-loader/resource-thread-shader.cpp index dc72fae..886e700 100644 --- a/platform-abstractions/slp/resource-loader/resource-thread-shader.cpp +++ b/platform-abstractions/slp/resource-loader/resource-thread-shader.cpp @@ -18,14 +18,13 @@ #include #include "resource-thread-shader.h" - #include #include +#include using namespace Dali::Integration; using boost::mutex; using boost::unique_lock; -using boost::scoped_ptr; namespace Dali {