X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fcommon%2Ftype-info-impl.h;h=b6545a064be4e8fc576d9fc7e661e29258206859;hb=783cf777ff0e903754ffea8452867e9c225c0aee;hp=b857009143e3832613bb2c17968a0fb163f8f813;hpb=5c66381841dd4dfd82c5a118d34104a00a2e0e1c;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/common/type-info-impl.h b/dali/internal/event/common/type-info-impl.h index b857009..b6545a0 100644 --- a/dali/internal/event/common/type-info-impl.h +++ b/dali/internal/event/common/type-info-impl.h @@ -1,21 +1,22 @@ #ifndef __DALI_INTERNAL_TYPE_INFO_H__ #define __DALI_INTERNAL_TYPE_INFO_H__ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2014 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // EXTERNAL INCLUDES #include @@ -57,32 +58,37 @@ public: /** * @copydoc Dali::TypeInfo::GetName */ - const std::string& GetName(); + const std::string& GetName() const; /** * @copydoc Dali::TypeInfo::GetBaseName */ - const std::string& GetBaseName(); + const std::string& GetBaseName() const; /** * @copydoc TypeInfo::CreateFunction */ - BaseHandle CreateInstance(); + BaseHandle CreateInstance() const; /** * @copydoc Dali::TypeInfo::GetCreator */ - Dali::TypeInfo::CreateFunction GetCreator(); + Dali::TypeInfo::CreateFunction GetCreator() const; /** * @copydoc Dali::TypeInfo::GetActions */ - Dali::TypeInfo::NameContainer GetActions(); + void GetActions( Dali::TypeInfo::NameContainer& container ) const; /** * @copydoc Dali::TypeInfo::GetSignals */ - Dali::TypeInfo::NameContainer GetSignals(); + void GetSignals( Dali::TypeInfo::NameContainer& container) const; + + /** + * @copydoc Dali::TypeInfo::GetProperties + */ + void GetProperties( Dali::TypeInfo::NameContainer& container) const; /** * Adds the property indices to the container specified. @@ -105,7 +111,7 @@ public: * @param[in] signalName The name of the signal. * @param[in] function The function used for connecting to the signal. */ - void AddConnectorFunction( const std::string& signalName, Dali::TypeInfo::SignalConnectorFunctionV2 function ); + void AddConnectorFunction( const std::string& signalName, Dali::TypeInfo::SignalConnectorFunction function ); /** * Adds an event-thread only property to the type. @@ -118,6 +124,14 @@ public: void AddProperty( const std::string& name, Property::Index index, Property::Type type, Dali::TypeInfo::SetPropertyFunction setFunc, Dali::TypeInfo::GetPropertyFunction getFunc ); /** + * Adds an animatable property to the type. + * @param[in] name The name of the property. + * @param[in] index The index of the property + * @param[in] type The Property::Type. + */ + void AddAnimatableProperty( const std::string& name, Property::Index index, Property::Type type ); + + /** * Do an action on base object * @param [in] object The base object to act upon * @param [in] actionName The name of the desired action @@ -170,7 +184,7 @@ public: * @param[in] index The property index. * @param[in] value The value to set. */ - void SetProperty( BaseObject *object, Property::Index index, const Property::Value& value ); + void SetProperty( BaseObject *object, Property::Index index, const Property::Value& value ) const; /** * Sets the value of a property with the name specified for the given object. @@ -178,7 +192,7 @@ public: * @param[in] name The property name. * @param[in] value The value to set. */ - void SetProperty( BaseObject *object, const std::string& name, const Property::Value& value ); + void SetProperty( BaseObject *object, const std::string& name, const Property::Value& value ) const; /** * Retrieves the value of a property at the index specified for the given object. @@ -186,7 +200,7 @@ public: * @param[in] index The property index. * @return The current value of the property. */ - Property::Value GetProperty( const BaseObject *object, Property::Index index ); + Property::Value GetProperty( const BaseObject *object, Property::Index index ) const; /** * Retrieves the value of a property with the name specified for the given object. @@ -194,7 +208,7 @@ public: * @param[in] name The property name. * @return The current value of the property. */ - Property::Value GetProperty( const BaseObject *object, const std::string& name ); + Property::Value GetProperty( const BaseObject *object, const std::string& name ) const; private: @@ -222,19 +236,19 @@ private: std::string name; }; - typedef std::pair ConnectionPairV2; + typedef std::pair ConnectionPair; typedef std::pair ActionPair; typedef std::pair RegisteredPropertyPair; typedef std::vector< ActionPair > ActionContainer; - typedef std::vector< ConnectionPairV2 > ConnectorContainerV2; + typedef std::vector< ConnectionPair > ConnectorContainer; typedef std::vector< RegisteredPropertyPair > RegisteredPropertyContainer; std::string mTypeName; std::string mBaseTypeName; Dali::TypeInfo::CreateFunction mCreate; ActionContainer mActions; - ConnectorContainerV2 mSignalConnectors; + ConnectorContainer mSignalConnectors; RegisteredPropertyContainer mRegisteredProperties; };