Member.h

Go to the documentation of this file.
00001 // @(#)root/reflex:$Id: Member.h 29288 2009-07-01 13:03:35Z axel $
00002 // Author: Stefan Roiser 2004
00003 
00004 // Copyright CERN, CH-1211 Geneva 23, 2004-2006, 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_Member
00013 #define Reflex_Member
00014 
00015 // Include files
00016 #include "Reflex/Kernel.h"
00017 
00018 
00019 namespace Reflex {
00020 // forward declarations
00021 class MemberBase;
00022 class Type;
00023 class Scope;
00024 class PropertyList;
00025 class Object;
00026 class MemberTemplate;
00027 class DictionaryGenerator;
00028 
00029 
00030 /**
00031  * @class Member Member.h Reflex/Member.h
00032  * @author Stefan Roiser
00033  * @date 24/11/2003
00034  * @ingroup Ref
00035  */
00036 class RFLX_API Member {
00037    friend class OwnedMember;
00038 
00039 public:
00040    /** default constructor */
00041    Member(const MemberBase * memberBase = 0);
00042 
00043 
00044    /** copy constructor */
00045    Member(const Member &rh);
00046 
00047 
00048    /** destructor */
00049    ~Member();
00050 
00051 
00052    /**
00053     * lesser than operator
00054     */
00055    bool operator <(const Member& rh) const;
00056 
00057 
00058    /**
00059     * equal operator
00060     */
00061    bool operator ==(const Member& rh) const;
00062 
00063 
00064    /**
00065     * not equal operator
00066     */
00067    bool operator !=(const Member& rh) const;
00068 
00069 
00070    /**
00071     * assignment operator
00072     */
00073    Member& operator =(const Member& rh);
00074 
00075 
00076    /**
00077     * operator bool will return true if the member is valid
00078     * @return true if member is implemented
00079     */
00080    operator bool() const;
00081 
00082 #ifdef REFLEX_CINT_MERGE
00083    // To prevent any un-authorized use as the old type
00084    bool
00085    operator !() const { return !operator bool(); }
00086 
00087    bool
00088    operator &&(bool right) const { return operator bool() && right; }
00089 
00090    bool
00091    operator &&(int right) const { return operator bool() && right; }
00092 
00093    bool
00094    operator &&(long right) const { return operator bool() && right; }
00095 
00096    bool operator &&(const Scope& right) const;
00097    bool operator &&(const Type& right) const;
00098    bool operator &&(const Member& right) const;
00099    bool
00100    operator ||(bool right) const { return operator bool() || right; }
00101 
00102    bool
00103    operator ||(int right) const { return operator bool() || right; }
00104 
00105    bool
00106    operator ||(long right) const { return operator bool() || right; }
00107 
00108    bool operator ||(const Scope& right) const;
00109    bool operator ||(const Type& right) const;
00110    bool operator ||(const Member& right) const;
00111 
00112 private:
00113    operator int() const;
00114 
00115 public:
00116 #endif
00117 
00118    /**
00119     * DeclaringScope will return the scope which the member lives in
00120     * @return the declaring scope of the member
00121     */
00122    Scope DeclaringScope() const;
00123 
00124 
00125    /**
00126     * DeclaringType will return the type which the member lives in
00127     * (i.e. the same as the Scope)
00128     * @return the declaring type of the member
00129     */
00130    Type DeclaringType() const;
00131 
00132 
00133    /**
00134     * GenerateDict will produce the dictionary information of this type
00135     * @param generator a reference to the dictionary generator instance
00136     */
00137    void GenerateDict(DictionaryGenerator& generator) const;
00138 
00139 
00140    /**
00141     * Get a static data member value
00142     * @return member value as object
00143     */
00144    Object Get() const;
00145 
00146 
00147    /**
00148     * Get the data member value
00149     * @return member value as object
00150     */
00151    Object Get(const Object& obj) const;
00152 
00153 
00154    /**
00155     * Id returns a unique identifier of the member in the system
00156     * @return unique identifier
00157     */
00158    void* Id() const;
00159 
00160 
00161    /**
00162     * Invoke a member function
00163     * @param obj the object which owns the member function
00164     * @param paramList a vector of addresses to paramter values
00165     * @return the return value of the function as object
00166     */
00167    void Invoke(const Object& obj,
00168                Object* ret,
00169                const std::vector<void*>& paramList = std::vector<void*>()) const;
00170 
00171    /**
00172     * Invoke a member function
00173     * @param obj the object which owns the member function
00174     * @param paramList a vector of addresses to paramter values
00175     * @return the return value of the function as object
00176     */
00177    template <typename T>
00178    void Invoke(const Object& obj,
00179                T& ret,
00180                const std::vector<void*>& paramList = std::vector<void*>()) const;
00181 
00182    /**
00183     * Invoke a static function
00184     * @param paramList a vector of addresses to parameter values
00185     * @return the return value of the function as object
00186     */
00187    void Invoke(Object* ret,
00188                const std::vector<void*>& paramList = std::vector<void*>()) const;
00189 
00190 
00191    /**
00192     * Invoke a static function
00193     * @param paramList a vector of addresses to parameter values
00194     * @return the return value of the function as object
00195     */
00196    template <typename T>
00197    void Invoke(T& ret,
00198                const std::vector<void*>& paramList = std::vector<void*>()) const;
00199 
00200 
00201    /**
00202     * IsAbstract checks whether abstract is set for the data member,
00203     * or a function member is pure virtual
00204     * @return true if abstract modifier is set for this member
00205     */
00206    bool IsAbstract() const;
00207 
00208 
00209    /**
00210     * IsArtificial checks whether artificial is set for the data member
00211     * @return true if artificial modifier is set for this member
00212     */
00213    bool IsArtificial() const;
00214 
00215    /**
00216     * IsAuto checks whether auto is set for the data member
00217     * @return true if auto modifier is set for this member
00218     */
00219    bool IsAuto() const;
00220 
00221 
00222    /**
00223     * IsConstructor checks whether the function member is a constructor
00224     * @return true if member is a constructor
00225     */
00226    bool IsConstructor() const;
00227 
00228 
00229    /**
00230     * IsConst will check whether this member is const qualified.
00231     * @return true if the member is const qualified
00232     */
00233    bool IsConst() const;
00234 
00235 
00236    /**
00237     * IsConverter checks whether the function member is a user defined conversion function
00238     * @return true if member is a conversion operator
00239     */
00240    bool IsConverter() const;
00241 
00242 
00243    /**
00244     *IsCopyConstructor checks whether the function member is a copy constructor
00245     * @return true if member is a copy constructor
00246     */
00247    bool IsCopyConstructor() const;
00248 
00249 
00250    /**
00251     * IsDataMember returns true if this is a data member
00252     * @return true if this member is a data member
00253     */
00254    bool IsDataMember() const;
00255 
00256 
00257    /**
00258     * check whether the function member is a destructor
00259     * @return true if this member is a destructor
00260     */
00261    bool IsDestructor() const;
00262 
00263 
00264    /**
00265     * IsExplicit checks whether explicit is set for the function member
00266     * @return true if explicit modifier is set for this member
00267     */
00268    bool IsExplicit() const;
00269 
00270 
00271    /**
00272     * IsExtern checks whether extern is set for the data member
00273     * @return true if extern modifier is set for this member
00274     */
00275    bool IsExtern() const;
00276 
00277 
00278    /**
00279     * IsFunctionMember returns true if this is a function member
00280     * @return true if this member is a function member
00281     */
00282    bool IsFunctionMember() const;
00283 
00284 
00285    /**
00286     * IsInline checks whether inline is set for the function member
00287     * @return true if inline modifier is set for this member
00288     */
00289    bool IsInline() const;
00290 
00291 
00292    /**
00293     * IsMutable check whether mutable is set for the data member
00294     * @return true if mutable modifier is set for this member
00295     */
00296    bool IsMutable() const;
00297 
00298 
00299    /**
00300     * IsOperator check whether the function member is an operator
00301     * @return true if this member is an operator function
00302     */
00303    bool IsOperator() const;
00304 
00305 
00306    /**
00307     * IsPrivate checks whether the function member is private
00308     * @return true if access to this member is private
00309     */
00310    bool IsPrivate() const;
00311 
00312 
00313    /**
00314     * IsProtected checks whether the function member is protected
00315     * @return true if access to this member is protected
00316     */
00317    bool IsProtected() const;
00318 
00319 
00320    /**
00321     * IsPublic checks whether the function member is public
00322     * @return true if access to this member is public
00323     */
00324    bool IsPublic() const;
00325 
00326 
00327    /**
00328     * IsPureVirtual checks whether the Member is a pure virtual
00329     * function.
00330     * @return true if function and abstract modifier is set
00331     */
00332    bool IsPureVirtual() const;
00333 
00334 
00335    /**
00336     * IsRegister checks whether register is set for the data member
00337     * @return true if register modifier is set for this member
00338     */
00339    bool IsRegister() const;
00340 
00341 
00342    /*
00343     * IsStatic checks whether static is set for the data member
00344     * @return true is static modifier is set for this member
00345     */
00346    bool IsStatic() const;
00347 
00348 
00349    /**
00350     * IsTemplateInstance returns true if the member represents a
00351     * templated member function
00352     * @return true if member represents a templated member function
00353     */
00354    bool IsTemplateInstance() const;
00355 
00356 
00357    /**
00358     * IsTransient checks whether the function member is transient
00359     * @return true if transient modifier is set for this member (not a C++ modifier)
00360     */
00361    bool IsTransient() const;
00362 
00363 
00364    /**
00365     * IsVirtual checks whether virtual is set for the function member
00366     * @return true if virtual modifier is set for this member
00367     */
00368    bool IsVirtual() const;
00369 
00370 
00371    /**
00372     * IsVolatile will check whether this member is volatile qualified.
00373     * @return true if the member is volatile qualified
00374     */
00375    bool IsVolatile() const;
00376 
00377 
00378    /**
00379     * MemberType return the type of the member as enum value (function or data member)
00380     * @return member type as enum
00381     */
00382    TYPE MemberType() const;
00383 
00384 
00385    /**
00386     * MemberTypeAsString returns the string representation of the member species
00387     * @return member type as string representation
00388     */
00389    std::string MemberTypeAsString() const;
00390 
00391 
00392    /**
00393     * Name returns the Name of the member
00394     * @param mod modifiers can be or'ed as argument
00395     * SCOPED - fully scoped name
00396     * FINAL  - resolve all typedefs
00397     * QUALIFIED - cv and reference qualification
00398     * @return name of the member
00399     */
00400    std::string Name(unsigned int mod = 0) const;
00401 
00402    /**
00403     * Name_c_str returns a char* pointer to the unqualified member name
00404     * @return c string to unqualified member name
00405     */
00406    const char* Name_c_str() const;
00407 
00408    /**
00409     * Offset returns the offset of the data member relative to the start of the scope
00410     * @return offset of member as int
00411     */
00412    size_t Offset() const;
00413    void InterpreterOffset(char*);
00414    char*& InterpreterOffset() const;
00415 
00416 
00417    /**
00418     * FunctionParameterSize returns the number of parameters
00419     * @param required if true only returns the number of required parameters
00420     * @return number of parameters
00421     */
00422    size_t FunctionParameterSize(bool required = false) const;
00423 
00424 
00425    /** FunctionParameterAt nth default value if declared*/
00426    std::string FunctionParameterDefaultAt(size_t nth) const;
00427 
00428 
00429    StdString_Iterator FunctionParameterDefault_Begin() const;
00430    StdString_Iterator FunctionParameterDefault_End() const;
00431    Reverse_StdString_Iterator FunctionParameterDefault_RBegin() const;
00432    Reverse_StdString_Iterator FunctionParameterDefault_REnd() const;
00433 
00434 
00435    /**
00436     * FunctionParametertNameAt returns the nth parameter name
00437     * @param nth parameter name
00438     * @return nth parameter name
00439     */
00440    std::string FunctionParameterNameAt(size_t nth) const;
00441 
00442 
00443    StdString_Iterator FunctionParameterName_Begin() const;
00444    StdString_Iterator FunctionParameterName_End() const;
00445    Reverse_StdString_Iterator FunctionParameterName_RBegin() const;
00446    Reverse_StdString_Iterator FunctionParameterName_REnd() const;
00447 
00448 
00449    /**
00450     * Properties will return the properties attached to this item
00451     * @return properties of this member
00452     */
00453    PropertyList Properties() const;
00454 
00455 
00456    /*void Set( const Object & instance,
00457       const Object & value ) const;*/
00458 
00459    /**
00460     * Set will set the value of a data member
00461     * @param instance of the object owning the data member
00462     * @param value the memory address of the value to set
00463     */
00464    void Set(const Object& instance,
00465             const void* value) const;
00466 
00467 
00468    /**
00469     * SetScope will set the Scope of the member
00470     * @param sc scope to set
00471     */
00472    void SetScope(const Scope& sc) const;
00473 
00474 
00475    /**
00476     * Stubcontext returns a pointer to the context of the member
00477     * @return pointer to member context
00478     */
00479    void* Stubcontext() const;
00480 
00481 
00482    /**
00483     * Stubfunction returns the pointer to the stub function
00484     * @return function pointer to stub function
00485     */
00486    StubFunction Stubfunction() const;
00487 
00488 
00489    /**
00490     * TemplateArgumentAt will return the nth template argument
00491     * @param  nth template argument
00492     * @return nth template argument
00493     */
00494    Type TemplateArgumentAt(size_t nth) const;
00495 
00496 
00497    /**
00498     * TemplateArgumentSize will return the number of template arguments
00499     * @return number of template arguments
00500     */
00501    size_t TemplateArgumentSize() const;
00502 
00503 
00504    Type_Iterator TemplateArgument_Begin() const;
00505    Type_Iterator TemplateArgument_End() const;
00506    Reverse_Type_Iterator TemplateArgument_RBegin() const;
00507    Reverse_Type_Iterator TemplateArgument_REnd() const;
00508 
00509 
00510    /**
00511     * TemplateFamily returns the corresponding MemberTemplate if any
00512     * @return corresponding MemberTemplate
00513     */
00514    MemberTemplate TemplateFamily() const;
00515 
00516 
00517    /**
00518     * ToMemberBase returns the underlying, internal MemberBase
00519     * @return memberbase pointer
00520     */
00521    MemberBase* ToMemberBase() const;
00522 
00523 
00524    /**
00525     * TypeOf returns the member type
00526     * @return member type
00527     */
00528    Type TypeOf() const;
00529 
00530    /**
00531     * UpdateFunctionParameterNames updates the names of parameters
00532     * @param  parameters new list of ';' separated parameter names, must not specify default values
00533     */
00534    void UpdateFunctionParameterNames(const char* parameters);
00535 
00536 private:
00537    void Delete();
00538 
00539    /**
00540     * the pointer to the member implementation
00541     * @link aggregation
00542     * @supplierCardinality 1
00543     * @clientCardinality 0..1
00544     * @label member base
00545     */
00546    MemberBase* fMemberBase;
00547 
00548 };    // class Member
00549 
00550 } //namespace Reflex
00551 
00552 #include "Reflex/internal/MemberBase.h"
00553 #include "Reflex/Scope.h"
00554 #include "Reflex/PropertyList.h"
00555 #include "Reflex/Type.h"
00556 #include "Reflex/MemberTemplate.h"
00557 
00558 
00559 //-------------------------------------------------------------------------------
00560 inline bool
00561 Reflex::Member::operator <(const Member& rh) const {
00562 //-------------------------------------------------------------------------------
00563    if ((*this) && (bool) rh) {
00564       return TypeOf() < rh.TypeOf() && Name() < rh.Name();
00565    }
00566    return false;
00567 }
00568 
00569 
00570 //-------------------------------------------------------------------------------
00571 inline bool
00572 Reflex::Member::operator ==(const Member& rh) const {
00573 //-------------------------------------------------------------------------------
00574    if ((*this) && (bool) rh) {
00575       return TypeOf() == rh.TypeOf() && 0 == strcmp(Name_c_str(), rh.Name_c_str());
00576    }
00577    // both invalid is equal, too
00578    return (!(*this)) && (!rh);
00579 }
00580 
00581 
00582 //-------------------------------------------------------------------------------
00583 inline bool
00584 Reflex::Member::operator !=(const Member& rh) const {
00585 //-------------------------------------------------------------------------------
00586    return !(*this == rh);
00587 }
00588 
00589 
00590 //-------------------------------------------------------------------------------
00591 inline Reflex::Member&
00592 Reflex::Member::operator =(const Member& rh) {
00593 //-------------------------------------------------------------------------------
00594    fMemberBase = rh.fMemberBase;
00595    return *this;
00596 }
00597 
00598 
00599 //-------------------------------------------------------------------------------
00600 inline
00601 Reflex::Member::operator bool() const {
00602 //-------------------------------------------------------------------------------
00603    return 0 != fMemberBase;
00604 }
00605 
00606 
00607 //-------------------------------------------------------------------------------
00608 inline Reflex::Scope
00609 Reflex::Member::DeclaringScope() const {
00610 //-------------------------------------------------------------------------------
00611    if (*this) {
00612       return fMemberBase->DeclaringScope();
00613    }
00614    return Dummy::Scope();
00615 }
00616 
00617 
00618 //-------------------------------------------------------------------------------
00619 inline Reflex::Type
00620 Reflex::Member::DeclaringType() const {
00621 //-------------------------------------------------------------------------------
00622    if (*this) {
00623       return fMemberBase->DeclaringScope();
00624    }
00625    return Dummy::Type();
00626 }
00627 
00628 
00629 //-------------------------------------------------------------------------------
00630 inline void*
00631 Reflex::Member::Id() const {
00632 //-------------------------------------------------------------------------------
00633    return (void*) fMemberBase;
00634 }
00635 
00636 
00637 //-------------------------------------------------------------------------------
00638 template <typename T>
00639 inline void
00640 Reflex::Member::Invoke(const Object& obj,
00641                        T& ret,
00642                        const std::vector<void*>& paramList) const {
00643 //-------------------------------------------------------------------------------
00644    Object retO(Type::ByTypeInfo(typeid(T)), &ret);
00645    Invoke(obj, &retO, paramList);
00646 }
00647 
00648 
00649 //-------------------------------------------------------------------------------
00650 template <typename T>
00651 inline void
00652 Reflex::Member::Invoke(T& ret,
00653                        const std::vector<void*>& paramList) const {
00654 //-------------------------------------------------------------------------------
00655    Object retO(Type::ByTypeInfo(typeid(T)), &ret);
00656    Invoke(&retO, paramList);
00657 }
00658 
00659 
00660 //-------------------------------------------------------------------------------
00661 inline bool
00662 Reflex::Member::IsAbstract() const {
00663 //-------------------------------------------------------------------------------
00664    if (*this) {
00665       return fMemberBase->IsAbstract();
00666    }
00667    return false;
00668 }
00669 
00670 
00671 //-------------------------------------------------------------------------------
00672 inline bool
00673 Reflex::Member::IsArtificial() const {
00674 //-------------------------------------------------------------------------------
00675    if (*this) {
00676       return fMemberBase->IsArtificial();
00677    }
00678    return false;
00679 }
00680 
00681 
00682 //-------------------------------------------------------------------------------
00683 inline bool
00684 Reflex::Member::IsAuto() const {
00685 //-------------------------------------------------------------------------------
00686    if (*this) {
00687       return fMemberBase->IsAuto();
00688    }
00689    return false;
00690 }
00691 
00692 
00693 //-------------------------------------------------------------------------------
00694 inline bool
00695 Reflex::Member::IsConstructor() const {
00696 //-------------------------------------------------------------------------------
00697    if (*this) {
00698       return fMemberBase->IsConstructor();
00699    }
00700    return false;
00701 }
00702 
00703 
00704 //-------------------------------------------------------------------------------
00705 inline bool
00706 Reflex::Member::IsConst() const {
00707 //-------------------------------------------------------------------------------
00708    if (*this) {
00709       return fMemberBase->IsConst();
00710    }
00711    return false;
00712 }
00713 
00714 
00715 //-------------------------------------------------------------------------------
00716 inline bool
00717 Reflex::Member::IsConverter() const {
00718 //-------------------------------------------------------------------------------
00719    if (*this) {
00720       return fMemberBase->IsConverter();
00721    }
00722    return false;
00723 }
00724 
00725 
00726 //-------------------------------------------------------------------------------
00727 inline bool
00728 Reflex::Member::IsCopyConstructor() const {
00729 //-------------------------------------------------------------------------------
00730    if (*this) {
00731       return fMemberBase->IsCopyConstructor();
00732    }
00733    return false;
00734 }
00735 
00736 
00737 //-------------------------------------------------------------------------------
00738 inline bool
00739 Reflex::Member::IsDataMember() const {
00740 //-------------------------------------------------------------------------------
00741    if (*this) {
00742       return fMemberBase->IsDataMember();
00743    }
00744    return false;
00745 }
00746 
00747 
00748 //-------------------------------------------------------------------------------
00749 inline bool
00750 Reflex::Member::IsDestructor() const {
00751 //-------------------------------------------------------------------------------
00752    if (*this) {
00753       return fMemberBase->IsDestructor();
00754    }
00755    return false;
00756 }
00757 
00758 
00759 //-------------------------------------------------------------------------------
00760 inline bool
00761 Reflex::Member::IsExplicit() const {
00762 //-------------------------------------------------------------------------------
00763    if (*this) {
00764       return fMemberBase->IsExplicit();
00765    }
00766    return false;
00767 }
00768 
00769 
00770 //-------------------------------------------------------------------------------
00771 inline bool
00772 Reflex::Member::IsExtern() const {
00773 //-------------------------------------------------------------------------------
00774    if (*this) {
00775       return fMemberBase->IsExtern();
00776    }
00777    return false;
00778 }
00779 
00780 
00781 //-------------------------------------------------------------------------------
00782 inline bool
00783 Reflex::Member::IsFunctionMember() const {
00784 //-------------------------------------------------------------------------------
00785    if (*this) {
00786       return fMemberBase->IsFunctionMember();
00787    }
00788    return false;
00789 }
00790 
00791 
00792 //-------------------------------------------------------------------------------
00793 inline bool
00794 Reflex::Member::IsInline() const {
00795 //-------------------------------------------------------------------------------
00796    if (*this) {
00797       return fMemberBase->IsInline();
00798    }
00799    return false;
00800 }
00801 
00802 
00803 //-------------------------------------------------------------------------------
00804 inline bool
00805 Reflex::Member::IsMutable() const {
00806 //-------------------------------------------------------------------------------
00807    if (*this) {
00808       return fMemberBase->IsMutable();
00809    }
00810    return false;
00811 }
00812 
00813 
00814 //-------------------------------------------------------------------------------
00815 inline bool
00816 Reflex::Member::IsOperator() const {
00817 //-------------------------------------------------------------------------------
00818    if (*this) {
00819       return fMemberBase->IsOperator();
00820    }
00821    return false;
00822 }
00823 
00824 
00825 //-------------------------------------------------------------------------------
00826 inline bool
00827 Reflex::Member::IsPrivate() const {
00828 //-------------------------------------------------------------------------------
00829    if (*this) {
00830       return fMemberBase->IsPrivate();
00831    }
00832    return false;
00833 }
00834 
00835 
00836 //-------------------------------------------------------------------------------
00837 inline bool
00838 Reflex::Member::IsProtected() const {
00839 //-------------------------------------------------------------------------------
00840    if (*this) {
00841       return fMemberBase->IsProtected();
00842    }
00843    return false;
00844 }
00845 
00846 
00847 //-------------------------------------------------------------------------------
00848 inline bool
00849 Reflex::Member::IsPublic() const {
00850 //-------------------------------------------------------------------------------
00851    if (*this) {
00852       return fMemberBase->IsPublic();
00853    }
00854    return false;
00855 }
00856 
00857 
00858 //-------------------------------------------------------------------------------
00859 inline bool
00860 Reflex::Member::IsPureVirtual() const {
00861 //-------------------------------------------------------------------------------
00862    if (*this) {
00863       return IsFunctionMember() && IsAbstract();
00864    }
00865    return false;
00866 }
00867 
00868 
00869 //-------------------------------------------------------------------------------
00870 inline bool
00871 Reflex::Member::IsRegister() const {
00872 //-------------------------------------------------------------------------------
00873    if (*this) {
00874       return fMemberBase->IsRegister();
00875    }
00876    return false;
00877 }
00878 
00879 
00880 //-------------------------------------------------------------------------------
00881 inline bool
00882 Reflex::Member::IsStatic() const {
00883 //-------------------------------------------------------------------------------
00884    if (*this) {
00885       return fMemberBase->IsStatic();
00886    }
00887    return false;
00888 }
00889 
00890 
00891 //-------------------------------------------------------------------------------
00892 inline bool
00893 Reflex::Member::IsTemplateInstance() const {
00894 //-------------------------------------------------------------------------------
00895    if (*this) {
00896       return fMemberBase->IsTemplateInstance();
00897    }
00898    return false;
00899 }
00900 
00901 
00902 //-------------------------------------------------------------------------------
00903 inline bool
00904 Reflex::Member::IsTransient() const {
00905 //-------------------------------------------------------------------------------
00906    if (*this) {
00907       return fMemberBase->IsTransient();
00908    }
00909    return false;
00910 }
00911 
00912 
00913 //-------------------------------------------------------------------------------
00914 inline bool
00915 Reflex::Member::IsVirtual() const {
00916 //-------------------------------------------------------------------------------
00917    if (*this) {
00918       return fMemberBase->IsVirtual();
00919    }
00920    return false;
00921 }
00922 
00923 
00924 //-------------------------------------------------------------------------------
00925 inline bool
00926 Reflex::Member::IsVolatile() const {
00927 //-------------------------------------------------------------------------------
00928    if (*this) {
00929       return fMemberBase->IsVolatile();
00930    }
00931    return false;
00932 }
00933 
00934 
00935 //-------------------------------------------------------------------------------
00936 inline Reflex::TYPE
00937 Reflex::Member::MemberType() const {
00938 //-------------------------------------------------------------------------------
00939    if (*this) {
00940       return fMemberBase->MemberType();
00941    }
00942    return UNRESOLVED;
00943 }
00944 
00945 
00946 //-------------------------------------------------------------------------------
00947 inline std::string
00948 Reflex::Member::MemberTypeAsString() const {
00949 //-------------------------------------------------------------------------------
00950    if (*this) {
00951       return fMemberBase->MemberTypeAsString();
00952    }
00953    return "";
00954 }
00955 
00956 
00957 //-------------------------------------------------------------------------------
00958 inline std::string
00959 Reflex::Member::Name(unsigned int mod) const {
00960 //-------------------------------------------------------------------------------
00961    if (*this) {
00962       return fMemberBase->Name(mod);
00963    }
00964    return "";
00965 }
00966 
00967 
00968 //-------------------------------------------------------------------------------
00969 inline const char*
00970 Reflex::Member::Name_c_str() const {
00971    //-------------------------------------------------------------------------------
00972    if (*this) {
00973       return fMemberBase->Name_c_str();
00974    }
00975    return "";
00976 }
00977 
00978 
00979 //-------------------------------------------------------------------------------
00980 inline size_t
00981 Reflex::Member::Offset() const {
00982 //-------------------------------------------------------------------------------
00983    if (*this) {
00984       return fMemberBase->Offset();
00985    }
00986    return 0;
00987 }
00988 
00989 
00990 inline void
00991 Reflex::Member::InterpreterOffset(char* offset) {
00992    if (*this) {
00993       fMemberBase->InterpreterOffset(offset);
00994    }
00995 }
00996 
00997 
00998 inline char*&
00999 Reflex::Member::InterpreterOffset() const {
01000    return fMemberBase->InterpreterOffset();
01001 }
01002 
01003 
01004 //-------------------------------------------------------------------------------
01005 inline size_t
01006 Reflex::Member::FunctionParameterSize(bool required) const {
01007 //-------------------------------------------------------------------------------
01008    if (*this) {
01009       return fMemberBase->FunctionParameterSize(required);
01010    }
01011    return 0;
01012 }
01013 
01014 
01015 //-------------------------------------------------------------------------------
01016 inline std::string
01017 Reflex::Member::FunctionParameterDefaultAt(size_t nth) const {
01018 //-------------------------------------------------------------------------------
01019    if (*this) {
01020       return fMemberBase->FunctionParameterDefaultAt(nth);
01021    }
01022    return "";
01023 }
01024 
01025 
01026 //-------------------------------------------------------------------------------
01027 inline Reflex::StdString_Iterator
01028 Reflex::Member::FunctionParameterDefault_Begin() const {
01029 //-------------------------------------------------------------------------------
01030    if (*this) {
01031       return fMemberBase->FunctionParameterDefault_Begin();
01032    }
01033    return Dummy::StdStringCont().begin();
01034 }
01035 
01036 
01037 //-------------------------------------------------------------------------------
01038 inline Reflex::StdString_Iterator
01039 Reflex::Member::FunctionParameterDefault_End() const {
01040 //-------------------------------------------------------------------------------
01041    if (*this) {
01042       return fMemberBase->FunctionParameterDefault_End();
01043    }
01044    return Dummy::StdStringCont().end();
01045 }
01046 
01047 
01048 //-------------------------------------------------------------------------------
01049 inline Reflex::Reverse_StdString_Iterator
01050 Reflex::Member::FunctionParameterDefault_RBegin() const {
01051 //-------------------------------------------------------------------------------
01052    if (*this) {
01053       return fMemberBase->FunctionParameterDefault_RBegin();
01054    }
01055    return Dummy::StdStringCont().rbegin();
01056 }
01057 
01058 
01059 //-------------------------------------------------------------------------------
01060 inline Reflex::Reverse_StdString_Iterator
01061 Reflex::Member::FunctionParameterDefault_REnd() const {
01062 //-------------------------------------------------------------------------------
01063    if (*this) {
01064       return fMemberBase->FunctionParameterDefault_REnd();
01065    }
01066    return Dummy::StdStringCont().rend();
01067 }
01068 
01069 
01070 //-------------------------------------------------------------------------------
01071 inline std::string
01072 Reflex::Member::FunctionParameterNameAt(size_t nth) const {
01073 //-------------------------------------------------------------------------------
01074    if (*this) {
01075       return fMemberBase->FunctionParameterNameAt(nth);
01076    }
01077    return "";
01078 }
01079 
01080 
01081 //-------------------------------------------------------------------------------
01082 inline Reflex::StdString_Iterator
01083 Reflex::Member::FunctionParameterName_Begin() const {
01084 //-------------------------------------------------------------------------------
01085    if (*this) {
01086       return fMemberBase->FunctionParameterName_Begin();
01087    }
01088    return Dummy::StdStringCont().begin();
01089 }
01090 
01091 
01092 //-------------------------------------------------------------------------------
01093 inline Reflex::StdString_Iterator
01094 Reflex::Member::FunctionParameterName_End() const {
01095 //-------------------------------------------------------------------------------
01096    if (*this) {
01097       return fMemberBase->FunctionParameterName_End();
01098    }
01099    return Dummy::StdStringCont().end();
01100 }
01101 
01102 
01103 //-------------------------------------------------------------------------------
01104 inline Reflex::Reverse_StdString_Iterator
01105 Reflex::Member::FunctionParameterName_RBegin() const {
01106 //-------------------------------------------------------------------------------
01107    if (*this) {
01108       return fMemberBase->FunctionParameterName_RBegin();
01109    }
01110    return Dummy::StdStringCont().rbegin();
01111 }
01112 
01113 
01114 //-------------------------------------------------------------------------------
01115 inline Reflex::Reverse_StdString_Iterator
01116 Reflex::Member::FunctionParameterName_REnd() const {
01117 //-------------------------------------------------------------------------------
01118    if (*this) {
01119       return fMemberBase->FunctionParameterName_REnd();
01120    }
01121    return Dummy::StdStringCont().rend();
01122 }
01123 
01124 
01125 //-------------------------------------------------------------------------------
01126 inline Reflex::PropertyList
01127 Reflex::Member::Properties() const {
01128 //-------------------------------------------------------------------------------
01129    if (*this) {
01130       return fMemberBase->Properties();
01131    }
01132    return Dummy::PropertyList();
01133 }
01134 
01135 
01136 //-------------------------------------------------------------------------------
01137 inline void
01138 Reflex::Member::SetScope(const Scope& sc) const {
01139 //-------------------------------------------------------------------------------
01140    if (*this) {
01141       fMemberBase->SetScope(sc);
01142    }
01143 }
01144 
01145 
01146 //-------------------------------------------------------------------------------
01147 inline void*
01148 Reflex::Member::Stubcontext() const {
01149 //-------------------------------------------------------------------------------
01150    if (*this) {
01151       return fMemberBase->Stubcontext();
01152    }
01153    return 0;
01154 }
01155 
01156 
01157 //-------------------------------------------------------------------------------
01158 inline Reflex::StubFunction
01159 Reflex::Member::Stubfunction() const {
01160 //-------------------------------------------------------------------------------
01161    if (*this) {
01162       return fMemberBase->Stubfunction();
01163    }
01164    return 0;
01165 }
01166 
01167 
01168 //-------------------------------------------------------------------------------
01169 inline Reflex::Type
01170 Reflex::Member::TemplateArgumentAt(size_t nth) const {
01171 //-------------------------------------------------------------------------------
01172    if (*this) {
01173       return fMemberBase->TemplateArgumentAt(nth);
01174    }
01175    return Dummy::Type();
01176 }
01177 
01178 
01179 //-------------------------------------------------------------------------------
01180 inline size_t
01181 Reflex::Member::TemplateArgumentSize() const {
01182 //-------------------------------------------------------------------------------
01183    if (*this) {
01184       return fMemberBase->TemplateArgumentSize();
01185    }
01186    return 0;
01187 }
01188 
01189 
01190 //-------------------------------------------------------------------------------
01191 inline Reflex::Type_Iterator
01192 Reflex::Member::TemplateArgument_Begin() const {
01193 //-------------------------------------------------------------------------------
01194    if (*this) {
01195       return fMemberBase->TemplateArgument_Begin();
01196    }
01197    return Dummy::TypeCont().begin();
01198 }
01199 
01200 
01201 //-------------------------------------------------------------------------------
01202 inline Reflex::Type_Iterator
01203 Reflex::Member::TemplateArgument_End() const {
01204 //-------------------------------------------------------------------------------
01205    if (*this) {
01206       return fMemberBase->TemplateArgument_End();
01207    }
01208    return Dummy::TypeCont().end();
01209 }
01210 
01211 
01212 //-------------------------------------------------------------------------------
01213 inline Reflex::Reverse_Type_Iterator
01214 Reflex::Member::TemplateArgument_RBegin() const {
01215 //-------------------------------------------------------------------------------
01216    if (*this) {
01217       return fMemberBase->TemplateArgument_RBegin();
01218    }
01219    return Dummy::TypeCont().rbegin();
01220 }
01221 
01222 
01223 //-------------------------------------------------------------------------------
01224 inline Reflex::Reverse_Type_Iterator
01225 Reflex::Member::TemplateArgument_REnd() const {
01226 //-------------------------------------------------------------------------------
01227    if (*this) {
01228       return fMemberBase->TemplateArgument_REnd();
01229    }
01230    return Dummy::TypeCont().rend();
01231 }
01232 
01233 
01234 //-------------------------------------------------------------------------------
01235 inline Reflex::MemberTemplate
01236 Reflex::Member::TemplateFamily() const {
01237 //-------------------------------------------------------------------------------
01238    if (*this) {
01239       return fMemberBase->TemplateFamily();
01240    }
01241    return Dummy::MemberTemplate();
01242 }
01243 
01244 
01245 //-------------------------------------------------------------------------------
01246 inline Reflex::MemberBase*
01247 Reflex::Member::ToMemberBase() const {
01248 //-------------------------------------------------------------------------------
01249    return fMemberBase;
01250 }
01251 
01252 
01253 //-------------------------------------------------------------------------------
01254 inline Reflex::Type
01255 Reflex::Member::TypeOf() const {
01256 //-------------------------------------------------------------------------------
01257    if (*this) {
01258       return fMemberBase->TypeOf();
01259    }
01260    return Dummy::Type();
01261 }
01262 
01263 
01264 //-------------------------------------------------------------------------------
01265 inline void
01266 Reflex::Member::UpdateFunctionParameterNames(const char* parameters) {
01267 //-------------------------------------------------------------------------------
01268    if (*this) {
01269       return fMemberBase->UpdateFunctionParameterNames(parameters);
01270    }
01271 }
01272 
01273 
01274 #ifdef REFLEX_CINT_MERGE
01275 inline bool
01276 operator &&(bool b,
01277             const Reflex::Member& rh) {
01278    return b && rh.operator bool();
01279 }
01280 
01281 
01282 inline bool
01283 operator &&(int i,
01284             const Reflex::Member& rh) {
01285    return i && rh.operator bool();
01286 }
01287 
01288 
01289 inline bool
01290 operator &&(short s,
01291             const Reflex::Member& rh) {
01292    return s && rh.operator bool();
01293 }
01294 
01295 
01296 inline bool
01297 operator ||(short s,
01298             const Reflex::Member& rh) {
01299    return s || rh.operator bool();
01300 }
01301 
01302 
01303 inline bool
01304 operator ||(bool b,
01305             const Reflex::Member& rh) {
01306    return b || rh.operator bool();
01307 }
01308 
01309 
01310 inline bool
01311 operator ||(int i,
01312             const Reflex::Member& rh) {
01313    return i || rh.operator bool();
01314 }
01315 
01316 
01317 #endif
01318 
01319 
01320 #endif // Reflex_Member

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