summaryrefslogtreecommitdiff
path: root/o3tl/qa/cow_wrapper_clients.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'o3tl/qa/cow_wrapper_clients.hxx')
-rw-r--r--o3tl/qa/cow_wrapper_clients.hxx33
1 files changed, 31 insertions, 2 deletions
diff --git a/o3tl/qa/cow_wrapper_clients.hxx b/o3tl/qa/cow_wrapper_clients.hxx
index 49a9cb5023d5..013414d477ec 100644
--- a/o3tl/qa/cow_wrapper_clients.hxx
+++ b/o3tl/qa/cow_wrapper_clients.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cow_wrapper_clients.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: thb $ $Date: 2006-01-25 16:17:38 $
+ * last change: $Author: thb $ $Date: 2006-03-23 15:25:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -128,6 +128,35 @@ private:
o3tl::cow_wrapper< cow_wrapper_client2_impl > maImpl;
};
+/** test MT-safe cow_wrapper - basically the same as
+ cow_wrapper_client2, only with different refcounting policy
+ */
+class cow_wrapper_client3
+{
+public:
+ cow_wrapper_client3();
+ explicit cow_wrapper_client3( int nVal );
+ ~cow_wrapper_client3();
+
+ cow_wrapper_client3( const cow_wrapper_client3& );
+ cow_wrapper_client3& operator=( const cow_wrapper_client3& );
+
+ void modify( int nVal );
+ int queryUnmodified() const;
+
+ void makeUnique();
+ bool is_unique() const;
+ oslInterlockedCount use_count() const;
+ void swap( cow_wrapper_client3& r );
+
+ bool operator==( const cow_wrapper_client3& rRHS ) const;
+ bool operator!=( const cow_wrapper_client3& rRHS ) const;
+ bool operator<( const cow_wrapper_client3& rRHS ) const;
+
+private:
+ o3tl::cow_wrapper< cow_wrapper_client2_impl, o3tl::ThreadSafeRefCountingPolicy > maImpl;
+};
+
} // namespace o3tltests
#endif /* INCLUDED_COW_WRAPPER_CLIENTS_HXX */