INTEGRATION: CWS cowfixes01 (1.10.20); FILE MERGED
2006/03/21 13:36:26 thb 1.10.20.2: #i63310# Removed silly self-referentiality for the static default objects (causing infinite loops) 2006/03/17 23:16:35 thb 1.10.20.1: #i63310# Moved BxD(Poly)Polygon to cow_wrapper; added makeUnique() to all classes using COW internally (to at least facilitate deliberate unsharing in multi-threaded uses)
This commit is contained in:
parent
77ad33de69
commit
3c0dbd7fd8
1 changed files with 13 additions and 7 deletions
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: b2dpolygon.hxx,v $
|
||||
*
|
||||
* $Revision: 1.10 $
|
||||
* $Revision: 1.11 $
|
||||
*
|
||||
* last change: $Author: rt $ $Date: 2005-09-07 20:27:45 $
|
||||
* last change: $Author: obo $ $Date: 2006-07-13 09:54:38 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -40,6 +40,10 @@
|
|||
#include <sal/types.h>
|
||||
#endif
|
||||
|
||||
#ifndef INCLUDED_O3TL_COW_WRAPPER_HXX
|
||||
#include <o3tl/cow_wrapper.hxx>
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// predeclarations
|
||||
class ImplB2DPolygon;
|
||||
|
@ -58,13 +62,12 @@ namespace basegfx
|
|||
{
|
||||
class B2DPolygon
|
||||
{
|
||||
public:
|
||||
typedef o3tl::cow_wrapper< ImplB2DPolygon > ImplType;
|
||||
|
||||
private:
|
||||
// internal data.
|
||||
ImplB2DPolygon* mpPolygon;
|
||||
|
||||
// internal method to force a ref-counted instance to be copied
|
||||
// to a modifyable unique copy.
|
||||
void implForceUniqueCopy();
|
||||
ImplType mpPolygon;
|
||||
|
||||
public:
|
||||
B2DPolygon();
|
||||
|
@ -75,6 +78,9 @@ namespace basegfx
|
|||
// assignment operator
|
||||
B2DPolygon& operator=(const B2DPolygon& rPolygon);
|
||||
|
||||
/// unshare this polygon with all internally shared instances
|
||||
void makeUnique();
|
||||
|
||||
// compare operators
|
||||
bool operator==(const B2DPolygon& rPolygon) const;
|
||||
bool operator!=(const B2DPolygon& rPolygon) const;
|
||||
|
|
Loading…
Reference in a new issue