/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 20187 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.
namespace Adaptor
{
-ObjectProfiler::ObjectProfiler( unsigned int timeInterval )
+ObjectProfiler::ObjectProfiler( uint32_t timeInterval )
{
// This class must be created after the Stage; this means it doesn't count the initial objects
// that are created by the stage (base layer, default camera actor)
{
for( auto&& element : mInstanceCountContainer )
{
- int memorySize = GetMemorySize( element.first, element.second );
+ std::size_t memorySize = GetMemorySize( element.first, element.second );
if( memorySize > 0 )
{
LogMessage( Debug::DebugInfo, "%-30s: % 4d Memory MemorySize: ~% 6.1f kB\n",
}
}
-int ObjectProfiler::GetMemorySize(const std::string& name, int count)
+std::size_t ObjectProfiler::GetMemorySize( const std::string& name, uint32_t count )
{
struct MemoryMemorySize
{
std::string name;
- int memorySize;
+ std::size_t memorySize;
};
MemoryMemorySize memoryMemorySizes[] =
{
#define __DALI_ADAPTOR_OBJECT_PROFILER_H__
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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>
* Constructor
* @param timeInterval to specify the frequency of reporting
*/
- ObjectProfiler( unsigned int timeInterval );
+ ObjectProfiler( uint32_t timeInterval );
/**
* Destructor
* 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
*/
- int GetMemorySize(const std::string& name, int count);
+ std::size_t GetMemorySize( const std::string& name, uint32_t count );
private:
- using InstanceCountPair = std::pair< const std::string, int >;
+ using InstanceCountPair = std::pair< const std::string, uint32_t >;
using InstanceTypePair = std::pair< BaseObject*, std::string >;
Dali::ObjectRegistry mObjectRegistry;