• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

kcachegrind

  • sources
  • kde-4.14
  • kdesdk
  • kcachegrind
  • libcore
context.h
Go to the documentation of this file.
1 /* This file is part of KCachegrind.
2  Copyright (C) 2002 - 2009 Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
3 
4  KCachegrind is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public
6  License as published by the Free Software Foundation, version 2.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; see the file COPYING. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef CONTEXT_H
20 #define CONTEXT_H
21 
22 #include <QString>
23 #include <QHash>
24 
32 class ProfileContext
33 {
34 public:
35  // RTTI for trace item classes, using type() method
36  enum Type {
37  InvalidType = 0, UnknownType,
38  PartInstr, Instr,
39  PartLine, Line,
40  PartInstrJump, InstrJump,
41  PartLineJump, LineJump,
42  PartInstrCall, InstrCall,
43  PartLineCall, LineCall,
44  PartCall, Call,
45  PartLineRegion, LineRegion,
46  PartFunction, FunctionSource, Function, FunctionCycle,
47  PartClass, Class, ClassCycle,
48  PartFile, File, FileCycle,
49  PartObject, Object, ObjectCycle,
50  Part, Data,
51  MaxType };
52 
53  ProfileContext(ProfileContext::Type = InvalidType);
54 
55  ProfileContext::Type type() { return _type; }
56 
57  static ProfileContext* context(ProfileContext::Type);
58 
59  // conversion of context type to locale independent string (e.g. for config)
60  static QString typeName(Type);
61  static Type type(const QString&);
62  // the versions below should be used for user visible strings, as
63  // these use localization settings
64  static QString i18nTypeName(Type);
65  static Type i18nType(const QString&);
66 
67  // clean up some static data
68  static void cleanup();
69 
70 private:
71  Type _type;
72 
73  static ProfileContext* _contexts;
74  static QString* _typeName;
75  static QString* _i18nTypeName;
76 };
77 
78 #endif // CONTEXT_H
ProfileContext::type
ProfileContext::Type type()
Definition: context.h:55
ProfileContext::Data
Definition: context.h:50
ProfileContext::Line
Definition: context.h:39
ProfileContext::PartClass
Definition: context.h:47
ProfileContext::FunctionCycle
Definition: context.h:46
ProfileContext::LineCall
Definition: context.h:43
ProfileContext::LineJump
Definition: context.h:41
ProfileContext::PartLineRegion
Definition: context.h:45
ProfileContext::File
Definition: context.h:48
ProfileContext::typeName
static QString typeName(Type)
Definition: context.cpp:62
ProfileContext::PartInstr
Definition: context.h:38
ProfileContext::PartFile
Definition: context.h:48
ProfileContext::Call
Definition: context.h:44
ProfileContext::Instr
Definition: context.h:38
ProfileContext::PartInstrCall
Definition: context.h:42
ProfileContext::PartCall
Definition: context.h:44
ProfileContext::PartLineJump
Definition: context.h:41
ProfileContext::ObjectCycle
Definition: context.h:49
ProfileContext::Class
Definition: context.h:47
ProfileContext::i18nType
static Type i18nType(const QString &)
Definition: context.cpp:129
ProfileContext::PartLine
Definition: context.h:39
ProfileContext::PartFunction
Definition: context.h:46
ProfileContext::LineRegion
Definition: context.h:45
ProfileContext
Base class for source contexts which event costs contained in a ProfileData instance, ie.
Definition: context.h:32
ProfileContext::ClassCycle
Definition: context.h:47
ProfileContext::PartInstrJump
Definition: context.h:40
ProfileContext::FileCycle
Definition: context.h:48
ProfileContext::ProfileContext
ProfileContext(ProfileContext::Type=InvalidType)
Definition: context.cpp:31
ProfileContext::i18nTypeName
static QString i18nTypeName(Type)
Definition: context.cpp:118
QString
ProfileContext::FunctionSource
Definition: context.h:46
ProfileContext::cleanup
static void cleanup()
Definition: context.cpp:46
ProfileContext::PartLineCall
Definition: context.h:43
ProfileContext::Type
Type
Definition: context.h:36
ProfileContext::PartObject
Definition: context.h:49
ProfileContext::Part
Definition: context.h:50
ProfileContext::InstrCall
Definition: context.h:42
ProfileContext::MaxType
Definition: context.h:51
ProfileContext::Object
Definition: context.h:49
ProfileContext::context
static ProfileContext * context(ProfileContext::Type)
Definition: context.cpp:36
ProfileContext::UnknownType
Definition: context.h:37
ProfileContext::InstrJump
Definition: context.h:40
ProfileContext::Function
Definition: context.h:46
ProfileContext::InvalidType
Definition: context.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:39:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kcachegrind

Skip menu "kcachegrind"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal