Code

emf import : recalculate text alignment for rotated text (Bug 341847)
[inkscape.git] / src / debug / heap.h
1 /*
2  * Inkscape::Debug::Heap - interface for gathering heap statistics
3  *
4  * Authors:
5  *   MenTaLguY <mental@rydia.net>
6  *
7  * Copyright (C) 2005 MenTaLguY
8  *
9  * Released under GNU GPL, read the file 'COPYING' for more information
10  */
12 #ifndef SEEN_INKSCAPE_DEBUG_HEAP_H
13 #define SEEN_INKSCAPE_DEBUG_HEAP_H
15 #include <cstddef>
16 #include "util/share.h"
18 namespace Inkscape {
20 namespace Debug {
22 class Heap {
23 public:
24     virtual ~Heap() {}
26     struct Stats {
27         std::size_t size;
28         std::size_t bytes_used;
29     };
31     enum {
32         SIZE_AVAILABLE    = ( 1 << 0 ),
33         USED_AVAILABLE    = ( 1 << 1 ),
34         GARBAGE_COLLECTED = ( 1 << 2 )
35     };
37     virtual int features() const=0;
39     virtual Util::ptr_shared<char> name() const=0;
40     virtual Stats stats() const=0;
41     virtual void force_collect()=0;
42 };
44 unsigned heap_count();
45 Heap *get_heap(unsigned i);
47 void register_extra_heap(Heap &heap);
49 }
51 }
53 #endif
54 /*
55   Local Variables:
56   mode:c++
57   c-file-style:"stroustrup"
58   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
59   indent-tabs-mode:nil
60   fill-column:99
61   End:
62 */
63 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :