library: libTree #include "TBranchBrowsable.h"

# TCollectionMethodBrowsable

class description - source file - inheritance tree (.pdf)

## class TCollectionMethodBrowsable : public TMethodBrowsable

| Inheritance Chart:
`TObject`
| <- | `TNamed`
| <- | `TVirtualBranchBrowsable`
| <- | `TMethodBrowsable`
| <- | `TCollectionMethodBrowsable` |

        protected:

                                     TCollectionMethodBrowsable(const TBranch* branch, TMethod* m, const TVirtualBranchBrowsable* parent = 0)

        public:

                                     TCollectionMethodBrowsable(const TCollectionMethodBrowsable&)
                                     ~TCollectionMethodBrowsable()
                      static TClass* Class()
                        static Int_t GetBrowsables(TList& list, const TBranch* branch, const TVirtualBranchBrowsable* parent = 0)
                     virtual TClass* IsA() const
                         static void Register()
                        virtual void ShowMembers(TMemberInspector& insp, char* parent)
                        virtual void Streamer(TBuffer& b)
                                void StreamerNVirtual(TBuffer& b)
                         static void Unregister()

### Data Members

## Class Description

     TVirtualBranchBrowsable is a base class (not really abstract, but useless
     by itself) for helper objects that extend TBranch's browsing support.
     Each registered derived class's generator method is called, which fills
     all created helper objects into a list which can then be browsed.
     For details of what these browser helper objects can do, see e.g.
     TMethodBrowsable, which allows methods to show up in the TBrowser.

     Only registered helper objects are created. By default, only
     TMethodBrowsable, TNonSplitBrowsable, and TCollectionPropertyBrowsable
     are registered (see RegisterDefaultGenerators). You can prevent any of
     their objects to show up in the browser by unregistering the generator:
       TMethodBrowsable::Unregister()
     will stop creating browsable method helper objects from that call on.
     Note that these helper objects are cached (in TBranch::fBrowsables);
     already created (and thus cached) browsables will still appear in the
     browser even after unregistering the corresponding generator.

     You can implement your own browsable objects and thier generator; see
     e.g. the simple TCollectionPropertyBrowsable. Note that you will have
     to register your generator just like any other, and that you should
     implement the following methods for your own class, mainly for
     consistency reasons:
       static void Register() {
         TVirtualBranchBrowsable::RegisterGenerator(GetBrowsables); }
       static void Unregister() {
         TVirtualBranchBrowsable::UnregisterGenerator(GetBrowsables); }
     where GetBrowsables is a static member function of your class, that
     creates the browsable helper objects, and has the signature
       static Int_t GetBrowsables(TList& list, const TBranch* branch,
                                  const TVirtualBranchBrowsable* parent=0);
     It has to return the number of browsable helper objects for parent
     (or, if NULL, for branch) which are added to the list.
    ______________________________________________________________________________

TCollectionMethodBrowsable(const TBranch* branch, TMethod* m, const TVirtualBranchBrowsable* parent /*=0*/): TMethodBrowsable(branch, m, parent)

     Contructor, see TMethodBrowsable's constructor.
     Prepends "@" to the name to make this method work on the container.

Int_t GetBrowsables(TList& li, const TBranch* branch, const TVirtualBranchBrowsable* parent /*=0*/)

     This methods fills list with TMethodBrowsables
     for the branch's or parent's collection class and its base classes,
     and returns the number of added elements. If called from a TBranch::Browse
     overload, "branch" should be set to the calling TBranch, otherwise
     "parent" should be set to the TVirtualBranchBrowsable being browsed.

void Register()

     Wrapper for the registration method. Needed against MSVC, which
     assigned different addr to the same method, depending on what
     translation unit you're in...

void Unregister()

     Wrapper for the registration method. Needed against MSVC, which
     assigned different addr to the same method, depending on what
     translation unit you're in...

### Inline Functions

                                  void ~TCollectionMethodBrowsable()
                               TClass* Class()
                               TClass* IsA() const
                                  void ShowMembers(TMemberInspector& insp, char* parent)
                                  void Streamer(TBuffer& b)
                                  void StreamerNVirtual(TBuffer& b)
            TCollectionMethodBrowsable TCollectionMethodBrowsable(const TCollectionMethodBrowsable&)

Author: Axel Naumann 14/10/2004
Last update: root/tree:$Name: $:$Id: TBranchBrowsable.cxx,v 1.5 2005/05/18 21:04:54 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *