Have add new osg::CopyOp which replaces last nights osg::Cloner, the new
class now combines Cloner and DeepCopy into one class. Cloner and DeepCopy will be removed in next commit. Also have added osgcopy app to Demos which shows how the CopyOp have be subclassed to create users own specific handling of copying. Have fixed copy constructor problems in GeoSet which fix the deep copy problem experienced yesterday.
This commit is contained in:
@@ -6,10 +6,13 @@
|
||||
#define OSG_OBJECT 1
|
||||
|
||||
#include <osg/Referenced>
|
||||
#include <osg/ShallowCopy>
|
||||
#include <osg/CopyOp>
|
||||
|
||||
namespace osg {
|
||||
|
||||
typedef CopyOp Cloner;
|
||||
typedef CopyOp ShallowCopy;
|
||||
|
||||
/** META_Object macro define the standard clone, isSameKindAs and className methods.
|
||||
* Use when subclassing from Object to make it more convinient to define
|
||||
* the standard pure virtual clone, isSameKindAs and className methods
|
||||
@@ -38,7 +41,7 @@ class SG_EXPORT Object : public Referenced
|
||||
|
||||
/** Copy constructor, optional Cloner object can be used to control
|
||||
* shallow vs deep copying of dynamic data.*/
|
||||
Object(const Object&,const Cloner& cloner=ShallowCopy());
|
||||
Object(const Object&,const Cloner& cloner=CopyOp::SHALLOW_COPY);
|
||||
|
||||
/** Clone the type of an object, with Object* return type.
|
||||
Must be defined by derived classes.*/
|
||||
|
||||
Reference in New Issue
Block a user