Patch level : 2.2

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :

Tolto pure ad un paio di metodi di tree


git-svn-id: svn://10.65.10.50/trunk@12530 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2004-12-01 15:04:15 +00:00
parent 1baec5f349
commit a399c2ec5f
2 changed files with 22 additions and 3 deletions

View File

@ -216,9 +216,27 @@ bool TTree::goto_lbrother()
return ok;
}
bool TTree::has_rbrother() const
{
TString myself; curr_id(myself);
bool ok = ((TTree*)this)->goto_rbrother();
if (ok)
((TTree*)this)->goto_node(myself);
return ok;
}
bool TTree::has_son() const
{
TString myself; curr_id(myself);
bool ok = ((TTree*)this)->goto_firstson();
if (ok)
((TTree*)this)->goto_node(myself);
return ok;
}
bool TTree::expanded() const
{
TString str;
TString str;
curr_id(str);
bool yes = _expanded.is_key(str);
return yes;

View File

@ -34,13 +34,14 @@ public:
virtual bool goto_firstson() pure;
virtual bool goto_rbrother() pure;
virtual bool goto_node(const TString &id) pure;
virtual bool has_son() const pure;
virtual bool has_rbrother() const pure;
virtual TObject* curr_node() const pure;
virtual bool has_root() const;
virtual bool has_father() const;
virtual bool has_son() const;
virtual bool has_lbrother() const;
virtual bool has_rbrother() const;
virtual bool goto_father();
virtual bool goto_lbrother();