Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-core.git] / dali / public-api / object / type-registry.h
index 196b08d..7d2e2a2 100644 (file)
 // limitations under the License.
 //
 
-/**
- * @addtogroup CAPI_DALI_FRAMEWORK
- * @{
- */
 
 // EXTERNAL INCLUDES
 #include <typeinfo>
@@ -38,7 +34,8 @@ class TypeRegistry;
 }
 
 /**
- * The TypeRegistry allows registration of type instance creation functions.
+ * @brief The TypeRegistry allows registration of type instance creation functions.
+ *
  * These can then be created later by name and down cast to the appropriate type.
  *
  * Usage: (Registering)
@@ -93,21 +90,22 @@ class TypeRegistry;
 class TypeRegistry : public BaseHandle
 {
 public:
-  typedef std::vector<std::string> NameContainer;
+  typedef std::vector<std::string> NameContainer; ///< Container of type names
 
   /**
-   * Get Type Registry handle
+   * @brief Get Type Registry handle.
+   *
    * @return TypeRegistry handle
    */
   static TypeRegistry Get();
 
   /**
-   * Allows the creation of an empty typeRegistry handle.
+   * @brief Allows the creation of an empty typeRegistry handle.
    */
   TypeRegistry();
 
   /**
-   * destructor.
+   * @brief destructor.
    */
   ~TypeRegistry();
 
@@ -117,21 +115,24 @@ public:
   using BaseHandle::operator=;
 
   /**
-   * Get TypeInfo for a registered type
+   * @brief Get TypeInfo for a registered type.
+   *
    * @param [in] uniqueTypeName A unique type name
    * @return TypeInfo if the type exists otherwise an empty handle
    */
   TypeInfo GetTypeInfo( const std::string &uniqueTypeName );
 
   /**
-   * Get TypeInfo for a registered type
+   * @brief Get TypeInfo for a registered type.
+   *
    * @param [in] registerType The registered type info
    * @return TypeInfo if the type exists otherwise an empty handle
    */
   TypeInfo GetTypeInfo( const std::type_info& registerType );
 
   /**
-   * Get type names
+   * @brief Get type names.
+   *
    * @return list of known types by name
    */
   NameContainer GetTypeNames() const;
@@ -139,20 +140,22 @@ public:
 public: // Not intended for application developers
 
   /**
-   * This constructor is used by Dali Get() method
+   * @brief This constructor is used by Dali Get() method.
+   *
    * @param [in] typeRegistry A pointer to a Dali resource
    */
   explicit DALI_INTERNAL TypeRegistry(Internal::TypeRegistry*typeRegistry);
 };
 
 /**
- * Register a type from type info
+ * @brief Register a type from type info.
  */
 class TypeRegistration
 {
 public:
   /**
-   * Constructor registers the type creation function
+   * @brief Constructor registers the type creation function.
+   *
    * @param [in] registerType the type info for the type to be registered
    * @param [in] baseType the base type info of registerType
    * @param [in] f registerType instance creation function
@@ -161,7 +164,8 @@ public:
                     TypeInfo::CreateFunction f );
 
   /**
-   * Constructor registers the type creation function
+   * @brief Constructor registers the type creation function.
+   *
    * @param [in] registerType the type info for the type to be registered
    * @param [in] baseType the base type info of registerType
    * @param [in] f registerType instance creation function
@@ -171,7 +175,8 @@ public:
                     TypeInfo::CreateFunction f, bool callCreateOnInit );
 
   /**
-   * Constructor registers the type creation function for a named class or type.
+   * @brief Constructor registers the type creation function for a named class or type.
+   *
    * This allows types to be created dynamically from script. The name must be
    * unique for successful registration.
    * @param [in] name the name of the type to be registered
@@ -182,24 +187,26 @@ public:
                     TypeInfo::CreateFunction f );
 
   /**
-   * The name the type is registered under (derived from type_info)
+   * @brief The name the type is registered under (derived from type_info).
+   *
    * @return the registered name or empty if unregistered
    */
   const std::string RegisteredName() const;
 
 private:
-  TypeRegistry mReference;
-  std::string mName;
+  TypeRegistry mReference; ///< Reference to the type registry
+  std::string mName;       ///< Name of the type
 };
 
 /**
- * Register a signal connector function to a registered type
+ * @brief Register a signal connector function to a registered type.
  */
 class SignalConnectorType
 {
 public:
   /**
-   * Constructor registers the type creation function
+   * @brief Constructor registers the type creation function.
+   *
    * @param [in] typeRegistration The TypeRegistration object
    * @param [in] name The signal name
    * @param [in] func The signal connector function
@@ -208,13 +215,14 @@ public:
 };
 
 /**
- * Register an action function
+ * @brief Register an action function.
  */
 class TypeAction
 {
 public:
   /**
-   * Constructor registers the type creation function
+   * @brief Constructor registers the type creation function.
+   *
    * @param [in] registered The TypeRegistration object
    * @param [in] name The action name
    * @param [in] f The action function
@@ -223,22 +231,18 @@ public:
 };
 
 /**
- * Register a property for the given type.
+ * @brief Register a property for the given type.
  */
 class PropertyRegistration
 {
 public:
 
-  // Enumerations are being used here rather than static constants so that switch statements can be used to compare property indices
-  enum
-  {
-    START_INDEX = 10000000,   ///< The index for this type should start from this number
-    MAX_INDEX   = 19999999    ///< The maximum index supported for this type
-  };
-
   /**
-   * This constructor registers the property with the registered type. This constructor is for event-thread
-   * only properties where the value of the property can be retrieved and set via specified functions.
+   * @brief This constructor registers the property with the registered type.
+   *
+   * This constructor is for event-thread only properties where the
+   * value of the property can be retrieved and set via specified
+   * functions.
    *
    * Functions of the following type may be used for setFunc and getFunc respectively:
    * @code
@@ -248,7 +252,7 @@ public:
    *
    * @param [in] registered The TypeRegistration object
    * @param [in] name The name of the property
-   * @param [in] index The property index. Must be a value between START_INDEX and MAX_INDEX inclusive.
+   * @param [in] index The property index. Must be a value between PROPERTY_REGISTRATION_START_INDEX and PROPERTY_REGISTRATION_MAX_INDEX inclusive.
    * @param [in] type The property value type.
    * @param [in] setFunc The function to call when setting the property. If NULL, then the property becomes read-only.
    * @param [in] getFunc The function to call to retrieve the current value of the property. MUST be provided.
@@ -266,7 +270,4 @@ public:
 
 } // namespace Dali
 
-/**
- * @}
- */
 #endif // header