[Common-cvs] include hxcomptr.h, 1.1, 1.2 hxdllaccess.h, 1.8, 1.9 hxsmartptr.h, 1.6, 1.7 hxtsmartpointer.h, 1.3, 1.4 ihxtlogcontextobserver.h, 1.3, 1.4 ihxtlogsystem.h, 1.18, 1.19 ihxtlogsystemcontext.h, 1.4, 1.5

[Common-cvs] include hxcomptr.h, 1.1, 1.2 hxdllaccess.h, 1.8, 1.9 hxsmartptr.h, 1.6, 1.7 hxtsmartpointer.h, 1.3, 1.4 ihxtlogcontextobserver.h, 1.3, 1.4 ihxtlogsystem.h, 1.18, 1.19 ihxtlogsystemcontext.h, 1.4, 1.5

ping at helixcommunity.org ping at helixcommunity.org
Fri Dec 2 10:46:15 PST 2005


Update of /cvsroot/common/include
In directory cvs:/tmp/cvs-serv22188

Modified Files:
	hxcomptr.h hxdllaccess.h hxsmartptr.h hxtsmartpointer.h 
	ihxtlogcontextobserver.h ihxtlogsystem.h 
	ihxtlogsystemcontext.h 
Log Message:
SmartPointer support cleanup

CR by EHyche & JeffL


Index: hxtsmartpointer.h
===================================================================
RCS file: /cvsroot/common/include/hxtsmartpointer.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hxtsmartpointer.h	9 Jul 2004 18:20:48 -0000	1.3
+++ hxtsmartpointer.h	2 Dec 2005 18:46:12 -0000	1.4
@@ -47,6 +47,10 @@
  * 
  * ***** END LICENSE BLOCK ***** */
 
+#if !defined(HELIX_FEATURE_ALLOW_DECPRECATED_SMARTPOINTERS)
+#error Deprecated SmartPointer header is included, please use common/include/hxcomptr.h instead.
+#endif
+
 #ifndef SMART_POINTER_H
 #define SMART_POINTER_H
 

Index: ihxtlogcontextobserver.h
===================================================================
RCS file: /cvsroot/common/include/ihxtlogcontextobserver.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ihxtlogcontextobserver.h	9 Jul 2004 18:20:48 -0000	1.3
+++ ihxtlogcontextobserver.h	2 Dec 2005 18:46:12 -0000	1.4
@@ -53,7 +53,6 @@
 #define _IHXTLOGCONTEXTOBSERVER_H
 
 #include "ihxtlogsystem.h"
