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/update/common/scene-graph-property-buffer.h>
36 * |name |type |writable|animatable|constraint-input|enum for index-checking|
38 DALI_PROPERTY_TABLE_BEGIN
39 DALI_PROPERTY( "size", UNSIGNED_INTEGER, true, false, true, Dali::PropertyBuffer::Property::SIZE )
40 DALI_PROPERTY( "buffer-format", MAP, false, false, false, Dali::PropertyBuffer::Property::BUFFER_FORMAT )
41 DALI_PROPERTY_TABLE_END( DEFAULT_ACTOR_PROPERTY_START_INDEX )
43 const ObjectImplHelper<DEFAULT_PROPERTY_COUNT> PROPERTY_BUFFER_IMPL = { DEFAULT_PROPERTY_DETAILS };
45 } // unnamed namespace
47 PropertyBufferPtr PropertyBuffer::New()
49 return PropertyBufferPtr( new PropertyBuffer() );
52 void PropertyBuffer::SetSize( std::size_t size )
55 DALI_ASSERT_ALWAYS( false && "MESH_REWORK" );
58 std::size_t PropertyBuffer::GetSize() const
61 DALI_ASSERT_ALWAYS( false && "MESH_REWORK" );
66 void PropertyBuffer::SetData( void* data )
69 DALI_ASSERT_ALWAYS( false && "MESH_REWORK" );
72 Dali::Property::Index PropertyBuffer::GetPropertyIndex( const std::string name, std::size_t index )
75 DALI_ASSERT_ALWAYS( false && "MESH_REWORK" );
79 unsigned int PropertyBuffer::GetDefaultPropertyCount() const
81 return PROPERTY_BUFFER_IMPL.GetDefaultPropertyCount();
84 void PropertyBuffer::GetDefaultPropertyIndices( Property::IndexContainer& indices ) const
86 PROPERTY_BUFFER_IMPL.GetDefaultPropertyIndices( indices );
89 const char* PropertyBuffer::GetDefaultPropertyName(Property::Index index) const
91 return PROPERTY_BUFFER_IMPL.GetDefaultPropertyName( index );
94 Property::Index PropertyBuffer::GetDefaultPropertyIndex( const std::string& name ) const
96 return PROPERTY_BUFFER_IMPL.GetDefaultPropertyIndex( name );
99 bool PropertyBuffer::IsDefaultPropertyWritable( Property::Index index ) const
101 return PROPERTY_BUFFER_IMPL.IsDefaultPropertyWritable( index );
104 bool PropertyBuffer::IsDefaultPropertyAnimatable( Property::Index index ) const
106 return PROPERTY_BUFFER_IMPL.IsDefaultPropertyAnimatable( index );
109 bool PropertyBuffer::IsDefaultPropertyAConstraintInput( Property::Index index ) const
111 return PROPERTY_BUFFER_IMPL.IsDefaultPropertyAConstraintInput( index );
114 Property::Type PropertyBuffer::GetDefaultPropertyType( Property::Index index ) const
116 return PROPERTY_BUFFER_IMPL.GetDefaultPropertyType( index );
119 void PropertyBuffer::SetDefaultProperty( Property::Index index,
120 const Property::Value& propertyValue )
122 PROPERTY_BUFFER_IMPL.SetDefaultProperty( index, propertyValue );
125 void PropertyBuffer::SetSceneGraphProperty( Property::Index index,
126 const CustomProperty& entry,
127 const Property::Value& value )
129 PROPERTY_BUFFER_IMPL.SetSceneGraphProperty( index, entry, value );
132 Property::Value PropertyBuffer::GetDefaultProperty( Property::Index index ) const
134 return PROPERTY_BUFFER_IMPL.GetDefaultProperty( index );
137 const SceneGraph::PropertyOwner* PropertyBuffer::GetPropertyOwner() const
139 return PROPERTY_BUFFER_IMPL.GetPropertyOwner();
142 const SceneGraph::PropertyOwner* PropertyBuffer::GetSceneObject() const
147 const SceneGraph::PropertyBase* PropertyBuffer::GetSceneObjectAnimatableProperty( Property::Index index ) const
149 return PROPERTY_BUFFER_IMPL.GetSceneObjectAnimatableProperty( index );
152 const PropertyInputImpl* PropertyBuffer::GetSceneObjectInputProperty( Property::Index index ) const
154 return PROPERTY_BUFFER_IMPL.GetSceneObjectInputProperty( index );
157 int PropertyBuffer::GetPropertyComponentIndex( Property::Index index ) const
159 return PROPERTY_BUFFER_IMPL.GetPropertyComponentIndex( index );
162 bool PropertyBuffer::OnStage() const
165 DALI_ASSERT_ALWAYS( false && "TODO: MESH_REWORK" );
169 void PropertyBuffer::Connect()
174 void PropertyBuffer::Disconnect()
179 PropertyBuffer::PropertyBuffer()
184 } // namespace Internal