projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updates required for https://review.tizen.org/gerrit/#/c/41602/
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
builder
/
builder-set-property.cpp
diff --git
a/dali-toolkit/internal/builder/builder-set-property.cpp
b/dali-toolkit/internal/builder/builder-set-property.cpp
index
184d253
..
77fa1f4
100644
(file)
--- a/
dali-toolkit/internal/builder/builder-set-property.cpp
+++ b/
dali-toolkit/internal/builder/builder-set-property.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 201
4
Samsung Electronics Co., Ltd.
+ * Copyright (c) 201
5
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.
@@
-17,7
+17,9
@@
// EXTERNAL INCLUDES
#include <sstream>
// EXTERNAL INCLUDES
#include <sstream>
-#include <dali/public-api/adaptor-framework/color-controller.h>
+#include <dali/public-api/object/property-array.h>
+#include <dali/public-api/object/property-map.h>
+#include <dali/devel-api/adaptor-framework/color-controller.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/builder/builder-impl.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/builder/builder-impl.h>
@@
-352,18
+354,19
@@
bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::V
else if(node.Size())
{
value = Property::Value(Property::ARRAY);
else if(node.Size())
{
value = Property::Value(Property::ARRAY);
+ Property::Array* array = value.GetArray();
unsigned int i = 0;
TreeNode::ConstIterator iter(node.CBegin());
for( ; i < node.Size(); ++i, ++iter)
{
unsigned int i = 0;
TreeNode::ConstIterator iter(node.CBegin());
for( ; i < node.Size(); ++i, ++iter)
{
- Property::Value
v
;
- if( SetPropertyFromNode( (*iter).second,
v
, replacer ) )
+ Property::Value
childValue
;
+ if( SetPropertyFromNode( (*iter).second,
childValue
, replacer ) )
{
{
-
value.AppendItem(v
);
+
array->PushBack( childValue
);
}
}
}
}
- if(
value.GetSize() == static_cast<int>(node.Size()
) )
+ if(
array->Count() == node.Size(
) )
{
done = true;
}
{
done = true;
}
@@
-383,18
+386,19
@@
bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::V
else if(node.Size())
{
value = Property::Value(Property::MAP);
else if(node.Size())
{
value = Property::Value(Property::MAP);
+ Property::Map* map = value.GetMap();
unsigned int i = 0;
TreeNode::ConstIterator iter(node.CBegin());
for( ; i < node.Size(); ++i, ++iter)
{
unsigned int i = 0;
TreeNode::ConstIterator iter(node.CBegin());
for( ; i < node.Size(); ++i, ++iter)
{
- Property::Value
v
;
- if( SetPropertyFromNode( (*iter).second,
v
, replacer ) )
+ Property::Value
childValue
;
+ if( SetPropertyFromNode( (*iter).second,
childValue
, replacer ) )
{
{
-
value.SetValue( (*iter).first, v
);
+
map->Insert( (*iter).first, childValue
);
}
}
}
}
- if(
value.GetSize() == static_cast<int>(node.Size()
) )
+ if(
map->Count() == node.Size(
) )
{
done = true;
}
{
done = true;
}
@@
-405,7
+409,6
@@
bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::V
}
break;
}
}
break;
}
- case Property::TYPE_COUNT:
case Property::NONE:
{
break;
case Property::NONE:
{
break;
@@
-490,13
+493,14
@@
bool SetPropertyFromNode( const TreeNode& node, Property::Value& value,
else
{
value = Property::Value(Property::ARRAY);
else
{
value = Property::Value(Property::ARRAY);
- Property::
Value v
;
+ Property::
Array* array = value.GetArray()
;
for(TreeConstIter iter = node.CBegin(); iter != node.CEnd(); ++iter)
{
for(TreeConstIter iter = node.CBegin(); iter != node.CEnd(); ++iter)
{
- if( SetPropertyFromNode( (*iter).second, v, replacer ) )
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
{
{
-
value.AppendItem(v
);
+
array->PushBack( childValue
);
done = true;
}
}
done = true;
}
}
@@
-514,12
+518,13
@@
bool SetPropertyFromNode( const TreeNode& node, Property::Value& value,
if( ((*iter).first) == 0 )
{
value = Property::Value(Property::ARRAY);
if( ((*iter).first) == 0 )
{
value = Property::Value(Property::ARRAY);
- Property::
Value v
;
+ Property::
Array* array = value.GetArray()
;
for(unsigned int i = 0; i < node.Size(); ++i, ++iter)
{
for(unsigned int i = 0; i < node.Size(); ++i, ++iter)
{
- if( SetPropertyFromNode( (*iter).second, v, replacer ) )
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
{
{
-
value.AppendItem(v
);
+
array->PushBack( childValue
);
done = true;
}
}
done = true;
}
}
@@
-527,12
+532,13
@@
bool SetPropertyFromNode( const TreeNode& node, Property::Value& value,
else
{
value = Property::Value(Property::MAP);
else
{
value = Property::Value(Property::MAP);
- Property::
Value v
;
+ Property::
Map* map = value.GetMap()
;
for(unsigned int i = 0; i < node.Size(); ++i, ++iter)
{
for(unsigned int i = 0; i < node.Size(); ++i, ++iter)
{
- if( SetPropertyFromNode( (*iter).second, v, replacer ) )
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
{
{
-
value.SetValue((*iter).first, v
);
+
map->Insert( (*iter).first, childValue
);
done = true;
}
}
done = true;
}
}