projects
/
platform
/
core
/
uifw
/
dali-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix SVACE issue
[platform/core/uifw/dali-core.git]
/
dali
/
internal
/
event
/
animation
/
linear-constrainer-impl.cpp
diff --git
a/dali/internal/event/animation/linear-constrainer-impl.cpp
b/dali/internal/event/animation/linear-constrainer-impl.cpp
index
8d9d014
..
41f6248
100644
(file)
--- a/
dali/internal/event/animation/linear-constrainer-impl.cpp
+++ b/
dali/internal/event/animation/linear-constrainer-impl.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 201
5
Samsung Electronics Co., Ltd.
+ * Copyright (c) 201
7
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-24,6
+24,8
@@
// INTERNAL INCLUDES
#include <dali/internal/event/common/property-helper.h>
#include <dali/public-api/animation/constraint.h>
// INTERNAL INCLUDES
#include <dali/internal/event/common/property-helper.h>
#include <dali/public-api/animation/constraint.h>
+#include <dali/public-api/object/property-array.h>
+
namespace Dali
{
namespace Dali
{
@@
-64,11
+66,11
@@
unsigned int LinearConstrainer::GetDefaultPropertyCount() const
void LinearConstrainer::GetDefaultPropertyIndices( Property::IndexContainer& indices ) const
{
void LinearConstrainer::GetDefaultPropertyIndices( Property::IndexContainer& indices ) const
{
- indices.
r
eserve( DEFAULT_PROPERTY_COUNT );
+ indices.
R
eserve( DEFAULT_PROPERTY_COUNT );
for ( int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
{
for ( int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
{
- indices.
push_b
ack( i );
+ indices.
PushB
ack( i );
}
}
}
}
@@
-113,47
+115,70
@@
Property::Type LinearConstrainer::GetDefaultPropertyType(Property::Index index)
Property::Value LinearConstrainer::GetDefaultProperty( Property::Index index ) const
{
Property::Value LinearConstrainer::GetDefaultProperty( Property::Index index ) const
{
- Property::Value value;
if( index == Dali::LinearConstrainer::Property::VALUE )
{
if( index == Dali::LinearConstrainer::Property::VALUE )
{
- value = Property::Value(Property::ARRAY);
+ Property::Value value( Property::ARRAY );
+ Property::Array* array = value.GetArray();
size_t count( mValue.Size() );
size_t count( mValue.Size() );
- for( size_t i( 0 ); i != count; ++i )
+
+ if( array )
{
{
- value.AppendItem( mValue[i] );
+ array->Reserve( count );
+ for( size_t i( 0 ); i != count; ++i )
+ {
+ array->PushBack( mValue[i] );
+ }
}
}
+ return value;
}
else if( index == Dali::LinearConstrainer::Property::PROGRESS )
{
}
else if( index == Dali::LinearConstrainer::Property::PROGRESS )
{
- value = Property::Value(Property::ARRAY);
- size_t count( mValue.Size() );
- for( size_t i( 0 ); i != count; ++i )
+ Property::Value value( Property::ARRAY );
+ Property::Array* array = value.GetArray();
+ size_t count( mProgress.Size() );
+
+ if( array )
{
{
- value.AppendItem( mProgress[i] );
+ array->Reserve( count );
+ for( size_t i( 0 ); i != count; ++i )
+ {
+ array->PushBack( mProgress[i] );
+ }
}
}
+ return value;
}
}
- return
value
;
+ return
Property::Value()
;
}
}
-void LinearConstrainer::SetDefaultProperty(Property::Index index, const Property::Value& propertyValue)
+Property::Value LinearConstrainer::GetDefaultPropertyCurrentValue( Property::Index index ) const
{
{
- if( index == Dali::LinearConstrainer::Property::VALUE )
+ return GetDefaultProperty( index ); // Event-side only properties
+}
+
+void LinearConstrainer::SetDefaultProperty( Property::Index index, const Property::Value& propertyValue )
+{
+ const Property::Array* array = propertyValue.GetArray();
+ if( array )
{
{
- size_t propertyArrayCount = propertyValue.GetSize();
- mValue.Resize( propertyArrayCount );
- for( size_t i(0); i != propertyArrayCount; ++i )
+ size_t propertyArrayCount = array->Count();
+ if( index == Dali::LinearConstrainer::Property::VALUE )
{
{
- propertyValue.GetItem(i).Get( mValue[i] );
+ mValue.Clear(); // remove old values
+ mValue.Resize( propertyArrayCount );
+ for( size_t i(0); i != propertyArrayCount; ++i )
+ {
+ array->GetElementAt( i ).Get( mValue[ i ] );
+ }
}
}
- }
- else if( index == Dali::LinearConstrainer::Property::PROGRESS )
- {
- size_t propertyArrayCount = propertyValue.GetSize();
- mProgress.Resize( propertyArrayCount );
- for( size_t i(0); i != propertyArrayCount; ++i )
+ else if( index == Dali::LinearConstrainer::Property::PROGRESS )
{
{
- propertyValue.GetItem(i).Get( mProgress[i] );
+ mProgress.Clear(); // remove old values
+ mProgress.Resize( propertyArrayCount );
+ for( size_t i(0); i != propertyArrayCount; ++i )
+ {
+ array->GetElementAt( i ).Get( mProgress[ i ] );
+ }
}
}
}
}
}
}