-#include "hxtsmartpointer.h"
 
 /****************************************************************************
  *
@@ -83,6 +82,9 @@
 															const char* szContext, const char* szThreadName) PURE; 
 };
 
+#if defined(HELIX_FEATURE_ALLOW_DECPRECATED_SMARTPOINTERS)
+#include "hxtsmartpointer.h"
 HXT_MAKE_SMART_PTR(IHXTLogContextObserver)
+#endif
 
 #endif // _IHXTLOGCONTEXTOBSERVER_H

Index: hxsmartptr.h
===================================================================
RCS file: /cvsroot/common/include/hxsmartptr.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- hxsmartptr.h	14 Mar 2005 19:27:09 -0000	1.6
+++ hxsmartptr.h	2 Dec 2005 18:46:12 -0000	1.7
@@ -1,3 +1,5 @@
+#error This file is deprecated, please use common/include/hxcomptr.h instead.
+
 /* ***** BEGIN LICENSE BLOCK *****
  * Source last modified: $Id$
  * 

Index: ihxtlogsystemcontext.h
===================================================================
RCS file: /cvsroot/common/include/ihxtlogsystemcontext.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ihxtlogsystemcontext.h	14 Mar 2005 19:27:09 -0000	1.4
+++ ihxtlogsystemcontext.h	2 Dec 2005 18:46:12 -0000	1.5
@@ -52,10 +52,6 @@
 #ifndef _IHXTLOGSYSTEMCONTEXT_H
 #define _IHXTLOGSYSTEMCONTEXT_H
 
-//$ Private.
-#include "hxtsmartpointer.h"
-//$ EndPrivate.
-
 /****************************************************************************
  *
  *  Interface:
@@ -86,8 +82,9 @@
 	STDMETHOD(SetDefaultJobName) (THIS_ const char* szJobName) PURE;
 };
 
-//$ Private.
+#if defined(HELIX_FEATURE_ALLOW_DECPRECATED_SMARTPOINTERS)
+#include "hxtsmartpointer.h"
 HXT_MAKE_SMART_PTR(IHXTLogSystemContext)
-//$ EndPrivate.
+#endif
 
 #endif // _IHXTLOGSYSTEMCONTEXT_H

Index: hxcomptr.h
===================================================================
RCS file: /cvsroot/common/include/hxcomptr.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- hxcomptr.h	23 Nov 2005 21:46:43 -0000	1.1
+++ hxcomptr.h	2 Dec 2005 18:46:12 -0000	1.2
@@ -58,7 +58,473 @@
 
 #ifdef HELIX_CONFIG_MACROBASED_SMARTPOINTERS
 
-#include "hxsmartptr.h"
+/*!
+  @header hxsmartptr.h
+  
+  @abstract Macro implementation of smart pointers to COM interfaces
+            Based on pnmisc\pub\smartptr.h
+ 
+  @discussion
+ 	A SmartPointer is a class that contains a pointer, but acts like it 
+ 	<em>is</em> the contained pointer.  When used it helps enforce correct usage 
+ 	of the pointer it contains.  In this case it provides the following 
+ 	safeguards:<ul>
+ 	    <li>ASSERT if the contained pointer is NULL when you attempt to 
+ 		use it.
+ 	    <li>ASSERT if you attempt to replace a valid pointer without 
+ 		releasing it.
+ 	    <li>Automatically AddRef() a pointer during assignment.
+ 	    <li>Automatically QI() an incoming pointer to the correct type 
+ 		during assignment.
+ 	    <li>Automatically Release() an existing pointer during assignment.
+ 	    <li>Automatically Release() an existing pointer during destruction.
+       </ul>
+ 
+ 	SmartPointers also simplify usage. Example:
+ 
+    <pre><code>
+    HX_SMART_POINTER_INLINE( SPIHXBuffer, IHXBuffer );
+    ReadDone(HX_RESULT status, IUnknown* pbufData)
+    {
+        SPIHXBufferPtr spBufData = pbufData;
+        if(spBufData.IsValid())
+        {
+            cout << spBufData->GetBuffer() << endl;
+        }
+    }
+    </code></pre>
+ 	This example has no memory leaks.  In the Assignment the IUnknown 
+ 	pointer is QI'd for the IHXBuffer.  If the QI had failed, then 
+ 	the IsValid test would fail too.  Even if the IsValid Test was 
+ 	omitted, spbufData->GetBuffer() would cause an assertion if 
+ 	the QI had failed.
+ 
+   Usage Tips:
+ 	
+ 	Cannot use SmartPointers as List elements.
+ 
+   Note that there are specific macros for creating smart pointers to 
+   IUnknowns - plugging IUnknown into the standard smart pointer 
+   generation macros will cause compile errors.
+ 
+   The interface has been cut down to a minimum. In particular, the 
+   automatic conversion operators have been removed to avoid the 
+   possibility of unexpected conversions happening automatically. It 
+   is still possible to get to the raw pointer if it is necessary.
+ 
+ */
+
+/*!
+    @class SPIUnknown
+    @description A smart pointer to an IUnknown. This will always contain the unique IUnknown 
+      - i.e. it will QI any pointer passed to it (including IUnknown pointers) to make sure it gets 
+      the unique IUnknown.
+*/
+
+/*!
+    @class SPCIUnknown
+    @description A const smart pointer to an IUnknown. This will always contain the unique IUnknown 
+      - i.e. it will QI any pointer passed to it (including IUnknown pointers) to make sure it gets 
+      the unique IUnknown.
+*/
+
+/*!
+    @function CLASS_NAME()
+*/
+
+/*!
+    @function CLASS_NAME( const CLASS_NAME& rspact )
+*/
+
+/*!
+    @function CLASS_NAME(INTERFACE* pact)
+*/
+
+/*!
+    @function ~CLASS_NAME()
+*/
+
+/*!
+    @function CLASS_NAME(IHXCommonClassFactory* pIObjectSource, REFCLSID clsid, HX_RESULT* pResult = NULL )
+    @description Create an object from a factory and attempt to assign it 
+      to this smart pointer. If the created object supports the interface 
+      this smart pointer refers, the smart pointer will point to that object. 
+      If the created object does not support the interface, the smart pointer 
+      will end up as NULL and the created object will be immediately destroyed.
+    @param pIObjectSource The class factory to use
+    @param clsid The clsid of the object to create
+    @param pResult The result of the CreateInstance call - if this parameter 
+      is NULL the result will not be returned.
+*/
+
+/*!
+    @function INTERFACE* operator -> () const
+*/
+
+/*!
+    @function INTERFACE& operator * () const
+*/
+
+/*!
+    @function CLASS_NAME& operator =( const CLASS_NAME& rspact )
+*/
+
+/*!
+    @function CLASS_NAME& operator =( INTERFACE* pNew )
+*/
+
+/*!
+    @function HXBOOL IsValid() const
+*/
+
+/*!
+    @function INTERFACE* Ptr() const
+    @description Returns a non-addrefed version of the internal 
+      pointer. This is designed to be used as an easy way of 
+      passing the pointer to functions that take an unadorned 
+      pointer. If the pointer is assigned to a local variable, 
+      please bear in mind that it is not addrefed and should 
+      be treated accordingly. The best way to get an AddReffed 
+      pointer assigned to a local variable is to use the AsPtr 
+      method.
+*/
+
+/*!
+    @function AsPtr( INTERFACE*  ) const
+    @description Returns an addrefed version of the internal 
+      pointer. Onlu available on non-const smart pointers (if
+      this was available for a const smart pointer it would 
+      have to return a const pointer which then couldn't be 
+      released ).
+*/
+
+/*!
+    @function void AsUnknown( IUnknown** ppIUnknown ) const
+    @description Returns an addrefed version of the pointer as an 
+      IUnknown*.
+*/
+
+/*!
+     @function Query( IUnknown* pIUnk )
+     @description If possible, set the value of this smart pointer to the
+	given pointer. The value of this smart pointer will only be changed if the
+	supplied pointer is non-NULL and it supports the interface corresponding to
+	this smart pointer. If either of these conditions is not true the value of
+	the smart pointer will be unchanged.
+     @param pIUnk The pointer to try and assign to this.
+     @result There are three possible results:
+         1. If the pointer passed in was non-NULL and the object supported the
+	    appropriate interface, a SUCCEEDED result will be returned (corresponding
+	    to the result of the internal QI).
+         2. If the pointer passed in was non_NULL but the object did not 
+	    support the appropriate interface, a FAILED result will be returned 
+	    (corresponding to the result of the internal QI).
+         3. If the pointer passed in was NULL, HXR_INVALID_PARAMETER will be returned.
+*/
+
+/*!
+     @function Clear()
+     @description Releases the smart pointers reference to the underlying pointer and 
+       set the smart pointer to NULL.
+*/
+
+/*!
+     @function AsInOutParam()
+     @description Clears the smart pointer, then returns a pointer to the underlying 
+       pointer. This is suitable for passing to functions which pass back an AddReffed 
+       pointer as output. E.g.
+
+      void SomeFunction( IHXSomeInterface** ppOutput );
+
+      SPIHXSomeInterface spI;
+
+      SomeFunction( spi>AsInOutParam() );
+*/
+
+/*!
+    @defined HX_SMART_POINTER_INLINE
+    @abstract 
+	Declare a smart pointer of name CLASS_NAME which points to an 
+	interface INTERFACE. Inline definitions of all functions.
+*/
+#define HX_SMART_POINTER_INLINE( CLASS_NAME, INTERFACE )		\
+	HX_PRIVATE_SMART_POINTER_INLINE( CLASS_NAME, INTERFACE, HX_PRIVATE_BLANK, HX_PRIVATE_NON_IUNKNOWN_FUNCTIONS( CLASS_NAME, INTERFACE, HX_PRIVATE_BLANK ) )
+
+/*!
+    @defined HX_CONST_SMART_POINTER_INLINE
+    @abstract 
+	Declare a const smart pointer of name CLASS_NAME which points to an 
+	interface INTERFACE. Inline definitions of all functions.
+*/
+#define HX_CONST_SMART_POINTER_INLINE( CLASS_NAME, INTERFACE )		\
+	HX_PRIVATE_SMART_POINTER_INLINE( CLASS_NAME, INTERFACE, const, HX_PRIVATE_NON_IUNKNOWN_FUNCTIONS( CLASS_NAME, INTERFACE, const ) )
+
+/*!
+    @defined HX_IUNKNOWN_SMART_POINTER_INLINE
+    @abstract 
+	Declare a smart pointer of name CLASS_NAME which points to an 
+	IUnknown interface. Inline definitions of all functions.
+*/
+#define HX_IUNKNOWN_SMART_POINTER_INLINE( CLASS_NAME )		\
+	HX_PRIVATE_SMART_POINTER_INLINE( CLASS_NAME, IUnknown, HX_PRIVATE_BLANK, HX_PRIVATE_BLANK )
+
+/*!
+    @defined HX_IUNKNOWN_CONST_SMART_POINTER_INLINE
+    @abstract 
+	Declare a const smart pointer of name CLASS_NAME which points to an 
+	IUnknown interface. Inline definitions of all functions.
+*/
+#define HX_IUNKNOWN_CONST_SMART_POINTER_INLINE( CLASS_NAME )		\
+	HX_PRIVATE_SMART_POINTER_INLINE( CLASS_NAME, IUnknown, const, HX_PRIVATE_BLANK )
+
+
+
+
+// ---------------------------------------------------------------------
+// The macros below here should not be used directly. They might 
+// change in future implementations
+// ---------------------------------------------------------------------
+
+
+// The IUnknown functions macros have been included 
+// to reduce code duplication. If we just attempt to use the normal 
+// macros for creating an IUnknown smart pointer we end up with compile 
+// errors because the copy constructor and assignment ops are duplicated.
+// The HX_PRIVATE_NON_IUNKNOWN_FUNCTIONS macro separates out a copy 
+// constructor / assignment op that are needed in the non-IUnknown versions 
+// but would cause errors in the IUnknown versions.
+
+#define HX_PRIVATE_NON_IUNKNOWN_FUNCTIONS( CLASS_NAME, INTERFACE, QUALIFIERS )		\
+    CLASS_NAME(INTERFACE QUALIFIERS* pact)						\
+    : pActual(NULL)									\
+    {											\
+	if( pact )									\
+	{										\
+	    pActual = (INTERFACE*) pact;						\
+	    pActual->AddRef();								\
+	}										\
+    }											\
+    CLASS_NAME& operator =( INTERFACE QUALIFIERS* pNew )				\
+    {											\
+	if( pNew != pActual )								\
+	{										\
+	    INTERFACE* pTemp = pActual;							\
+	    pActual = (INTERFACE*) pNew;						\
+	    if( pActual )								\
+	    {										\
+		pActual->AddRef();							\
+	    }										\
+	    HX_RELEASE( pTemp );							\
+	}										\
+	return *this;									\
+    }											\
+
+
+#define HX_PRIVATE_SMART_POINTER_INLINE( CLASS_NAME, INTERFACE, QUALIFIERS, NON_IUNKNOWN_DEFINITIONS )	\
+											\
+class CLASS_NAME									\
+{											\
+public:											\
+    typedef INTERFACE* CLASS_NAME::*unspecified_bool_type;                              \
+    CLASS_NAME()									\
+	: pActual(NULL)									\
+    {}											\
+											\
+    CLASS_NAME( const CLASS_NAME& rspact )						\
+    : pActual(NULL)									\
+    {											\
+	if( rspact.pActual )								\
+	{										\
+	    pActual = rspact.pActual;							\
+	    pActual->AddRef();								\
+	}										\
+    }											\
+											\
+    CLASS_NAME(IUnknown QUALIFIERS* punk)						\
+    : pActual(NULL)									\
+    {											\
+        if(punk)									\
+	    ((IUnknown*) punk)->QueryInterface( IID_##INTERFACE, ( void** )( &pActual ) );		\
+    }											\
+    CLASS_NAME& operator =( IUnknown QUALIFIERS* punkNew )				\
+    {											\
+	if( punkNew != pActual )							\
+	{										\
+	    INTERFACE* pTemp = pActual;							\
+	    if(punkNew)									\
+	    {										\
+		((IUnknown*) punkNew)->QueryInterface( IID_##INTERFACE, ( void** )( &pActual ) );	\
+	    }										\
+	    else									\
+	    {										\
+		pActual = NULL;								\
+	    }										\
+	    HX_RELEASE( pTemp );							\
+	}										\
+	return *this;									\
+    }											\
+											\
+    CLASS_NAME( IHXCommonClassFactory* pIObjectSource, REFCLSID clsid, HX_RESULT* pResult = NULL ) \
+    : pActual(NULL)									\
+    {											\
+	HX_ASSERT(pIObjectSource);							\
+	IUnknown* pIUnk = NULL;								\
+	HX_RESULT result = pIObjectSource->CreateInstance( clsid, (void**)&pIUnk );	\
+	if (SUCCEEDED(result))								\
+	{										\
+	    HX_ASSERT(pIUnk);								\
+	    result = pIUnk->QueryInterface( IID_##INTERFACE, ( void** )( &pActual ) );	\
+	    pIUnk->Release();								\
+	}										\
+	if( pResult )									\
+	{										\
+	    *pResult = result;								\
+	}										\
+    }											\
+											\
+    NON_IUNKNOWN_DEFINITIONS								\
+											\
+    ~CLASS_NAME()									\
+    { HX_RELEASE (pActual); }								\
+											\
+    class INTERFACE##_InternalSP : public INTERFACE					\
+    {											\
+    private:										\
+	virtual ULONG32 STDMETHODCALLTYPE AddRef () PURE;				\
+	virtual ULONG32 STDMETHODCALLTYPE Release () PURE;				\
+    };											\
+											\
+    INTERFACE##_InternalSP QUALIFIERS* operator -> () const				\
+    {HX_ASSERT(pActual);return (INTERFACE##_InternalSP*) pActual;}			\
+											\
+    INTERFACE##_InternalSP QUALIFIERS& operator * () const				\
+    {HX_ASSERT(pActual);return *((INTERFACE##_InternalSP*) pActual);}			\
+											\
+    CLASS_NAME& operator =( const CLASS_NAME& rspact )					\
+    {*this = rspact.pActual; return *this;}						\
+											\
+											\
+										\
+    HX_RESULT Query(IUnknown QUALIFIERS* punkNew)					\
+    {											\
+	HX_RESULT result = HXR_INVALID_PARAMETER;					\
+	if( punkNew )									\
+	{										\
+	    result = HXR_OK;								\
+	    if( punkNew != pActual )							\
+	    {										\
+		INTERFACE* pTemp = NULL;						\
+		result = ((IUnknown*) punkNew)->QueryInterface( IID_##INTERFACE, ( void** )( &pTemp ) );	\
+		if( SUCCEEDED( result ) )						\
+		{									\
+		    HX_RELEASE( pActual );						\
+		    pActual = pTemp;							\
+		}									\
+	    }										\
+	}										\
+	return result;									\
+    }											\
+											\
+    HXBOOL IsValid() const								\
+    {return pActual!=NULL;}								\
+											\
+    INTERFACE** AsInOutParam () 							\
+    { HX_RELEASE (pActual); return &pActual; }						\
+											\
+    INTERFACE QUALIFIERS* Ptr() const							\
+    {return pActual;}									\
+											\
+    void AsPtr( INTERFACE QUALIFIERS** ppActual ) const					\
+    {											\
+	HX_ASSERT(pActual);								\
+	pActual->AddRef ();								\
+	*ppActual = pActual;								\
+    }											\
+											\
+    void AsUnknown( IUnknown QUALIFIERS** ppIUnknown ) const				\
+    {											\
+	HX_ASSERT(pActual);								\
+	pActual->QueryInterface								\
+	(										\
+	    IID_IUnknown,								\
+	    ( void** )ppIUnknown							\
+	);										\
+    }											\
+											\
+    void Clear ()									\
+    { HX_RELEASE (pActual); }								\
+											\
+    /* implicit conversion to "bool" */                                                 \ 
+    /* operator! is redundant, but some compilers need it */                            \ 
+    inline operator unspecified_bool_type() const                                       \ 
+    {                                                                                   \ 
+        return (pActual == 0 ? 0 : &CLASS_NAME::pActual);                               \ 
+    }                                                                                   \ 
+    inline bool operator! () const                                                      \ 
+    {                                                                                   \ 
+        return (pActual == 0);                                                          \ 
+    }											\
+private:										\
+    INTERFACE*	    pActual;								\
+}
+
+#define HX_PRIVATE_BLANK
+
+HX_IUNKNOWN_SMART_POINTER_INLINE( SPIUnknown );
+HX_IUNKNOWN_CONST_SMART_POINTER_INLINE( SPCIUnknown );
+
+// Since we are guaranteed that SPIUnknown and SPCIUnknown will be storing 
+// the unique IUnknown pointer we can just compare the results of the Ptr function.
+
+inline HXBOOL operator ==( const SPIUnknown& sp1, const SPIUnknown& sp2 )
+{
+    return sp1.Ptr() == sp2.Ptr();
+}
+
+inline HXBOOL operator ==( const SPCIUnknown& spc1, const SPCIUnknown& spc2 )
+{
+    return spc1.Ptr() == spc2.Ptr();
+}
+
+/* These cannot be activated without letting everybody know. Some code might
+ fail to compile: 
+ 	IRCAClickable* p = 0;
+ 	if (p == SPIUnknown(p))  //is ambigous
+ 	{ ... }
+ 	
+ 	
+inline HXBOOL operator ==( const SPIUnknown& sp1, const SPCIUnknown& spc2 )
+{
+    return sp1.Ptr() == spc2.Ptr();
+}
+
+inline HXBOOL operator ==( const SPCIUnknown& spc1, const SPIUnknown& sp2 )
+{
+    return spc1.Ptr() == sp2.Ptr();
+}
+*/
+
+inline HXBOOL operator !=( const SPIUnknown& sp1, const SPIUnknown& sp2 )
+{
+    return ! ( sp1 == sp2 );
+}
+
+inline HXBOOL operator !=( const SPCIUnknown& spc1, const SPCIUnknown& spc2 )
+{
+    return ! ( spc1 == spc2 );
+}
+
+/*
+inline HXBOOL operator !=( const SPIUnknown& sp1, const SPCIUnknown& spc2 )
+{
+    return ! ( sp1 == spc2 );
+}
+
+inline HXBOOL operator !=( const SPCIUnknown& spc1, const SPIUnknown& sp2 )
+{
+    return ! ( spc1 == sp2 );
+}
+*/
 
 #else  // HELIX_CONFIG_MACROBASED_SMARTPOINTERS
 

Index: ihxtlogsystem.h
===================================================================
RCS file: /cvsroot/common/include/ihxtlogsystem.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- ihxtlogsystem.h	4 Oct 2005 22:42:24 -0000	1.18
+++ ihxtlogsystem.h	2 Dec 2005 18:46:12 -0000	1.19
@@ -228,8 +228,6 @@
     {0,          NULL}  // This entry should ALWAYS remain the last entry
 };
 
-#include "hxtsmartpointer.h"
-
 /****************************************************************************
  *
  *  Interface:
@@ -312,8 +310,6 @@
                 const char*             /*IN*/                  szJobName) PURE; 
 };
 
-HXT_MAKE_SMART_PTR(IHXTLogObserver)
-
 
 /****************************************************************************
  *
@@ -354,9 +350,6 @@
     STDMETHOD(Flush)() PURE;
 };
 
-HXT_MAKE_SMART_PTR(IHXTLogObserver2)
-
-
 
 /****************************************************************************
  *
@@ -438,8 +431,6 @@
                 const char**                    /*OUT*/                 ppszName) PURE;
 };
 
-HXT_MAKE_SMART_PTR(IHXTFuncAreaEnum)
-
 
 /****************************************************************************
  *
@@ -561,10 +552,6 @@
                 IUnknown*                               /*IN*/                  pObserver) PURE;
 };
 
-//$ Private.
-HXT_MAKE_SMART_PTR(IHXTLogObserverManager)
-//$ EndPrivate.
-
 
 /****************************************************************************
  *
@@ -603,7 +590,6 @@
         STDMETHOD(FlushObservers) (THIS) PURE;
 };
 
-HXT_MAKE_SMART_PTR(IHXTLogObserverManager2)
 
 /****************************************************************************
  *
@@ -697,8 +683,6 @@
 
 };
 
-HXT_MAKE_SMART_PTR(IHXTLogWriter)
-
 
 // {E7ADC1B7-7B6E-4e54-9878-AA810ECC6DE6}
 DEFINE_GUID(IID_IHXTInternalLogWriter, 
@@ -758,8 +742,6 @@
         STDMETHOD_(HXBOOL, IsEnabled)(THIS) PURE;
 };
 
-HXT_MAKE_SMART_PTR(IHXTInternalLogWriter)
-
 
 /****************************************************************************
  *
@@ -885,6 +867,16 @@
  */
 typedef HX_RESULT (STDAPICALLTYPE *FPRMAGETLOGSYSTEMINTERFACE)(IHXTLogSystem** ppLogSystem);
 
+#if defined(HELIX_FEATURE_ALLOW_DECPRECATED_SMARTPOINTERS)
+#include "hxtsmartpointer.h"
+HXT_MAKE_SMART_PTR(IHXTLogObserver)
+HXT_MAKE_SMART_PTR(IHXTLogObserver2)
+HXT_MAKE_SMART_PTR(IHXTFuncAreaEnum)
+HXT_MAKE_SMART_PTR(IHXTLogObserverManager)
+HXT_MAKE_SMART_PTR(IHXTLogObserverManager2)
+HXT_MAKE_SMART_PTR(IHXTLogWriter)
+HXT_MAKE_SMART_PTR(IHXTInternalLogWriter)
 HXT_MAKE_SMART_PTR(IHXTLogSystem)
+#endif
 
 #endif /* #ifndef IHXTLOGSYSTEM_H */

Index: hxdllaccess.h
===================================================================
RCS file: /cvsroot/common/include/hxdllaccess.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- hxdllaccess.h	14 Mar 2005 19:27:09 -0000	1.8
+++ hxdllaccess.h	2 Dec 2005 18:46:12 -0000	1.9
@@ -189,10 +189,9 @@
     STDMETHOD_(HXBOOL,IsOpen)	(THIS) PURE;
 };
 
-//$ Private.
+#if defined(HELIX_FEATURE_ALLOW_DECPRECATED_SMARTPOINTERS)
 #include "hxtsmartpointer.h"
-
 HXT_MAKE_SMART_PTR(IHXDllAccess)
-//$ EndPrivate.
+#endif
 
 #endif  // _HXDLLACCESS_H_




More information about the Common-cvs mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.