⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memberbase.h

📁 cint...昨天看到有个c++解释器,叫CINT,down下来一用,很爽,推荐大家也去看一看。 相信不少朋友们早就知道这个东西了
💻 H
📖 第 1 页 / 共 2 页
字号:
// @(#)root/reflex:$Name:  $:$Id: MemberBase.h,v 1.3 2006/09/05 17:13:14 roiser Exp $// Author: Stefan Roiser 2004// Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.//// Permission to use, copy, modify, and distribute this software for any// purpose is hereby granted without fee, provided that this copyright and// permissions notice appear in all copies and derivatives.//// This software is provided "as is" without express or implied warranty.#ifndef ROOT_Reflex_MemberBase#define ROOT_Reflex_MemberBase// Include files#include "Reflex/Kernel.h"#include "Reflex/PropertyList.h"#include "Reflex/Type.h"#include "Reflex/Scope.h"namespace ROOT {   namespace Reflex {      // forward declarations      class Object;      class DictionaryGenerator;      /**       * @class MemberBase MemberBase.h Reflex/MemberBase.h       * @author Stefan Roiser       * @date 24/11/2003       * @ingroup Ref       */      class RFLX_API MemberBase {      public:         /** default constructor */         MemberBase( const char *   name,                     const Type &   type,                     TYPE           memberType,                     unsigned int   modifiers );         /** destructor */         virtual ~MemberBase();         /**          * operator Member will return the MemberAt object of this MemberAt BaseAt          */         operator const Member & () const;         /**           * DeclaringScope will return the Scope which the MemberAt lives in          * (i.e. the same as the Type)          * @return the declaring Scope of the MemberAt          */         const Scope & DeclaringScope() const;         /**           * DeclaringType will return the Type which the MemberAt lives in          * (i.e. the same as the Scope)          * @return the declaring Type of the MemberAt          */         const Type & DeclaringType() const;         /**          * GenerateDict will produce the dictionary information of this type          * @param generator a reference to the dictionary generator instance          */         virtual void GenerateDict(DictionaryGenerator &generator) const;	                 /** Get the MemberAt value (as void*) */         virtual Object Get( const Object & obj ) const;         /** Invoke the function (if return At as void*) */         /*virtual Object Invoke( const Object & obj,            const std::vector < Object > & paramList ) const;*/         virtual Object Invoke( const Object & obj,                                 const std::vector < void * > & paramList =                                 std::vector<void*>()) const;         /** Invoke the function (for static functions) */         //virtual Object Invoke( const std::vector < Object > & paramList ) const;         virtual Object Invoke( const std::vector < void * > & paramList =                                 std::vector<void*>()) const;         /** check whether artificial is Set for the data MemberAt */         bool IsArtificial() const;         /** check whether auto is Set for the data MemberAt */         bool IsAuto() const;         /** check whether the function MemberAt is a constructor */         bool IsConstructor() const;         /** check whether a member is const qualified */         bool IsConst() const;         /** check whether the function MemberAt is a user defined conversion function */         bool IsConverter() const;         /** check whether the function MemberAt is a copy constructor */         bool IsCopyConstructor() const;         /** return true if this is a data MemberAt */         bool IsDataMember() const;         /** check whether the function MemberAt is a destructor */         bool IsDestructor() const;         /** check whether explicit is Set for the function MemberAt */         bool IsExplicit() const;         /** check whether extern is Set for the data MemberAt */         bool IsExtern() const;         /** return true if this is a function MemberAt */         bool IsFunctionMember() const;         /** check whether inline is Set for the function MemberAt */         bool IsInline() const;               /** check whether Mutable is Set for the data MemberAt */         bool IsMutable() const;         /** check whether the function MemberAt is an operator */         bool IsOperator() const;         /** check whether the function MemberAt is private */         bool IsPrivate() const;         /** check whether the function MemberAt is protected */         bool IsProtected() const;         /** check whether the function MemberAt is public */         bool IsPublic() const;         /** check whether register is Set for the data MemberAt */         bool IsRegister() const;         /** check whether static is Set for the data MemberAt */         bool IsStatic() const;         /**           * IsTemplateInstance returns true if the At represents a           * ClassTemplateInstance          * @return true if At represents a InstantiatedTemplateClass          */         bool IsTemplateInstance() const;         /** check whether transient is Set for the data MemberAt */         bool IsTransient() const;         /** check whether virtual is Set for the function MemberAt */         bool IsVirtual() const;         /** check whether a member is volatile qualified */         bool IsVolatile() const;         /** return the At of the MemberAt (function or data MemberAt) */         TYPE MemberType() const;         /** returns the string representation of the MemberAt species */         std::string MemberTypeAsString() const;         /** return the Name of the MemberAt */         virtual std::string Name( unsigned int mod = 0 ) const;         /** return the Offset of the MemberAt */         virtual size_t Offset() const;         /** number of parameters */         virtual size_t FunctionParameterSize( bool required = false ) const;         /** FunctionParameterAt nth default value if declared*/         virtual std::string FunctionParameterDefaultAt( size_t nth ) const;         virtual StdString_Iterator FunctionParameterDefault_Begin() const;         virtual StdString_Iterator FunctionParameterDefault_End() const;         virtual Reverse_StdString_Iterator FunctionParameterDefault_RBegin() const;         virtual Reverse_StdString_Iterator FunctionParameterDefault_REnd() const;         /** FunctionParameterAt nth Name if declared*/         virtual std::string FunctionParameterNameAt( size_t nth ) const;         virtual StdString_Iterator FunctionParameterName_Begin() const;         virtual StdString_Iterator FunctionParameterName_End() const;         virtual Reverse_StdString_Iterator FunctionParameterName_RBegin() const;         virtual Reverse_StdString_Iterator FunctionParameterName_REnd() const;         /**          * Properties will return a pointer to the PropertyNth list attached          * to this item          * @return pointer to PropertyNth list          */         const PropertyList & Properties() const;         /** Set the MemberAt value */         /*virtual void Set( const Object & instance,           const Object & value ) const;*/         virtual void Set( const Object & instance,                           const void * value ) const;         /** Set the At of the MemberAt */         void SetScope( const Scope & scope ) const;         /** return the context of the MemberAt */         virtual void * Stubcontext() const;         /** return the pointer to the stub function */         virtual StubFunction Stubfunction() const;         /**          * TemplateArgumentAt will return a pointer to the nth template argument          * @param  nth nth template argument          * @return pointer to nth template argument          */         virtual const Type & TemplateArgumentAt( size_t nth ) const;         /**          * templateArgSize will return the number of template arguments          * @return number of template arguments          */         virtual size_t TemplateArgumentSize() const;         virtual Type_Iterator TemplateArgument_Begin() const;         virtual Type_Iterator TemplateArgument_End() const;         virtual Reverse_Type_Iterator TemplateArgument_RBegin() const;         virtual Reverse_Type_Iterator TemplateArgument_REnd() const;         /**          * TemplateFamily returns the corresponding MemberTemplate if any          * @return corresponding MemberTemplate          */         virtual const MemberTemplate & TemplateFamily() const;         /** return pointer to MemberAt At */         const Type & TypeOf() const;      protected:         /**           * CalculateBaseObject will calculate the inheritance between an object          * and the local At if necessary          * @param obj the object from which the calculation should start          * @return memory AddressGet of new local object relative to obj          */         void * CalculateBaseObject( const Object & obj ) const;      protected:         /**          * characteristics of the Member          * @label Member          * @supplierCardinality 1          * @link aggregation          * @clientCardinality 1          */         Type fType;               /** all modifiers of the MemberAt */         unsigned int fModifiers;      private:         /** Name of MemberAt */         std::string fName;         /**          * scope of the member          * @label member scope          * @link aggregation          * @supplierCardinality 1          * @clientCardinality 1          */         mutable            Scope fScope;         /**           * the kind of member ( data/function-member)          * @label member type          * @link aggregation          * @clientCardinality 1          * @supplierCardinality 1          */         TYPE fMemberType;         /**          * property list           * @label propertylist          * @link aggregationByValue          * @clientCardinality 1          * @supplierCardinality 0..1          */         OwnedPropertyList fPropertyList;                  /**          * pointer back to the member object          * @label this member          * @link aggregation          * @supplierCardinality 1          * @clientCardinality 1          */         Member * fThisMember;      }; // class Member   } //namespace Reflex} //namespace ROOT#include "Reflex/Object.h"#include "Reflex/MemberTemplate.h"//-------------------------------------------------------------------------------inline ROOT::Reflex::Object ROOT::Reflex::MemberBase::Get( const Object & /* obj */ ) const {//-------------------------------------------------------------------------------   return Object();}//-------------------------------------------------------------------------------//inline ROOT::Reflex::Object //ROOT::Reflex::MemberBase::Invoke( const Object & /* obj */ ,//                                  const std::vector < Object > & /* paramList */ ) const {//-------------------------------------------------------------------------------//  return Object();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -