#ifndef ROOT_TBranchBrowsable
#define ROOT_TBranchBrowsable
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TList
#include "TList.h"
#endif
#include <list>
class TMethod;
class TBowser;
class TClass;
class TBranch;
class TBranchElement;
class TString;
class TStreamerElement;
class TVirtualBranchBrowsable: public TNamed {
public:
typedef Int_t (*MethodCreateListOfBrowsables_t)
(TList&, const TBranch* branch, const TVirtualBranchBrowsable* parent);
~TVirtualBranchBrowsable();
void Browse(TBrowser *b);
const char *GetIconName() const {
if (IsFolder()) return "TBranchElement-folder";
else return "TBranchElement-leaf";
}
void GetScope(TString & scope) const;
Bool_t IsFolder() const {
return (GetLeaves() && GetLeaves()->GetSize()); }
static Int_t FillListOfBrowsables(TList& list, const TBranch* branch,
const TVirtualBranchBrowsable* parent=0);
const TBranch* GetBranch() const {
return fBranch; }
const TVirtualBranchBrowsable* GetParent() const {
return fParent; }
TClass* GetClassType() const {
return fClass; }
Bool_t TypeIsPointer() const {
return fTypeIsPointer; }
TList* GetLeaves() const;
protected:
TVirtualBranchBrowsable(const TBranch* b, TClass* type, Bool_t typeIsPointer,
const TVirtualBranchBrowsable* parent=0);
static TClass* GetCollectionContainedType(const TBranch* b,
const TVirtualBranchBrowsable* parent, TClass* &contained);
static std::list<MethodCreateListOfBrowsables_t>& GetRegisteredGenerators();
static void RegisterGenerator(MethodCreateListOfBrowsables_t generator);
static void UnregisterGenerator(MethodCreateListOfBrowsables_t generator);
void SetType(TClass* type) {
fClass=type; }
void SetTypeIsPointer(Bool_t set=kTRUE) {
fTypeIsPointer=set; }
private:
static void RegisterDefaultGenerators();
const TBranch *fBranch;
const TVirtualBranchBrowsable *fParent;
TList *fLeaves;
TClass *fClass;
Bool_t fTypeIsPointer;
static std::list<MethodCreateListOfBrowsables_t> fgGenerators;
static Bool_t fgGeneratorsSet;
ClassDef(TVirtualBranchBrowsable, 0);
};
class TMethodBrowsable: public TVirtualBranchBrowsable {
public:
~TMethodBrowsable() {};
static Int_t GetBrowsables(TList& list, const TBranch* branch,
const TVirtualBranchBrowsable* parent=0);
const char *GetIconName() const {
if (IsFolder()) return "TMethodBrowsable-branch";
return "TMethodBrowsable-leaf";}
static Bool_t IsMethodBrowsable(const TMethod* m);
static void Register();
static void Unregister();
protected:
static void GetBrowsableMethodsForClass(TClass* cl, TList& list);
TMethodBrowsable(const TBranch* branch, TMethod* m,
const TVirtualBranchBrowsable* parent=0);
private:
TMethod *fMethod;
ClassDef(TMethodBrowsable,0);
};
class TNonSplitBrowsable: public TVirtualBranchBrowsable {
public:
~TNonSplitBrowsable() {}
static Int_t GetBrowsables(TList& list, const TBranch* branch,
const TVirtualBranchBrowsable* parent=0);
static void Register();
static void Unregister();
protected:
TNonSplitBrowsable(const TStreamerElement* element, const TBranch* branch,
const TVirtualBranchBrowsable* parent=0);
private:
ClassDef(TNonSplitBrowsable, 0);
};
class TCollectionPropertyBrowsable: public TVirtualBranchBrowsable {
public:
~TCollectionPropertyBrowsable() {}
void Browse(TBrowser *b);
static Int_t GetBrowsables(TList& list, const TBranch* branch,
const TVirtualBranchBrowsable* parent=0);
const char* GetDraw() const {
return fDraw.Data(); }
static void Register();
static void Unregister();
protected:
TCollectionPropertyBrowsable(const char* name, const char* title,
const char* draw, const TBranch* branch, const TVirtualBranchBrowsable* parent=0):
TVirtualBranchBrowsable(branch, 0, kFALSE, parent), fDraw(draw) {
SetNameTitle(name, title);
}
private:
TString fDraw;
ClassDef(TCollectionPropertyBrowsable, 0);
};
class TCollectionMethodBrowsable: public TMethodBrowsable {
public:
~TCollectionMethodBrowsable() {};
static Int_t GetBrowsables(TList& list, const TBranch* branch,
const TVirtualBranchBrowsable* parent=0);
static void Register();
static void Unregister();
protected:
TCollectionMethodBrowsable(const TBranch* branch, TMethod* m,
const TVirtualBranchBrowsable* parent=0);
ClassDef(TCollectionMethodBrowsable,0);
};
#endif // defined ROOT_TBranchBrowsable
Last change: Wed Jun 25 08:49:53 2008
Last generated: 2008-06-25 08:49
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.