[dali_1.0.35] Merge branch 'tizen'
[platform/core/uifw/dali-core.git] / dali / internal / event / common / type-info-impl.h
index b857009..b6545a0 100644 (file)
@@ -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 <string>
@@ -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<std::string, Dali::TypeInfo::SignalConnectorFunctionV2 > ConnectionPairV2;
+  typedef std::pair<std::string, Dali::TypeInfo::SignalConnectorFunction > ConnectionPair;
   typedef std::pair<std::string, Dali::TypeInfo::ActionFunction > ActionPair;
   typedef std::pair<Property::Index, RegisteredProperty> 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;
 };