#include <YTree.h>
Public Member Functions | |
YTreeItem (YTree *parent, YCPValue id, YCPString text, bool open=false) | |
YTreeItem (YTreeItem *parent, YCPValue id, YCPString text, bool open=false) | |
YTreeItem (YTree *parent, YCPString text, void *data, bool open=false) | |
YTreeItem (YTreeItem *parent, YCPString text, void *data, bool open=false) | |
virtual | ~YTreeItem () |
const YCPString & | getText () const |
const YCPValue & | getId () const |
const YTreeItemList & | itemList () const |
bool | isOpenByDefault () const |
YTreeItem * | findItemWithId (const YCPValue &id) |
YTreeItem * | findItemWithText (const YCPString &text) |
void * | data () const |
void | setData (void *newData) |
Protected Attributes | |
YCPValue | id |
void * | _data |
YCPString | text |
YTree * | parentTree |
YTreeItem * | parentItem |
bool | openByDefault |
YTreeItemList | items |
|
Regular constructor for root level items. |
|
Regular constructor for items in deeper tree levels. |
|
Special constructor for root items that take an opaque data pointer for application use: This kind of root item can be used to reference to external objects that are connected with this tree item. Use YTreeItem::data() to retrieve this pointer. Casting will be necessary to make any use of it. |
|
Special constructor for deeper level items that take an opaque data pointer for application use: This kind of root item can be used to reference to external objects that are connected with this tree item. Use YTreeItem::data() to retrieve this pointer. Casting will be necessary to make any use of it. |
|
Destructor. |
|
Returns the opaque data pointer for applicaton use. |
|
Recursively search for an item with a given ID. Returns 0 if not found. |
|
Recursively search for an item with a given text. Returns 0 if not found. |
|
|
|
|
|
|
|
|
|
Set the opaque data pointer. The application may choose to store internal data here. Watch for dangling pointers! |
|
|
|
|
|
|
|
|
|
|
|
|
|
|