2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
22 #include <dali/public-api/object/property-buffer.h> // Dali::Internal::PropertyBuffer
23 #include <dali/internal/event/common/object-impl-helper.h> // Dali::Internal::ObjectHelper
24 #include <dali/internal/event/common/property-helper.h> // DALI_PROPERTY_TABLE_BEGIN, DALI_PROPERTY, DALI_PROPERTY_TABLE_END
25 #include <dali/internal/event/common/stage-impl.h>
26 #include <dali/internal/update/common/scene-graph-property-buffer.h>
37 * |name |type |writable|animatable|constraint-input|enum for index-checking|
39 DALI_PROPERTY_TABLE_BEGIN
40 DALI_PROPERTY( "size", UNSIGNED_INTEGER, true, false, true, Dali::PropertyBuffer::Property::SIZE )
41 DALI_PROPERTY( "buffer-format", MAP, false, false, false, Dali::PropertyBuffer::Property::BUFFER_FORMAT )
42 DALI_PROPERTY_TABLE_END( DEFAULT_ACTOR_PROPERTY_START_INDEX )
44 const ObjectImplHelper<DEFAULT_PROPERTY_COUNT> PROPERTY_BUFFER_IMPL = { DEFAULT_PROPERTY_DETAILS };
46 } // unnamed namespace
48 PropertyBufferPtr PropertyBuffer::New()
50 return PropertyBufferPtr( new PropertyBuffer() );
53 void PropertyBuffer::SetSize( std::size_t size )
56 DALI_ASSERT_ALWAYS( false && "MESH_REWORK" );
59 std::size_t PropertyBuffer::GetSize() const
62 DALI_ASSERT_ALWAYS( false && "MESH_REWORK" );
67 void PropertyBuffer::SetData( void* data )
70 DALI_ASSERT_ALWAYS( false && "MESH_REWORK" );
73 Dali::Property::Index PropertyBuffer::GetPropertyIndex( const std::string name, std::size_t index )
76 DALI_ASSERT_ALWAYS( false && "MESH_REWORK" );
80 const SceneGraph::PropertyBuffer* PropertyBuffer::GetPropertyBufferSceneObject() const
85 unsigned int PropertyBuffer::GetDefaultPropertyCount() const
87 return PROPERTY_BUFFER_IMPL.GetDefaultPropertyCount();
90 void PropertyBuffer::GetDefaultPropertyIndices( Property::IndexContainer& indices ) const
92 PROPERTY_BUFFER_IMPL.GetDefaultPropertyIndices( indices );
95 const char* PropertyBuffer::GetDefaultPropertyName(Property::Index index) const
97 return PROPERTY_BUFFER_IMPL.GetDefaultPropertyName( index );
100 Property::Index PropertyBuffer::GetDefaultPropertyIndex( const std::string& name ) const
102 return PROPERTY_BUFFER_IMPL.GetDefaultPropertyIndex( name );
105 bool PropertyBuffer::IsDefaultPropertyWritable( Property::Index index ) const
107 return PROPERTY_BUFFER_IMPL.IsDefaultPropertyWritable( index );
110 bool PropertyBuffer::IsDefaultPropertyAnimatable( Property::Index index ) const
112 return PROPERTY_BUFFER_IMPL.IsDefaultPropertyAnimatable( index );
115 bool PropertyBuffer::IsDefaultPropertyAConstraintInput( Property::Index index ) const
117 return PROPERTY_BUFFER_IMPL.IsDefaultPropertyAConstraintInput( index );
120 Property::Type PropertyBuffer::GetDefaultPropertyType( Property::Index index ) const
122 return PROPERTY_BUFFER_IMPL.GetDefaultPropertyType( index );
125 void PropertyBuffer::SetDefaultProperty( Property::Index index,
126 const Property::Value& propertyValue )
128 PROPERTY_BUFFER_IMPL.SetDefaultProperty( index, propertyValue );
131 void PropertyBuffer::SetSceneGraphProperty( Property::Index index,
132 const CustomProperty& entry,
133 const Property::Value& value )
135 PROPERTY_BUFFER_IMPL.SetSceneGraphProperty( index, entry, value );
138 Property::Value PropertyBuffer::GetDefaultProperty( Property::Index index ) const
140 return PROPERTY_BUFFER_IMPL.GetDefaultProperty( index );
143 const SceneGraph::PropertyOwner* PropertyBuffer::GetPropertyOwner() const
145 return PROPERTY_BUFFER_IMPL.GetPropertyOwner();
148 const SceneGraph::PropertyOwner* PropertyBuffer::GetSceneObject() const
153 const SceneGraph::PropertyBase* PropertyBuffer::GetSceneObjectAnimatableProperty( Property::Index index ) const
155 return PROPERTY_BUFFER_IMPL.GetSceneObjectAnimatableProperty( index );
158 const PropertyInputImpl* PropertyBuffer::GetSceneObjectInputProperty( Property::Index index ) const
160 return PROPERTY_BUFFER_IMPL.GetSceneObjectInputProperty( index );
163 int PropertyBuffer::GetPropertyComponentIndex( Property::Index index ) const
165 return PROPERTY_BUFFER_IMPL.GetPropertyComponentIndex( index );
168 bool PropertyBuffer::OnStage() const
173 void PropertyBuffer::Connect()
178 void PropertyBuffer::Disconnect()
183 PropertyBuffer::PropertyBuffer()
184 : mSceneObject(NULL),
189 } // namespace Internal