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.
18 #include "type-info-wrapper.h"
23 #include "property-value-wrapper.h"
32 std::vector<std::string> GetAllProperties(Dali::TypeInfo self)
34 std::vector<std::string> names;
36 // get the other properties
37 if(Dali::Handle handle = Dali::Handle::DownCast( self.CreateInstance() ) )
39 typedef Dali::Property::IndexContainer IndexContainer;
41 Dali::Property::IndexContainer indices;
42 handle.GetPropertyIndices( indices );
44 for(IndexContainer::Iterator iter(indices.Begin()); iter != indices.End(); ++iter)
46 std::string name = handle.GetPropertyName( *iter );
48 names.push_back(name);
53 // all we can do is get the event side properties
54 // get the event side properties
55 Property::IndexContainer indices;
56 self.GetPropertyIndices( indices );
57 for(Property::IndexContainer::Iterator iter(indices.Begin()); iter != indices.End(); ++iter)
59 std::string name = self.GetPropertyName( *iter );
60 names.push_back(name);
67 std::vector<int> GetPropertyIndices(Dali::TypeInfo& self)
69 Dali::Property::IndexContainer indices;
70 self.GetPropertyIndices( indices );
72 std::vector<int> ret( indices.Begin(), indices.End() );
76 std::vector<std::string> GetActions(Dali::TypeInfo& self)
78 std::vector<std::string> names;
79 std::size_t size = self.GetActionCount();
80 for(std::size_t i = 0; i < size; i++)
82 names.push_back(self.GetActionName(i));
87 std::vector<std::string> GetSignals(Dali::TypeInfo& self)
89 std::vector<std::string> names;
90 std::size_t size = self.GetSignalCount();
91 for(std::size_t i = 0; i < size; i++)
93 names.push_back(self.GetSignalName(i));
98 std::vector<std::string> GetBases(Dali::TypeInfo& self)
100 std::vector<std::string> names;
102 Dali::TypeRegistry registry = Dali::TypeRegistry::Get();
104 Dali::TypeInfo base = registry.GetTypeInfo( self.GetBaseName() );
108 base = registry.GetTypeInfo( base.GetBaseName() );
109 names.push_back(base.GetName());
115 }; // namespace Emscripten
116 }; // namespace Internal