X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fbuilder%2Freplacement.cpp;h=a15ef2129de23ac50239bc76cca0fee2f963f01f;hp=7dc78184ab6428797ecf22cc0de23fca919bf2f6;hb=0e1683ef848d1d877e26633609fa95e0d2ab36b5;hpb=2ddfbb9e23a7c3fc30e604236c41e0ef6d2ed6a2 diff --git a/dali-toolkit/internal/builder/replacement.cpp b/dali-toolkit/internal/builder/replacement.cpp index 7dc7818..a15ef21 100644 --- a/dali-toolkit/internal/builder/replacement.cpp +++ b/dali-toolkit/internal/builder/replacement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -292,10 +292,7 @@ OptionalString Replacement::IsString( const TreeNode& node ) const } else { - if( Property::STRING == value.GetType() ) - { - ret = v; // sets the unexpanded. Expansion may occur later in processing with include files - } + ret = v; // sets the unexpanded. Expansion may occur later in processing with include files } } } @@ -324,27 +321,6 @@ OptionalInteger Replacement::IsInteger( const TreeNode & node ) const return ret; } -OptionalUnsignedInt Replacement::IsUnsignedInteger( const TreeNode & node ) const -{ - OptionalUnsignedInt ret; - if( OptionalString replace = HasFullReplacement( node ) ) - { - Property::Value value = GetFullReplacement( *replace ); - if( Property::UNSIGNED_INTEGER == value.GetType() ) - { - ret = value.Get(); - } - } - else - { - if ( OptionalInteger i = ::IsInteger( node ) ) - { - ret = OptionalUnsignedInt(static_cast(*i) ); - } - } - return ret; -} - OptionalVector2 Replacement::IsVector2( const TreeNode & node ) const { OptionalVector2 ret; @@ -453,7 +429,23 @@ OptionalRect Replacement::IsRect( const TreeNode & node ) const return ret; } - +OptionalExtents Replacement::IsExtents( const TreeNode & node ) const +{ + OptionalExtents extents; + if( OptionalString replace = HasFullReplacement( node ) ) + { + Property::Value value = GetFullReplacement( *replace ); + if( Property::EXTENTS == value.GetType() ) + { + extents = value.Get(); + } + } + else + { + extents = ::IsExtents( node ); + } + return extents; +} OptionalFloat Replacement::IsFloat( OptionalChild child ) const { @@ -602,9 +594,20 @@ bool Replacement::IsArray( OptionalChild child, Property::Value& out ) const return ret; } +OptionalExtents Replacement::IsExtents( OptionalChild child ) const +{ + if( child ) + { + return IsExtents( *child ); + } + else + { + return OptionalExtents(); + } +} + } // namespace Internal } // namespace Toolkit } // namespace Dali -