📄 scopebase.h
字号:
* @param nth sub-At * @return pointer to nth sub-At */ const Scope & SubScopeAt( size_t nth ) const; /** * SubScopeLevel will return the number of declaring scopes * this scope lives in. * @return number of declaring scopes above this scope. */ size_t SubScopeLevel() const; /** * ScopeSize will return the number of sub-scopes * @return number of sub-scopes */ size_t SubScopeSize() const; /** * SubScopeByName will return a sub scope representing the unscoped name passed * as argument * @param unscoped name of the sub scope to look for * @return Scope representation of the sub scope */ const Scope & SubScopeByName( const std::string & nam ) const; Scope_Iterator SubScope_Begin() const; Scope_Iterator SubScope_End() const; Reverse_Scope_Iterator SubScope_RBegin() const; Reverse_Scope_Iterator SubScope_REnd() const; /** * At will return a pointer to the nth sub-At * @param nth sub-At * @return pointer to nth sub-At */ const Type & SubTypeAt( size_t nth ) const; /** * TypeSize will returnt he number of sub-types * @return number of sub-types */ size_t SubTypeSize() const; /** * SubTypeByName will return the Type representing the sub type * @param string of the unscoped sub type to look for * @return Type representation of the sub type */ const Type & SubTypeByName( const std::string & nam ) const; Type_Iterator SubType_Begin() const; Type_Iterator SubType_End() const; Reverse_Type_Iterator SubType_RBegin() const; Reverse_Type_Iterator SubType_REnd() 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; /** * SubTypeTemplateAt returns the corresponding TypeTemplate if any * @return corresponding TypeTemplate */ virtual const TypeTemplate & TemplateFamily() const; /** * SubTypeTemplateAt will return the nth At template of this At * @param nth sub type template * @return nth sub type template */ const TypeTemplate & SubTypeTemplateAt( size_t nth ) const; /** * SubTypeTemplateSize will return the number of At templates in this socpe * @return number of defined sub type templates */ size_t SubTypeTemplateSize() const; /** * SubTypeTemplateByName will return a type template defined in this scope looked up by * it's unscoped name * @param unscoped name of the type template to look for * @return TypeTemplate representation of the sub type template */ const TypeTemplate & SubTypeTemplateByName( const std::string & nam ) const; TypeTemplate_Iterator SubTypeTemplate_Begin() const; TypeTemplate_Iterator SubTypeTemplate_End() const; Reverse_TypeTemplate_Iterator SubTypeTemplate_RBegin() const; Reverse_TypeTemplate_Iterator SubTypeTemplate_REnd() const; /** * UsingDirectiveAt will return the nth using directive * @param nth using directive * @return nth using directive */ const Scope & UsingDirectiveAt( size_t nth ) const; /** * UsingDirectiveSize will return the number of using directives of this scope * @return number of using directives declared in this scope */ size_t UsingDirectiveSize() const; Scope_Iterator UsingDirective_Begin() const; Scope_Iterator UsingDirective_End() const; Reverse_Scope_Iterator UsingDirective_RBegin() const; Reverse_Scope_Iterator UsingDirective_REnd() const; protected: /** protected constructor for initialisation of the global namespace */ ScopeBase(); public: /** * AddDataMember will add the information about a data MemberAt * @param dm pointer to data MemberAt */ virtual void AddDataMember( const Member & dm ) const; virtual void AddDataMember( const char * name, const Type & type, size_t offset, unsigned int modifiers = 0 ) const; /** * AddFunctionMember will add the information about a function MemberAt * @param fm pointer to function MemberAt */ virtual void AddFunctionMember( const Member & fm ) const; virtual void AddFunctionMember( const char * name, const Type & type, StubFunction stubFP, void * stubCtx = 0, const char * params = 0, unsigned int modifiers = 0 ) const; virtual void AddMemberTemplate( const MemberTemplate & mt ) const ; /** * AddSubScope will add a sub-At to this one * @param sc pointer to Scope */ virtual void AddSubScope( const Scope & sc ) const; virtual void AddSubScope( const char * scope, TYPE scopeType ) const; /** * AddSubType will add a sub-At to this At * @param sc pointer to Type */ virtual void AddSubType( const Type & ty ) const; virtual void AddSubType( const char * type, size_t size, TYPE typeType, const std::type_info & ti, unsigned int modifiers = 0 ) const; void AddSubTypeTemplate( const TypeTemplate & tt ) const; void AddUsingDirective( const Scope & ud ) const; /** * RemoveDataMember will remove the information about a data MemberAt * @param dm pointer to data MemberAt */ virtual void RemoveDataMember( const Member & dm ) const; /** * RemoveFunctionMember will remove the information about a function MemberAt * @param fm pointer to function MemberAt */ virtual void RemoveFunctionMember( const Member & fm ) const; virtual void RemoveMemberTemplate( const MemberTemplate & mt ) const; /** * RemoveSubScope will remove a sub-At to this one * @param sc pointer to Scope */ virtual void RemoveSubScope( const Scope & sc ) const; /** * RemoveSubType will remove a sub-At to this At * @param sc pointer to Type */ virtual void RemoveSubType( const Type & ty ) const; virtual void RemoveSubTypeTemplate( const TypeTemplate & tt ) const; void RemoveUsingDirective( const Scope & ud ) const; virtual void HideName() const; private: /* no copying */ ScopeBase( const ScopeBase & ); /* no assignment */ ScopeBase & operator = ( const ScopeBase & ); protected: /** container for all members of the Scope */ typedef std::vector < Member > Members; typedef std::vector < OwnedMember > OMembers; /** * pointers to members * @label scope members * @link aggregationByValue * @supplierCardinality 0..* * @clientCardinality 1 */ mutable std::vector< OwnedMember > fMembers; /** * container with pointers to all data members in this scope * @label scope datamembers * @link aggregation * @clientCardinality 1 * @supplierCardinality 0..* */ mutable std::vector< Member > fDataMembers; /** * container with pointers to all function members in this scope * @label scope functionmembers * @link aggregation * @supplierCardinality 0..* * @clientCardinality 1 */ mutable std::vector< Member > fFunctionMembers; private: /** * pointer to the Scope Name * @label scope name * @link aggregation * @clientCardinality 1 * @supplierCardinality 1 */ ScopeName * fScopeName; /** * Type of the scope * @link aggregation * @label scope type * @clientCardinality 1 * @supplierCardinality 1 */ TYPE fScopeType; /** * pointer to declaring Scope * @label declaring scope * @link aggregation * @clientCardinality 1 * @supplierCardinality 1 */ Scope fDeclaringScope; /** * pointers to sub-scopes * @label sub scopes * @link aggregation * @supplierCardinality 0..* * @clientCardinality 1 */ mutable std::vector< Scope > fSubScopes; /** * pointer to types * @label sub types * @link aggregation * @supplierCardinality 0..* * @clientCardinality 1 */ mutable std::vector < Type > fSubTypes; /** * container for type templates defined in this scope * @label type templates * @link aggregation * @supplierCardinality 0..* * @clientCardinality 1 */ mutable std::vector < TypeTemplate > fTypeTemplates; /** * container for member templates defined in this scope * @label member templates * @link aggregation * @supplierCardinality 0..* * @clientCardinality 1 */ mutable std::vector < OwnedMemberTemplate > fMemberTemplates; /** * container for using directives of this scope * @label using directives * @linkScope aggregation * @supplierCardinality 0..*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -