From: <sv...@ww...> - 2004-06-13 03:02:10
|
Author: mkrose Date: 2004-06-12 20:02:03 -0700 (Sat, 12 Jun 2004) New Revision: 1028 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Ref.h Log: Disallow copying for Referenced subclasses. Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-06-13 02:59:08 UTC (rev 1027) +++ trunk/CSP/SimData/CHANGES.current 2004-06-13 03:02:03 UTC (rev 1028) @@ -13,6 +13,9 @@ * Added tagged record compiler and associated header. + * Disallowed copying of Referenced derived classes (should always + use Ref<> pointers). + 2004-16-12: wolverine * added a MemoryWriter class to write out a SimData object to a binary memory buffer. Added a MemoryReader class. Added Modified: trunk/CSP/SimData/Include/SimData/Ref.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Ref.h 2004-06-13 02:59:08 UTC (rev 1027) +++ trunk/CSP/SimData/Include/SimData/Ref.h 2004-06-13 03:02:03 UTC (rev 1028) @@ -90,6 +90,11 @@ } inline unsigned _count() const { return __count; } mutable unsigned __count; + + // Referenced objects should never be copied; always allocate them on the + // heap and use Ref<> smart-pointers to refer to them. + Referenced const & operator=(Referenced const &); + Referenced(Referenced const &); }; |