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
Changed all property & signal names to lowerCamelCase
[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
d1ce450
..
7cd45b6
100644
(file)
--- a/
dali-toolkit/internal/builder/builder-set-property.cpp
+++ b/
dali-toolkit/internal/builder/builder-set-property.cpp
@@
-102,7
+102,7
@@
Vector4 HexStringToVector4( const char* s )
/**
* A property value type can be forced when its unknown by a disambiguation convention in the json
* ie "myarray": [1,2,3,4] ; would be a vector but
/**
* A property value type can be forced when its unknown by a disambiguation convention in the json
* ie "myarray": [1,2,3,4] ; would be a vector but
- * "myarray": {
'type-cast':'array', 'value'
:[1,2,3,4]} would be an array
+ * "myarray": {
"typeCast":"array", "value"
:[1,2,3,4]} would be an array
* @param child The node whos string to search for a disambiguated type
* @param value The value to set
* @param overrideMap The user overriding constant map
* @param child The node whos string to search for a disambiguated type
* @param value The value to set
* @param overrideMap The user overriding constant map
@@
-113,7
+113,7
@@
bool Disambiguated(const TreeNode& child, // ConstantLut& constantLut,
Dali::Property::Value& value,
const Replacement& replacement )
{
Dali::Property::Value& value,
const Replacement& replacement )
{
- OptionalString childType = IsString( IsChild(child, "type
-c
ast") );
+ OptionalString childType = IsString( IsChild(child, "type
C
ast") );
OptionalChild childValue = IsChild(child, "value");
if( childType && childValue && (2 == child.Size()) )
OptionalChild childValue = IsChild(child, "value");
if( childType && childValue && (2 == child.Size()) )
@@
-208,18
+208,6
@@
bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::V
}
break;
}
}
break;
}
- case Property::UNSIGNED_INTEGER:
- {
- if( OptionalUnsignedInt v = replacer.IsUnsignedInteger( node) )
- {
- if( *v >= 0 ) // with a loss of resolution....
- {
- value = *v;
- done = true;
- }
- }
- break;
- }
case Property::VECTOR2:
{
if( OptionalVector2 v = replacer.IsVector2(node) )
case Property::VECTOR2:
{
if( OptionalVector2 v = replacer.IsVector2(node) )
@@
-355,24
+343,29
@@
bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::V
{
value = Property::Value(Property::ARRAY);
Property::Array* array = value.GetArray();
{
value = Property::Value(Property::ARRAY);
Property::Array* array = value.GetArray();
+
unsigned int i = 0;
TreeNode::ConstIterator iter(node.CBegin());
unsigned int i = 0;
TreeNode::ConstIterator iter(node.CBegin());
- for( ; i < node.Size(); ++i, ++iter)
+
+ if( array )
{
{
- Property::Value childValue;
- if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ for( ; i < node.Size(); ++i, ++iter)
{
{
- array->PushBack( childValue );
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ {
+ array->PushBack( childValue );
+ }
}
}
- }
- if( array->Count() == node.Size() )
- {
- done = true;
- }
- else
- {
- done = false;
+ if( array->Count() == node.Size() )
+ {
+ done = true;
+ }
+ else
+ {
+ done = false;
+ }
}
}
break;
}
}
break;
@@
-387,29
+380,33
@@
bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::V
{
value = Property::Value(Property::MAP);
Property::Map* map = value.GetMap();
{
value = Property::Value(Property::MAP);
Property::Map* map = value.GetMap();
+
unsigned int i = 0;
TreeNode::ConstIterator iter(node.CBegin());
unsigned int i = 0;
TreeNode::ConstIterator iter(node.CBegin());
- for( ; i < node.Size(); ++i, ++iter)
+
+ if( map )
{
{
- Property::Value childValue;
- if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ for( ; i < node.Size(); ++i, ++iter)
{
{
- map->Insert( (*iter).first, childValue );
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ {
+ map->Insert( (*iter).first, childValue );
+ }
}
}
- }
- if( map->Count() == node.Size() )
- {
- done = true;
- }
- else
- {
- done = false;
+ if( map->Count() == node.Size() )
+ {
+ done = true;
+ }
+ else
+ {
+ done = false;
+ }
}
}
break;
}
}
}
break;
}
- case Property::TYPE_COUNT:
case Property::NONE:
{
break;
case Property::NONE:
{
break;
@@
-496,13
+493,16
@@
bool SetPropertyFromNode( const TreeNode& node, Property::Value& value,
value = Property::Value(Property::ARRAY);
Property::Array* array = value.GetArray();
value = Property::Value(Property::ARRAY);
Property::Array* array = value.GetArray();
-
for(TreeConstIter iter = node.CBegin(); iter != node.CEnd(); ++iter
)
+
if( array
)
{
{
- Property::Value childValue;
- if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ for(TreeConstIter iter = node.CBegin(); iter != node.CEnd(); ++iter)
{
{
- array->PushBack( childValue );
- done = true;
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ {
+ array->PushBack( childValue );
+ done = true;
+ }
}
}
}
}
}
}
@@
-520,13
+520,17
@@
bool SetPropertyFromNode( const TreeNode& node, Property::Value& value,
{
value = Property::Value(Property::ARRAY);
Property::Array* array = value.GetArray();
{
value = Property::Value(Property::ARRAY);
Property::Array* array = value.GetArray();
- for(unsigned int i = 0; i < node.Size(); ++i, ++iter)
+
+ if( array )
{
{
- Property::Value childValue;
- if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ for(unsigned int i = 0; i < node.Size(); ++i, ++iter)
{
{
- array->PushBack( childValue );
- done = true;
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ {
+ array->PushBack( childValue );
+ done = true;
+ }
}
}
}
}
}
}
@@
-534,13
+538,17
@@
bool SetPropertyFromNode( const TreeNode& node, Property::Value& value,
{
value = Property::Value(Property::MAP);
Property::Map* map = value.GetMap();
{
value = Property::Value(Property::MAP);
Property::Map* map = value.GetMap();
- for(unsigned int i = 0; i < node.Size(); ++i, ++iter)
+
+ if( map )
{
{
- Property::Value childValue;
- if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ for(unsigned int i = 0; i < node.Size(); ++i, ++iter)
{
{
- map->Insert( (*iter).first, childValue );
- done = true;
+ Property::Value childValue;
+ if( SetPropertyFromNode( (*iter).second, childValue, replacer ) )
+ {
+ map->Insert( (*iter).first, childValue );
+ done = true;
+ }
}
}
}
}
}
}