Dali 3D User Interface Engine
performance-logger-impl.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_PERFORMANCE_LOGGER_H__
2 #define __DALI_INTERNAL_PERFORMANCE_LOGGER_H__
3 
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20 
21 // EXTERNAL INCLUDES
23 
24 // INTERNAL INCLUDES
26 #include <performance-logger.h>
27 
28 namespace Dali
29 {
30 
31 namespace Internal
32 {
33 
34 namespace Adaptor
35 {
36 
38 
40 
45 {
46 public:
47 
54  static PerformanceLoggerPtr New( const char* name );
55 
60  PerformanceLogger( const char* name );
61 
65  virtual ~PerformanceLogger();
66 
72  void AddMarker( Dali::PerformanceLogger::Marker markerType );
73 
79  void SetLoggingFrequency( unsigned int logFrequency);
80 
86  void EnableLogging( bool enable );
87 
88 private: // Implementation
89 
90  // not implemented
93 
94 private:
95 
97 
98 };
99 
100 // Helpers for public-api forwarding methods
101 
102 inline static Internal::Adaptor::PerformanceLogger& GetImplementation( Dali::PerformanceLogger& logger )
103 {
104  DALI_ASSERT_ALWAYS( logger && "PerformanceLogger handle is empty" );
105 
106  BaseObject& handle = logger.GetBaseObject();
107 
108  return static_cast< Internal::Adaptor::PerformanceLogger& >( handle );
109 }
110 
111 inline static const Internal::Adaptor::PerformanceLogger& GetImplementation( const Dali::PerformanceLogger& logger )
112 {
113  DALI_ASSERT_ALWAYS( logger && "PerformanceLogger handle is empty" );
114 
115  const BaseObject& handle = logger.GetBaseObject();
116 
117  return static_cast< const Internal::Adaptor::PerformanceLogger& >( handle );
118 }
119 
120 } // namespace Adaptor
121 
122 } // namespace Internal
123 
124 } // namespace Dali
125 
126 #endif // __DALI_INTERNAL_PERFORMANCE_LOGGER_H__
Dali Docs Home
Read more about Dali