Dali 3D User Interface Engine
property-buffer.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17 
18 // CLASS HEADER
19 #include <dali/devel-api/object/property-buffer.h> // Dali::PropertyBuffer
20 
21 // INTERNAL INCLUDES
22 #include <dali/public-api/object/property-map.h> // Dali::Property::Map
23 #include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
24 
25 namespace Dali
26 {
27 
28 PropertyBuffer PropertyBuffer::New( Dali::Property::Map& bufferFormat, std::size_t size )
29 {
31 
32  propertyBuffer->SetFormat( bufferFormat );
33  propertyBuffer->SetSize( size );
34 
35  return PropertyBuffer( propertyBuffer.Get() );
36 }
37 
39 {
40 }
41 
43 {
44 }
45 
47 : BaseHandle( handle )
48 {
49 }
50 
52 {
53  return PropertyBuffer( dynamic_cast<Dali::Internal::PropertyBuffer*>(handle.GetObjectPtr()));
54 }
55 
57 {
58  BaseHandle::operator=( handle );
59  return *this;
60 }
61 
62 void PropertyBuffer::SetSize( std::size_t size )
63 {
64  GetImplementation(*this).SetSize( size );
65 }
66 
67 std::size_t PropertyBuffer::GetSize() const
68 {
69  return GetImplementation(*this).GetSize();
70 }
71 
72 void PropertyBuffer::SetData( const void* data )
73 {
74  GetImplementation(*this).SetData( data );
75 }
76 
78 : BaseHandle( pointer )
79 {
80 }
81 
82 } // namespace Dali
Dali Docs Home
Read more about Dali