]> src.bluestatic.org Git - macgdbp.git/blob - Source/VariableNode.h
CFBundleVersion is no longer incremented by gitcrement.
[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 @property(readonly, nonatomic) NSString* name;
26 @property(readonly, nonatomic) NSString* fullName;
27 @property(readonly, nonatomic) NSString* className;
28 @property(readonly, nonatomic) NSString* type;
29 @property(readonly, nonatomic) NSString* value;
30 @property(readonly, nonatomic) NSArray* children;
31 @property(readonly, nonatomic) unsigned long childCount;
32 @property(readonly, nonatomic) NSString* address;
33
34 // Creates and initializes a new VariableNode from the XML response from the
35 // debugger backend.
36 - (instancetype)initWithXMLNode:(NSXMLElement*)node;
37
38 // When properties are asynchrnously loaded, this method can be used to set
39 // the children on a node from the list of children from the XML response.
40 - (void)setChildrenFromXMLChildren:(NSArray*)children;
41
42 // Whether or not this is a leaf node (i.e. does not have child properties).
43 - (BOOL)isLeaf;
44
45 // Returns a formatted type and classname display.
46 - (NSString*)displayType;
47
48 @end