Main Page   Reference Manual   Namespace List   Compound List   Namespace Members   Compound Members   File Members  

class_marker.h
Go to the documentation of this file.
1 // $Header$
2 //
3 // Copyright (C) 2000 - 2004, by
4 //
5 // Carlo Wood, Run on IRC <carlo@alinoe.com>
6 // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt
7 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61
8 //
9 // This file may be distributed under the terms of the Q Public License
10 // version 1.0 as appearing in the file LICENSE.QPL included in the
11 // packaging of this file.
12 //
13 
18 #ifndef LIBCWD_CLASS_MARKER_H
19 #define LIBCWD_CLASS_MARKER_H
20 
21 #ifndef LIBCWD_CLASS_ALLOC_FILTER_H
22 #include "class_alloc_filter.h"
23 #endif
24 
25 namespace libcwd {
26 
27 extern alloc_filter_ct const default_ooam_filter;
28 
33 class marker_ct {
34 private:
35  void register_marker(char const* label);
36  alloc_filter_ct const& M_filter;
37  bool M_make_invisible;
38 public:
50  marker_ct(char const* label, alloc_filter_ct const& filter, bool make_invisible = false) :
51  M_filter(filter), M_make_invisible(make_invisible) { register_marker(label); }
52 
54  marker_ct(char const* label) : M_filter(default_ooam_filter), M_make_invisible(false) { register_marker(label); }
55 
67  marker_ct(alloc_filter_ct const& filter, bool make_invisible = false) :
68  M_filter(filter), M_make_invisible(make_invisible) { register_marker("An allocation marker"); }
69 
71  marker_ct() : M_filter(default_ooam_filter), M_make_invisible(false) { register_marker("An allocation marker"); }
72 
73  ~marker_ct();
74 };
75 
76 } // namespace libcwd
77 
78 #endif // LIBCWD_CLASS_MARKER_H
79 
A memory allocation marker.
Definition: class_marker.h:33
~marker_ct()
Destructor.
Definition: debugmalloc.cc:3370
marker_ct(alloc_filter_ct const &filter, bool make_invisible=false)
Construct a marker with label "An allocation marker".
Definition: class_marker.h:67
marker_ct()
Construct a marker with label "An allocation marker".
Definition: class_marker.h:71
marker_ct(char const *label)
Construct a marker with label label.
Definition: class_marker.h:54
marker_ct(char const *label, alloc_filter_ct const &filter, bool make_invisible=false)
Construct a marker with label label.
Definition: class_marker.h:50
void make_invisible(void const *void_ptr)
Make allocation pointed to by ptr invisible.
Definition: debugmalloc.cc:3159
namespace for libcwd.
Definition: debug.cc:87
Copyright © 2001 - 2004 Carlo Wood.  All rights reserved.