Merge "atspi: remove undefined method" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / internal / system / common / object-profiler.h
index 7d38783..14047ce 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_ADAPTOR_OBJECT_PROFILER_H__
-#define __DALI_ADAPTOR_OBJECT_PROFILER_H__
+#ifndef DALI_ADAPTOR_OBJECT_PROFILER_H
+#define DALI_ADAPTOR_OBJECT_PROFILER_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
  */
 
 // EXTERNAL INCLUDES
-#include <cstdint> // uint32_t
-#include <cstddef> // size_t
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/object/object-registry.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/signals/connection-tracker.h>
+#include <cstddef> // size_t
+#include <cstdint> // uint32_t
 
 // INTERNAL INCLUDES
 #include <dali/public-api/adaptor-framework/timer.h>
@@ -35,19 +35,18 @@ namespace Internal
 {
 namespace Adaptor
 {
-
 /**
  * Class to profile the number of instances of Objects in the system
  */
 class ObjectProfiler : public ConnectionTracker
 {
 public:
-
   /**
    * Constructor
+   * @param objectRegistry The objectRegistry
    * @param timeInterval to specify the frequency of reporting
    */
-  ObjectProfiler( uint32_t timeInterval );
+  ObjectProfiler(Dali::ObjectRegistry objectRegistry, uint32_t timeInterval);
 
   /**
    * Destructor
@@ -69,32 +68,31 @@ private:
    * Callback used when objects are created. Increases instance count for that object type
    * @param[in] handle of the created object
    */
-  void OnObjectCreated( BaseHandle handle );
+  void OnObjectCreated(BaseHandle handle);
 
   /**
    * Callback used when objects are created. Decreases instance count for that object type
    * @param[in] object The object being destroyed
    */
-  void OnObjectDestroyed( const Dali::RefObject* object );
+  void OnObjectDestroyed(const Dali::RefObject* object);
 
   /**
    * Get the memory size of the given object
    */
-  std::size_t GetMemorySize( const std::string& name, uint32_t count );
+  std::size_t GetMemorySize(const std::string& name, uint32_t count);
 
 private:
+  using InstanceCountPair = std::pair<const std::string, uint32_t>;
+  using InstanceTypePair  = std::pair<BaseObject*, std::string>;
 
-  using InstanceCountPair = std::pair< const std::string, uint32_t >;
-  using InstanceTypePair = std::pair< BaseObject*, std::string >;
-
-  Dali::ObjectRegistry    mObjectRegistry;
-  Dali::Timer             mTimer;
-  std::vector< InstanceCountPair > mInstanceCountContainer;
-  std::vector< InstanceTypePair >  mInstanceTypes;
+  Dali::ObjectRegistry           mObjectRegistry;
+  Dali::Timer                    mTimer;
+  std::vector<InstanceCountPair> mInstanceCountContainer;
+  std::vector<InstanceTypePair>  mInstanceTypes;
 };
 
-} // Adaptor
-} // Internal
-} // Dali
+} // namespace Adaptor
+} // namespace Internal
+} // namespace Dali
 
-#endif // __DALI_ADAPTOR_OBJECT_PROFILER_H__
+#endif // DALI_ADAPTOR_OBJECT_PROFILER_H