ClassBuilder.h

Go to the documentation of this file.
00001 // @(#)root/reflex:$Id: ClassBuilder.h 32228 2010-02-05 16:13:09Z axel $
00002 // Author: Stefan Roiser 2004
00003 
00004 // Copyright CERN, CH-1211 Geneva 23, 2004-2010, All rights reserved.
00005 //
00006 // Permission to use, copy, modify, and distribute this software for any
00007 // purpose is hereby granted without fee, provided that this copyright and
00008 // permissions notice appear in all copies and derivatives.
00009 //
00010 // This software is provided "as is" without express or implied warranty.
00011 
00012 #ifndef Reflex_ClassBuilder
00013 #define Reflex_ClassBuilder
00014 
00015 // Include files
00016 #include "Reflex/Kernel.h"
00017 #include "Reflex/Tools.h"
00018 #include "Reflex/Member.h"
00019 #include "Reflex/Callback.h"
00020 #include "Reflex/Builder/TypeBuilder.h"
00021 
00022 // Forward declaration for 'friendship' purpose.
00023 namespace Cint { namespace Internal {} }
00024 
00025 namespace Reflex {
00026 // forward declarations
00027 class Class;
00028 class ClassBuilder;
00029 class OnDemandBuilderForScope;
00030 
00031 template <typename C> class ClassBuilderT;
00032 
00033 /**
00034  * @class ClassBuilderImpl ClassBuilder.h Reflex/Builder/ClassBuilder.h
00035  * @author Stefan Roiser
00036  * @date 30/3/2004
00037  * @ingroup RefBld
00038  */
00039 class RFLX_API ClassBuilderImpl {
00040 public:
00041    /** constructor */
00042    ClassBuilderImpl(const char* nam, const std::type_info & ti, size_t size, unsigned int modifiers = 0, TYPE typ = CLASS);
00043    ClassBuilderImpl(Class* cl);
00044 
00045    /** destructor */
00046    virtual ~ClassBuilderImpl();
00047 
00048    /**
00049     * AddBase will add the information about one BaseAt class
00050     * @param  Name of the BaseAt class
00051     * @param  OffsetFP function pointer for Offset calculation
00052     * @param  modifiers the modifiers of the class
00053     */
00054    void AddBase(const Type& bas,
00055                 OffsetFunction offsFP,
00056                 unsigned int modifiers = 0);
00057 
00058    /** AddDataMember will add the information about one data
00059     * MemberAt of the class
00060     *
00061     * @param  Name of the data MemberAt
00062     * @param  At of the data MemberAt
00063     * @param  Offset of the data MemberAt
00064     * @param  modifiers the modifiers of the data MemberAt
00065     */
00066    void AddDataMember(const char* nam,
00067                       const Type& typ,
00068                       size_t offs,
00069                       unsigned int modifiers = 0);
00070 
00071    /** AddFunctionMember will add the information about one
00072     * function MemberAt of the class
00073     *
00074     * @param  Name of the function MemberAt
00075     * @param  At of the function MemberAt
00076     * @param  stubFP Stub function pointer for the function
00077     * @param  stubCxt Stub user context for the stub function
00078     * @param  params parameter names and default values (semi-colon separated)
00079     * @param  modifiers the modifiers of the function MemberAt
00080     */
00081    void AddFunctionMember(const char* nam,
00082                           const Type& typ,
00083                           StubFunction stubFP,
00084                           void* stubCtx = 0,
00085                           const char* params = 0,
00086                           unsigned int modifiers = 0);
00087 
00088    void AddTypedef(const Type& typ,
00089                    const char* def);
00090 
00091    void AddEnum(const char* nam,
00092                 const char* values,
00093                 const std::type_info* ti,
00094                 unsigned int modifiers = 0);
00095 
00096    // This is for anonymous union support.
00097    //void addUnion(const char* nam, const char* values, const std::type_info& ti, unsigned int modifiers = 0);
00098 
00099 
00100    /** AddProperty will add a PropertyNth to the PropertyNth stack
00101     * which will be emtpied with the next call of a builder
00102     * class and attached to the item built with this call
00103     *
00104     * @param  key the PropertyNth key
00105     * @param  value the value of the PropertyNth
00106     */
00107    void AddProperty(const char* key,
00108                     Any value);
00109    void AddProperty(const char* key,
00110                     const char* value);
00111    void AddProperty(const char* key,
00112                     const Literal& value) { AddProperty(key, (const char*)value); }
00113 
00114 
00115    /**
00116     * Register an on demand builder for data members with this class.
00117     */
00118    void AddOnDemandDataMemberBuilder(OnDemandBuilderForScope* odb);
00119 
00120    /**
00121     * Register an on demand builder for function members with this class.
00122     */
00123    void AddOnDemandFunctionMemberBuilder(OnDemandBuilderForScope* odb);
00124 
00125    /** SetSizeOf will set the SizeOf property for this class.
00126     * It currently ignore all actual content.
00127     * @size Size of the class
00128     */
00129    void SetSizeOf(size_t size);
00130 
00131    /*
00132     * ToType will return the currently produced Type (class)
00133     * @return the type currently being built
00134     */
00135    Type ToType();
00136 
00137 protected:
00138    friend class ClassBuilder;
00139    template <class C> friend class ClassBuilderT;
00140 
00141    /**
00142     * EnableCallback Enable or disable the callback call in the destructor
00143     * @param  enable true to enable callback call, false to disable callback call
00144     */
00145    void EnableCallback(bool enable = true);
00146 
00147 private:
00148    /** current class being built */
00149    Class* fClass;
00150 
00151    /** last added MemberAt */
00152    Member fLastMember;
00153 
00154    /** flag, true if this is truly building a new class */
00155    bool fNewClass;
00156 
00157    /** flag, fire callback in destructor */
00158    bool fCallbackEnabled;
00159 
00160 };    // class ClassBuilderImpl
00161 
00162 
00163 /**
00164  * @class ClassBuilder ClassBuilder.h Reflex/Builder/ClassBuilder.h
00165  * @author Stefan Roiser
00166  * @date 24/5/2004
00167  * @ingroup RefBld
00168  */
00169 class RFLX_API ClassBuilder {
00170 public:
00171    /** constructor */
00172    ClassBuilder(const char* nam, const std::type_info & ti, size_t size, unsigned int modifiers = 0, TYPE typ = CLASS);
00173    ClassBuilder(Class* cl);
00174 
00175    /** destructor */
00176    virtual ~ClassBuilder();
00177 
00178    /**
00179     * AddBase will add the information about one BaseAt class
00180     * @param  Name of the BaseAt class
00181     * @param  OffsetFP function pointer for Offset calculation
00182     * @param  modifiers the modifiers of the class
00183     */
00184    template <class C, class B> ClassBuilder& AddBase(unsigned int modifiers = 0);
00185    ClassBuilder& AddBase(const Type& bas,
00186                          OffsetFunction offsFP,
00187                          unsigned int modifiers = 0);
00188 
00189    /** AddDataMember will add the information about one data
00190     * MemberAt of the class
00191     *
00192     * @param  Name of the data MemberAt
00193     * @param  Offset of data MemberAt
00194     * @param  modifiers the modifiers of the data MemberAt
00195     * @return a reference to the ClassBuilder
00196     */
00197    template <class T> ClassBuilder& AddDataMember(const char* nam,
00198                                                   size_t offs,
00199                                                   unsigned int modifiers = 0);
00200    ClassBuilder& AddDataMember(const Type& typ,
00201                                const char* nam,
00202                                size_t offs,
00203                                unsigned int modifiers = 0);
00204 
00205    /** AddFunctionMember will add the information about one
00206     * function MemberAt of the class
00207     *
00208     * @param  Name of the function MemberAt
00209     * @param  function templated function MemberAt to extract At information
00210     * @param  stubFP Stub function pointer for the function
00211     * @param  stubCxt Stub user context for the stub function
00212     * @param  params pamater names and default values (semi-colon separated)
00213     * @param  modifiers the modifiers of the data MemberAt
00214     * @return a reference to the ClassBuilder
00215     */
00216    template <class F> ClassBuilder& AddFunctionMember(const char* nam,
00217                                                       StubFunction stubFP,
00218                                                       void* stubCtx = 0,
00219                                                       const char* params = 0,
00220                                                       unsigned int modifiers = 0);
00221    ClassBuilder& AddFunctionMember(const Type& typ,
00222                                    const char* nam,
00223                                    StubFunction stubFP,
00224                                    void* stubCtx = 0,
00225                                    const char* params = 0,
00226                                    unsigned int modifiers = 0);
00227 
00228    template <typename TD> ClassBuilder& AddTypedef(const char* def);
00229    ClassBuilder& AddTypedef(const Type& typ,
00230                             const char* def);
00231    ClassBuilder& AddTypedef(const char* typ,
00232                             const char* def);
00233 
00234    template <typename E> ClassBuilder& AddEnum(const char* values,
00235                                                unsigned int modifiers = 0);
00236 
00237    ClassBuilder& AddEnum(const char* nam,
00238                          const char* values,
00239                          const std::type_info* ti = 0,
00240                          unsigned int modifiers = 0);
00241 
00242    // This is for anonymous union support.
00243    //ClassBuilder& addUnion(const char* nam, const char* values, unsigned int modifiers);
00244 
00245 
00246    /** AddProperty will add a PropertyNth to the last defined
00247     * data MemberAt, method or class.
00248     * @param  key the PropertyNth key
00249     * @param  value the value of the PropertyNth
00250     * @return a reference to the building class
00251     */
00252    template <typename P> ClassBuilder& AddProperty(const char* key,
00253                                                    P value);
00254 
00255    /**
00256     * Register an on demand data member builder with this class.
00257     */
00258    ClassBuilder& AddOnDemandDataMemberBuilder(OnDemandBuilderForScope* odb);
00259 
00260    /**
00261     * Register an on demand function member builder with this class.
00262     */
00263    ClassBuilder& AddOnDemandFunctionMemberBuilder(OnDemandBuilderForScope* odb);
00264 
00265    /** SetSizeOf will set the SizeOf property for this class.
00266     * It currently ignore all actual content.
00267     * @size Size of the class
00268     */
00269    ClassBuilder& SetSizeOf(size_t size);
00270 
00271    /*
00272     * ToType will return the currently produced Type (class)
00273     * @return the type currently being built
00274     */
00275    Type ToType();
00276 
00277 protected:
00278 #ifdef G__COMMON_H
00279    friend int::G__search_tagname(const char*, int);
00280    friend void Cint::Internal::G__set_stdio();
00281    friend void Cint::Internal::G__create_bytecode_arena();
00282 #endif
00283 
00284    /**
00285     * EnableCallback Enable or disable the callback call in the destructor
00286     * @param  enable true to enable callback call, false to disable callback call
00287     */
00288    ClassBuilder& EnableCallback(bool enable = true);
00289 
00290 private:
00291    ClassBuilderImpl fClassBuilderImpl;
00292 
00293 };    // class ClassBuilder
00294 
00295 
00296 /**
00297  * @class ClassBuilderT ClassBuilder.h Reflex/Builder/ClassBuilder.h
00298  * @author Stefan Roiser
00299  * @date 30/3/2004
00300  * @ingroup RefBld
00301  */
00302 template <class C>
00303 class ClassBuilderT {
00304 public:
00305    /** constructor */
00306    ClassBuilderT(unsigned int modifiers = 0,
00307                  TYPE typ = CLASS);
00308 
00309 
00310    /** constructor */
00311    ClassBuilderT(const char* nam,
00312                  unsigned int modifiers = 0,
00313                  TYPE typ = CLASS);
00314 
00315 
00316    /**
00317     * AddBase will add the information about one BaseAt class
00318     * @param  Name of the BaseAt class
00319     * @param  OffsetFP function pointer for Offset calculation
00320     * @param  modifiers the modifiers of the class
00321     */
00322    template <class B>
00323    ClassBuilderT& AddBase(unsigned int modifiers = 0);
00324    ClassBuilderT& AddBase(const Type& bas,
00325                           OffsetFunction offsFP,
00326                           unsigned int modifiers = 0);
00327 
00328 
00329    /** AddDataMember will add the information about one data
00330     * MemberAt of the class
00331     *
00332     * @param  Name of the data MemberAt
00333     * @param  Offset of data MemberAt
00334     * @param  modifiers the modifiers of the data MemberAt
00335     * @return a reference to the ClassBuilderT
00336     */
00337    template <class T>
00338    ClassBuilderT& AddDataMember(const char* nam,
00339                                 size_t offs,
00340                                 unsigned int modifiers = 0);
00341    ClassBuilderT& AddDataMember(const Type& typ,
00342                                 const char* nam,
00343                                 size_t offs,
00344                                 unsigned int modifiers = 0);
00345 
00346 
00347    /** AddFunctionMember will add the information about one
00348     * function MemberAt of the class
00349     *
00350     * @param  Name of the function MemberAt
00351     * @param  function templated function MemberAt to extract At information
00352     * @param  stubFP Stub function pointer for the function
00353     * @param  stubCxt Stub user context for the stub function
00354     * @param  params pamater names and default values (semi-colon separated)
00355     * @param  modifiers the modifiers of the data MemberAt
00356     * @return a reference to the ClassBuilder
00357     */
00358    template <class F>
00359    ClassBuilderT& AddFunctionMember(const char* nam,
00360                                     StubFunction stubFP,
00361                                     void* stubCtx = 0,
00362                                     const char* params = 0,
00363                                     unsigned int modifiers = 0);
00364    ClassBuilderT& AddFunctionMember(const Type& typ,
00365                                     const char* nam,
00366                                     StubFunction stubFP,
00367                                     void* stubCtx = 0,
00368                                     const char* params = 0,
00369                                     unsigned int modifiers = 0);
00370 
00371    template <typename TD>
00372    ClassBuilderT& AddTypedef(const char* def);
00373    ClassBuilderT& AddTypedef(const Type& typ,
00374                              const char* def);
00375    ClassBuilderT& AddTypedef(const char* typ,
00376                              const char* def);
00377 
00378    template <typename E>
00379    ClassBuilderT& AddEnum(const char* values,
00380                           unsigned int modifiers = 0);
00381    ClassBuilderT& AddEnum(const char* nam,
00382                           const char* values,
00383                           const std::type_info* ti = 0,
00384                           unsigned int modifiers = 0);
00385 
00386    //ClassBuilderT & addUnion( const char * nam,
00387    //                          const char * values,
00388    //                          unsigned int modifiers );
00389 
00390 
00391    /** AddProperty will add a PropertyNth to the last defined
00392     * data MemberAt, method or class.
00393     * @param  key the PropertyNth key
00394     * @param  value the value of the PropertyNth
00395     * @return a reference to the building class
00396     */
00397    template <typename P>
00398    ClassBuilderT& AddProperty(const char* key,
00399                               P value);
00400 
00401 
00402    /**
00403     * Register an on demand data member builder with this class.
00404     */
00405    void AddOnDemandDataMemberBuilder(OnDemandBuilderForScope* odb);
00406 
00407 
00408    /**
00409     * Register an on demand function member builder with this class.
00410     */
00411    void AddOnDemandFunctionMemberBuilder(OnDemandBuilderForScope* odb);
00412 
00413 
00414    /** SetSizeOf will set the SizeOf property for this class.
00415     * It currently ignore all actual content.
00416     * @size Size of the class
00417     */
00418    ClassBuilderT& SetSizeOf(size_t size);
00419 
00420    /*
00421     * ToType will return the currently produced Type (class)
00422     * @return the type currently being built
00423     */
00424    Type ToType();
00425 
00426 protected:
00427    /**
00428     * EnableCallback Enable or disable the callback call in the destructor
00429     * @param  enable true to enable callback call, false to disable callback call
00430     */
00431    ClassBuilderT& EnableCallback(bool enable = true);
00432 
00433 private:
00434    ClassBuilderImpl fClassBuilderImpl;
00435 
00436 };    // class ClassBuilderT
00437 
00438 } // namespace Reflex
00439 
00440 //______________________________________________________________________________
00441 template <typename C, typename B> inline Reflex::ClassBuilder&
00442 Reflex::ClassBuilder::AddBase(unsigned int modifiers) {
00443    fClassBuilderImpl.AddBase(GetType<B>(), BaseOffset<C, B>::Get(), modifiers);
00444    return *this;
00445 }
00446 
00447 
00448 //______________________________________________________________________________
00449 template <typename T> inline Reflex::ClassBuilder&
00450 Reflex::ClassBuilder::AddDataMember(const char* nam,
00451                                     size_t offs,
00452                                     unsigned int modifiers) {
00453    fClassBuilderImpl.AddDataMember(nam, TypeDistiller<T>::Get(), offs, modifiers);
00454    return *this;
00455 }
00456 
00457 
00458 //______________________________________________________________________________
00459 template <typename F> inline Reflex::ClassBuilder&
00460 Reflex::ClassBuilder::AddFunctionMember(const char* nam,
00461                                         StubFunction stubFP,
00462                                         void* stubCtx,
00463                                         const char* params,
00464                                         unsigned int modifiers) {
00465    fClassBuilderImpl.AddFunctionMember(nam, FunctionDistiller<F>::Get(), stubFP, stubCtx, params, modifiers);
00466    return *this;
00467 }
00468 
00469 
00470 //______________________________________________________________________________
00471 template <typename TD> inline Reflex::ClassBuilder&
00472 Reflex::ClassBuilder::AddTypedef(const char* def) {
00473    fClassBuilderImpl.AddTypedef(TypeDistiller<TD>::Get(), def);
00474    return *this;
00475 }
00476 
00477 
00478 //______________________________________________________________________________
00479 template <typename E> inline Reflex::ClassBuilder&
00480 Reflex::ClassBuilder::AddEnum(const char* values,
00481                               unsigned int modifiers) {
00482    fClassBuilderImpl.AddEnum(Tools::Demangle(typeid(E)).c_str(), values, &typeid(E), modifiers);
00483    return *this;
00484 }
00485 
00486 
00487 //______________________________________________________________________________
00488 template <typename P> inline Reflex::ClassBuilder&
00489 Reflex::ClassBuilder::AddProperty(const char* key,
00490                                   P value) {
00491    fClassBuilderImpl.AddProperty(key, value);
00492    return *this;
00493 }
00494 
00495 
00496 //______________________________________________________________________________
00497 template <typename C> inline
00498 Reflex::ClassBuilderT<C>::ClassBuilderT(unsigned int modifiers, TYPE typ):
00499    fClassBuilderImpl(Tools::Demangle(typeid(C)).c_str(), typeid(C), sizeof(C), modifiers, typ) {
00500 }
00501 
00502 
00503 //______________________________________________________________________________
00504 template <class C> inline
00505 Reflex::ClassBuilderT<C>::ClassBuilderT(const char* nam, unsigned int modifiers, TYPE typ):
00506    fClassBuilderImpl(nam, typeid(C), sizeof(C), modifiers, typ) {
00507 }
00508 
00509 
00510 //______________________________________________________________________________
00511 template <typename C> template <typename B> inline
00512 Reflex::ClassBuilderT<C>&
00513 Reflex::ClassBuilderT<C>::AddBase(unsigned int modifiers) {
00514    fClassBuilderImpl.AddBase(GetType<B>(), BaseOffset<C, B>::Get(), modifiers);
00515    return *this;
00516 }
00517 
00518 
00519 //______________________________________________________________________________
00520 template <class C> inline
00521 Reflex::ClassBuilderT<C>&
00522 Reflex::ClassBuilderT<C>::AddBase(const Type& bas,
00523            OffsetFunction offsFP,
00524            unsigned int modifiers) {
00525    fClassBuilderImpl.AddBase(bas, offsFP, modifiers);
00526    return *this;
00527 }
00528 
00529 
00530 //______________________________________________________________________________
00531 template <class C> template <class T> inline
00532 Reflex::ClassBuilderT<C>&
00533 Reflex::ClassBuilderT<C>::AddDataMember(const char* nam,
00534                  size_t offs,
00535                  unsigned int modifiers) {
00536    fClassBuilderImpl.AddDataMember(nam, TypeDistiller<T>::Get(), offs, modifiers);
00537    return *this;
00538 }
00539 
00540 
00541 //-------------------------------------------------------------------------------
00542 template <class C> inline
00543 Reflex::ClassBuilderT<C>&
00544 Reflex::ClassBuilderT<C>::AddDataMember(const Type& typ,
00545                  const char* nam,
00546                  size_t offs,
00547                  unsigned int modifiers) {
00548    fClassBuilderImpl.AddDataMember(nam, typ, offs, modifiers);
00549    return *this;
00550 }
00551 
00552 
00553 //______________________________________________________________________________
00554 template <typename C> template <typename F> inline 
00555 Reflex::ClassBuilderT<C>&
00556 Reflex::ClassBuilderT<C>::AddFunctionMember(const char* nam,
00557                      StubFunction stubFP,
00558                      void* stubCtx,
00559                      const char* params,
00560                      unsigned int modifiers) {
00561    fClassBuilderImpl.AddFunctionMember(nam, FunctionDistiller<F>::Get(), stubFP, stubCtx, params, modifiers);
00562    return *this;
00563 }
00564 
00565 
00566 //-------------------------------------------------------------------------------
00567 template <class C>
00568 inline Reflex::ClassBuilderT<C>&
00569 Reflex::ClassBuilderT<C>::AddFunctionMember(const Type& typ,
00570                      const char* nam,
00571                      StubFunction stubFP,
00572                      void* stubCtx,
00573                      const char* params,
00574                      unsigned int modifiers) {
00575 //-------------------------------------------------------------------------------
00576    fClassBuilderImpl.AddFunctionMember(nam,
00577                                        typ,
00578                                        stubFP,
00579                                        stubCtx,
00580                                        params,
00581                                        modifiers);
00582    return *this;
00583 }
00584 
00585 
00586 //-------------------------------------------------------------------------------
00587 template <class C> template <typename TD>
00588 inline Reflex::ClassBuilderT<C>&
00589 Reflex::ClassBuilderT<C>::AddTypedef(const char* def) {
00590 //-------------------------------------------------------------------------------
00591    fClassBuilderImpl.AddTypedef(TypeDistiller<TD>::Get(),
00592                                 def);
00593    return *this;
00594 }
00595 
00596 
00597 //-------------------------------------------------------------------------------
00598 template <class C>
00599 inline Reflex::ClassBuilderT<C>&
00600 Reflex::ClassBuilderT<C>::AddTypedef(const char* typ,
00601               const char* def) {
00602 //-------------------------------------------------------------------------------
00603    fClassBuilderImpl.AddTypedef(TypeBuilder(typ),
00604                                 def);
00605    return *this;
00606 }
00607 
00608 
00609 //-------------------------------------------------------------------------------
00610 template <class C>
00611 inline Reflex::ClassBuilderT<C>&
00612 Reflex::ClassBuilderT<C>::AddTypedef(const Type& typ,
00613               const char* def) {
00614 //-------------------------------------------------------------------------------
00615    fClassBuilderImpl.AddTypedef(typ,
00616                                 def);
00617    return *this;
00618 }
00619 
00620 
00621 //-------------------------------------------------------------------------------
00622 template <class C> template <typename E>
00623 inline Reflex::ClassBuilderT<C>&
00624 Reflex::ClassBuilderT<C>::AddEnum(const char* values,
00625            unsigned int modifiers) {
00626 //-------------------------------------------------------------------------------
00627    fClassBuilderImpl.AddEnum(Tools::Demangle(typeid(E)).c_str(),
00628                              values,
00629                              &typeid(E),
00630                              modifiers);
00631    return *this;
00632 }
00633 
00634 
00635 //-------------------------------------------------------------------------------
00636 template <class C>
00637 inline Reflex::ClassBuilderT<C>&
00638 Reflex::ClassBuilderT<C>::AddEnum(const char* nam,
00639            const char* values,
00640            const std::type_info* ti,
00641            unsigned int modifiers) {
00642 //-------------------------------------------------------------------------------
00643    fClassBuilderImpl.AddEnum(nam,
00644                              values,
00645                              ti,
00646                              modifiers);
00647    return *this;
00648 }
00649 
00650 
00651 /*/-------------------------------------------------------------------------------
00652    template < class C >
00653    inline Reflex::ClassBuilderT<C> &
00654    Reflex::ClassBuilderT<C>::addUnion( const char * nam,
00655    const char * values,
00656    unsigned int modifiers ) {
00657    //-------------------------------------------------------------------------------
00658    fClassBuilderImpl.addUnion( nam, values, modifiers );
00659    return * this;
00660    }
00661  */
00662 
00663 
00664 //-------------------------------------------------------------------------------
00665 template <class C> template <class P>
00666 inline Reflex::ClassBuilderT<C>&
00667 Reflex::ClassBuilderT<C>::AddProperty(const char* key,
00668                P value) {
00669 //-------------------------------------------------------------------------------
00670    fClassBuilderImpl.AddProperty(key, value);
00671    return *this;
00672 }
00673 
00674 
00675 //-------------------------------------------------------------------------------
00676 template <class C>
00677 inline Reflex::ClassBuilderT<C>&
00678 Reflex::ClassBuilderT<C>::EnableCallback(bool enable /* = true */) {
00679 //-------------------------------------------------------------------------------
00680    fClassBuilderImpl.EnableCallback(enable);
00681    return *this;
00682 }
00683 
00684 
00685 //-------------------------------------------------------------------------------
00686 template <class C>
00687 inline Reflex::ClassBuilderT<C>&
00688 Reflex::ClassBuilderT<C>::SetSizeOf(size_t size) {
00689 //-------------------------------------------------------------------------------
00690    fClassBuilderImpl.SetSizeOf(size);
00691    return *this;
00692 }
00693 
00694 
00695 //-------------------------------------------------------------------------------
00696 template <class C> inline Reflex::Type
00697 Reflex::ClassBuilderT<C>::ToType() {
00698 //-------------------------------------------------------------------------------
00699    return fClassBuilderImpl.ToType();
00700 }
00701 
00702 
00703 //-------------------------------------------------------------------------------
00704 template <class C> inline void
00705 Reflex::ClassBuilderT<C>::AddOnDemandDataMemberBuilder(OnDemandBuilderForScope* odb) {
00706 //-------------------------------------------------------------------------------
00707 // Register an on demand builder with this class.
00708    fClassBuilderImpl.AddOnDemandDataMemberBuilder(odb);
00709 }
00710 
00711 //-------------------------------------------------------------------------------
00712 template <class C> inline void
00713 Reflex::ClassBuilderT<C>::AddOnDemandFunctionMemberBuilder(OnDemandBuilderForScope* odb) {
00714 //-------------------------------------------------------------------------------
00715 // Register an on demand builder with this class.
00716    fClassBuilderImpl.AddOnDemandFunctionMemberBuilder(odb);
00717 }
00718 
00719 #endif // Reflex_ClassBuilder

Generated on Tue Jul 5 14:25:47 2011 for ROOT_528-00b_version by  doxygen 1.5.1