3 * Copyright (c) 2011, Blue Static <http://www.bluestatic.org>
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.
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.
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
17 #import <Cocoa/Cocoa.h>
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
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
;
34 // Creates and initializes a new VariableNode from the XML response from the
36 - (instancetype
)initWithXMLNode
:(NSXMLElement
*)node
;
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
;
42 // Whether or not this is a leaf node (i.e. does not have child properties).
45 // Returns a formatted type and classname display.
46 - (NSString
*)displayType
;