source: vendor/emx/current/src/pmgdb/capture.h

Last change on this file was 18, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.3 KB
Line 
1/* capture.h -*- C++ -*-
2 Copyright (c) 1996 Eberhard Mattes
3
4This file is part of pmgdb.
5
6pmgdb is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11pmgdb is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with pmgdb; see the file COPYING. If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
21
22class capture_string
23{
24public:
25 capture_string () { str = NULL; }
26 ~capture_string () { delete[] str; }
27 void set (const char *s, size_t len);
28 void set (const char *s) { set (s, strlen (s)); }
29 bool is_set () const { return str != NULL; }
30 const char *get () const { return str; }
31private:
32 char *str;
33};
34
35class capture_number
36{
37public:
38 capture_number () { flag = false; }
39 ~capture_number () {}
40 void set (long v) { value = v; flag = true; }
41 bool is_set () const { return flag; }
42 long get () const { return value; }
43private:
44 long value;
45 bool flag;
46};
47
48class capture_bool
49{
50public:
51 capture_bool () { flag = false; }
52 ~capture_bool () {}
53 void set (bool v) { value = v; flag = true; }
54 bool is_set () const { return flag; }
55 bool get () const { return value; }
56private:
57 // TODO: Use three-value enum?
58 bool value;
59 bool flag;
60};
61
62class capture
63{
64public:
65 capture () { next = NULL; }
66 ~capture () {}
67
68 class capture *next; // TODO: make private, add iterator
69 capture_string source_file;
70 capture_number source_lineno;
71 capture_number source_addr;
72 capture_number bpt_number;
73 capture_string bpt_disposition;
74 capture_bool bpt_enable;
75 capture_number bpt_address;
76 capture_string bpt_what;
77 capture_string bpt_condition;
78 capture_number bpt_ignore;
79 capture_number disp_number;
80 capture_string disp_format;
81 capture_string disp_expr;
82 capture_string disp_value;
83 capture_bool disp_enable;
84 capture_string srcs_file;
85 capture_string source_location;
86 capture_string show_value;
87 capture_string error;
88
89 friend void delete_capture (capture *capt);
90};
Note: See TracBrowser for help on using the repository browser.