diff --git a/cint/reflex/inc/Reflex/internal/ScopeBase.h b/cint/reflex/inc/Reflex/internal/ScopeBase.h index 6b97292dc56112c14a798b94e0098a01b82efe57..5d32c4f1818f288b6fd7319e8d979d910e1b9570 100644 --- a/cint/reflex/inc/Reflex/internal/ScopeBase.h +++ b/cint/reflex/inc/Reflex/internal/ScopeBase.h @@ -758,16 +758,6 @@ namespace Reflex { std::vector < Scope > fUsingDirectives; - /** - * pointer to the property list - * @label propertylist - * @link aggregationByValue - * @clientCardinality 1 - * @supplierCardinality 1 - */ - OwnedPropertyList fPropertyList; - - /** * The position where the unscoped Name starts in the scopename */ diff --git a/cint/reflex/src/Namespace.cxx b/cint/reflex/src/Namespace.cxx index bb50077a2b7cd16102a1847f4c21db29358776c6..deff027416d93ffe6265f4465f107125f7db32e7 100644 --- a/cint/reflex/src/Namespace.cxx +++ b/cint/reflex/src/Namespace.cxx @@ -21,7 +21,8 @@ //------------------------------------------------------------------------------- Reflex::Namespace::Namespace( const char * scop ) //------------------------------------------------------------------------------- - : ScopeBase( scop, NAMESPACE ) { + : ScopeBase( scop, NAMESPACE ), + fPropertyList( OwnedPropertyList( new PropertyListImpl())) { // Create dictionary info for a namespace scope. } @@ -29,10 +30,17 @@ Reflex::Namespace::Namespace( const char * scop ) //------------------------------------------------------------------------------- Reflex::Namespace::Namespace() //------------------------------------------------------------------------------- - : ScopeBase() { - // Destructor. + : ScopeBase(), + fPropertyList( OwnedPropertyList( new PropertyListImpl())) { + // Default Constructore (for the global namespace) } +//------------------------------------------------------------------------------- +Reflex::Namespace::~Namespace() { +//------------------------------------------------------------------------------- +// Default destructor + fPropertyList.Delete(); +} //------------------------------------------------------------------------------- const Reflex::Scope & Reflex::Namespace::GlobalScope() { diff --git a/cint/reflex/src/Namespace.h b/cint/reflex/src/Namespace.h index efb444673a488cb76731e39e8eae421fd3475d27..dea0c9854fbe0644d48e73a51a9462982cba73cc 100644 --- a/cint/reflex/src/Namespace.h +++ b/cint/reflex/src/Namespace.h @@ -38,7 +38,7 @@ namespace Reflex { /** destructor */ - virtual ~Namespace() {} + virtual ~Namespace(); /** @@ -53,12 +53,40 @@ namespace Reflex { */ static const Scope & GlobalScope(); + + /** + * Properties will return a pointer to the PropertyNth list attached + * to this item + * @return pointer to PropertyNth list + */ + virtual PropertyList Properties() const; + + private: /** constructor for initialisation of the global namespace */ Namespace(); + private: + /** + * pointer to the property list + * @label propertylist + * @link aggregationByValue + * @clientCardinality 1 + * @supplierCardinality 1 + */ + OwnedPropertyList fPropertyList; + }; // class Namespace } //namespace Reflex +//------------------------------------------------------------------------------- +inline Reflex::PropertyList +Reflex::Namespace::Properties() const { +//------------------------------------------------------------------------------- +// Retrieve the namespace's properties. + return fPropertyList; +} + + #endif // Reflex_Namespace diff --git a/cint/reflex/src/ScopeBase.cxx b/cint/reflex/src/ScopeBase.cxx index 6f089cd3690e18f2dc6c0465c11641e5fdd40953..ad6289f78408827d7ddb19fee878c23ba1129404 100644 --- a/cint/reflex/src/ScopeBase.cxx +++ b/cint/reflex/src/ScopeBase.cxx @@ -39,7 +39,6 @@ Reflex::ScopeBase::ScopeBase( const char * scope, TYPE scopeType ) : fScopeName( 0 ), fScopeType( scopeType ), - fPropertyList( OwnedPropertyList( new PropertyListImpl())), fBasePosition( Tools::GetBasePosition( scope )) { //------------------------------------------------------------------------------- // Construct the dictionary information for a scope. @@ -81,12 +80,11 @@ Reflex::ScopeBase::ScopeBase() : fScopeName( 0 ), fScopeType( NAMESPACE ), fDeclaringScope( Scope::__NIRVANA__() ), - fPropertyList( OwnedPropertyList( new PropertyListImpl()) ), fBasePosition( 0 ) { //------------------------------------------------------------------------------- // Default constructor for the ScopeBase (used at init time for the global scope) fScopeName = new ScopeName("", this); - fPropertyList.AddProperty("Description", "global namespace"); + PropertyList().AddProperty("Description", "global namespace"); } @@ -121,9 +119,6 @@ Reflex::ScopeBase::~ScopeBase( ) { if ( fDeclaringScope ) { fDeclaringScope.RemoveSubScope(ThisScope()); } - - fPropertyList.Delete(); - } @@ -484,7 +479,7 @@ const std::string& Reflex::ScopeBase::SimpleName( size_t & pos, Reflex::PropertyList Reflex::ScopeBase::Properties() const { //------------------------------------------------------------------------------- // Return property list attached to this scope. - return fPropertyList; + return Dummy::PropertyList(); } diff --git a/cint/reflex/src/ScopedType.h b/cint/reflex/src/ScopedType.h index c77474e2ec1e6db3b3aeef63ef752ff9fa42a331..d60288055ece91814ab8adb5fa2ddb17012e32e0 100644 --- a/cint/reflex/src/ScopedType.h +++ b/cint/reflex/src/ScopedType.h @@ -211,7 +211,7 @@ inline const std::string& Reflex::ScopedType::SimpleName(size_t & pos, inline Reflex::PropertyList Reflex::ScopedType::Properties() const { //------------------------------------------------------------------------------- - return ScopeBase::Properties(); + return TypeBase::Properties(); }