/*
- * 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.
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<unsigned int>();
- }
- }
- else
- {
- if ( OptionalInteger i = ::IsInteger( node ) )
- {
- ret = OptionalUnsignedInt(static_cast<unsigned int>(*i) );
- }
- }
- return ret;
-}
-
OptionalVector2 Replacement::IsVector2( const TreeNode & node ) const
{
OptionalVector2 ret;
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<Extents>();
+ }
+ }
+ else
+ {
+ extents = ::IsExtents( node );
+ }
+ return extents;
+}
OptionalFloat Replacement::IsFloat( OptionalChild child ) const
{
return ret;
}
+OptionalExtents Replacement::IsExtents( OptionalChild child ) const
+{
+ if( child )
+ {
+ return IsExtents( *child );
+ }
+ else
+ {
+ return OptionalExtents();
+ }
+}
+
} // namespace Internal
} // namespace Toolkit
} // namespace Dali
-