summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-04-26 19:46:35 +0000
committerKurt Zenker <kz@openoffice.org>2006-04-26 19:46:35 +0000
commitd0bf839903c2403f4e4d21f2c9c082bd586d1e07 (patch)
tree43657717984ead3e8f2c5a9ca68d4657520ed6ec
parentd94144e2ae06039232d1a56df4492d12af907074 (diff)
INTEGRATION: CWS taskpane (1.3.116); FILE MERGED
2006/02/22 09:36:57 af 1.3.116.2: #i61359# Fixed typo of last checkin. 2006/02/17 13:02:56 af 1.3.116.1: #i61359# Added shared_ptr variant of AddResource().
-rw-r--r--sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx
index 3e94695a85ca..9a12831d49dd 100644
--- a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx
+++ b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: SdGlobalResourceContainer.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 06:04:07 $
+ * last change: $Author: kz $ $Date: 2006-04-26 20:46:35 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -38,6 +38,7 @@
#include "sdmod.hxx"
#include <memory>
+#include <boost/shared_ptr.hpp>
namespace sd {
@@ -77,9 +78,19 @@ public:
/** Add a resource to the container. The ownership of the resource is
transferred to the container. The resource is destroyed when the
container is destroyed, i.e. when the sd module is destroyed.
+
+ When in doubt, use the shared_ptr variant of this method.
*/
void AddResource (::std::auto_ptr<SdGlobalResource> pResource);
+ /** Add a resource to the container. By using a shared_ptr and
+ releasing it only when the SgGlobalResourceContainer is destroyed
+ the given resource is kept alive at least that long. When at the
+ time of the destruction of SgGlobalResourceContainer no other
+ references exist the resource is destroyed as well.
+ */
+ void AddResource (::boost::shared_ptr<SdGlobalResource> pResource);
+
/** Tell the container that it is not any longer responsible for the
specified resource.
@return