]> src.bluestatic.org Git - macgdbp.git/blob - Source/VariableNode.h
Rewrite stack building in DebuggerBackEnd.
[macgdbp.git] / Source / VariableNode.h
1 /*
2 * MacGDBp
3 * Copyright (c) 2011, Blue Static <http://www.bluestatic.org>
4 *
5 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
6 * General Public License as published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
10 * even the implied warranty of 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 along with this program; if not,
14 * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
15 */
16
17 #import <Cocoa/Cocoa.h>
18
19 // A VariableNode represents a property in the variable list display. It
20 // converts XML response nodes to this format and extracts all the necessary
21 // information. The fields of this class are defined by the spec:
22 // http://www.xdebug.org/docs-dbgp.php#properties-variables-and-values
23 @interface VariableNode : NSObject
24 {
25 NSString* name_;
26 NSString* fullName_;
27 NSString* className_;
28 NSString* type_;
29 NSString* value_;
30 NSMutableArray* children_;
31 NSInteger childCount_;
32 NSString* address_;
33 }
34
35 @property (readonly, copy) NSString* name;
36 @property (readonly, copy) NSString* fullName;
37 @property (readonly, copy) NSString* className;
38 @property (readonly, copy) NSString* type;
39 @property (readonly, copy) NSString* value;
40 @property (readonly, retain) NSArray* children;
41 @property (readonly) NSInteger childCount;
42 @property (readonly, copy) NSString* address;
43
44 // Creates and initializes a new VariableNode from the XML response from the
45 // debugger backend.
46 - (id)initWithXMLNode:(NSXMLElement*)node;
47
48 // When properties are asynchrnously loaded, this method can be used to set
49 // the children on a node from the list of children from the XML response.
50 - (void)setChildrenFromXMLChildren:(NSArray*)children;
51
52 // Returns the children and requests any unloaded ones.
53 - (NSArray*)dynamicChildren;
54
55 // Whether or not this is a leaf node (i.e. does not have child properties).
56 - (BOOL)isLeaf;
57
58 // Returns a formatted type and classname display.
59 - (NSString*)displayType;
60
61 @end