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

kcachegrind

  • sources
  • kde-4.12
  • kdesdk
  • kcachegrind
  • libcore
addr.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 ADDR_H
20 #define ADDR_H
21 
22 #include <QString>
23 
24 #include "utils.h"
25 
31 class Addr
32 {
33  public:
34  Addr() { _v=0; }
35  Addr(uint64 v) { _v = v; }
36 
37  // Interpretes char data at s as hex (without "0x" prefix)
38  // and return number of interpreted chars.
39  int set(const char *s);
40  bool set(FixString& s);
41  QString toString() const;
42  // similar to toString(), but adds a space every 4 digits
43  QString pretty() const;
44 
45  // returns true if this address is in [a-distance;a+distance]
46  bool isInRange(Addr a, int distance);
47 
48  bool operator==(const Addr& a) const { return (_v == a._v); }
49  bool operator!=(const Addr& a) const { return (_v != a._v); }
50  bool operator>(const Addr& a) const { return _v > a._v; }
51  bool operator>=(const Addr& a) const { return _v >= a._v; }
52  bool operator<(const Addr& a) const { return _v < a._v; }
53  bool operator<=(const Addr& a) const { return _v <= a._v; }
54 
55  Addr operator+(int d) const { return Addr(_v + d); }
56  Addr operator-(int d) const { return Addr(_v - d); }
57 
58  private:
59  uint64 _v;
60 };
61 
62 #endif // ADDR_H
Addr::pretty
QString pretty() const
Definition: addr.cpp:67
Addr::operator<
bool operator<(const Addr &a) const
Definition: addr.h:52
Addr::operator>=
bool operator>=(const Addr &a) const
Definition: addr.h:51
Addr::operator>
bool operator>(const Addr &a) const
Definition: addr.h:50
uint64
unsigned long long uint64
Definition: subcost.h:27
Addr::isInRange
bool isInRange(Addr a, int distance)
Definition: addr.cpp:87
Addr
Addresses are 64bit values like costs to be able to always load profile data produced on 64bit archit...
Definition: addr.h:31
utils.h
Addr::toString
QString toString() const
Definition: addr.cpp:50
Addr::operator!=
bool operator!=(const Addr &a) const
Definition: addr.h:49
Addr::operator==
bool operator==(const Addr &a) const
Definition: addr.h:48
Addr::operator-
Addr operator-(int d) const
Definition: addr.h:56
Addr::Addr
Addr()
Definition: addr.h:34
FixString
A simple, constant string class.
Definition: utils.h:38
Addr::set
int set(const char *s)
Definition: addr.cpp:29
Addr::Addr
Addr(uint64 v)
Definition: addr.h:35
Addr::operator<=
bool operator<=(const Addr &a) const
Definition: addr.h:53
Addr::operator+
Addr operator+(int d) const
Definition: addr.h:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:03:26 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
  • okteta
  • 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