diff --git a/Make/makedefs.linux b/Make/makedefs.linux index 221ab8610..523ada4d0 100644 --- a/Make/makedefs.linux +++ b/Make/makedefs.linux @@ -10,16 +10,16 @@ C++ = g++ YFLAGS = -d LCINCS += -I/usr/X11R6/include LC++INCS += ${LCINCS} -#CFLAGS = -O2 -W -Wall $(LCINCS) -CFLAGS = -g -W -Wall $(LCINCS) +CFLAGS = -O2 -W -Wall $(LCINCS) +#CFLAGS = -g -W -Wall $(LCINCS) C++FLAGS = ${CFLAGS} CPPFLAGS = ${CFLAGS} SO_EXT = so DL_EXT = so -#LDFLAGS = -O2 -W -Wall -L/usr/X11R6/lib -LDFLAGS = -g -W -Wall -L/usr/X11R6/lib +LDFLAGS = -O2 -W -Wall -L/usr/X11R6/lib +#LDFLAGS = -g -W -Wall -L/usr/X11R6/lib LINKERARGS = -Xlinker DYNAMICLIBRARYLIB = -ldl diff --git a/include/osg/AlphaFunc b/include/osg/AlphaFunc index 5febf589f..c1a7cc640 100644 --- a/include/osg/AlphaFunc +++ b/include/osg/AlphaFunc @@ -19,9 +19,9 @@ class SG_EXPORT AlphaFunc : public StateAttribute AlphaFunc(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - AlphaFunc(const AlphaFunc& af,const Cloner& cloner=ShallowCopy()): - StateAttribute(af,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + AlphaFunc(const AlphaFunc& af,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(af,copyop), _comparisonFunc(af._comparisonFunc), _referenceValue(af._referenceValue) {} diff --git a/include/osg/Billboard b/include/osg/Billboard index 6444b856d..551ac011e 100644 --- a/include/osg/Billboard +++ b/include/osg/Billboard @@ -25,8 +25,8 @@ class SG_EXPORT Billboard : public Geode Billboard(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Billboard(const Billboard&,const Cloner& cloner=ShallowCopy()); + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Billboard(const Billboard&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); META_Node(Billboard); diff --git a/include/osg/ClipPlane b/include/osg/ClipPlane index ef1451227..00f0ee0dc 100644 --- a/include/osg/ClipPlane +++ b/include/osg/ClipPlane @@ -18,9 +18,9 @@ class SG_EXPORT ClipPlane : public StateAttribute ClipPlane(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - ClipPlane(const ClipPlane& cp,const Cloner& cloner=ShallowCopy()): - StateAttribute(cp,cloner) + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + ClipPlane(const ClipPlane& cp,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(cp,copyop) { _clipPlane[0]=cp._clipPlane[0]; _clipPlane[1]=cp._clipPlane[1]; diff --git a/include/osg/ColorMask b/include/osg/ColorMask index 98e005e77..1a41dd0ef 100644 --- a/include/osg/ColorMask +++ b/include/osg/ColorMask @@ -20,9 +20,9 @@ class SG_EXPORT ColorMask : public StateAttribute ColorMask(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - ColorMask(const ColorMask& cm,const Cloner& cloner=ShallowCopy()): - StateAttribute(cm,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + ColorMask(const ColorMask& cm,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(cm,copyop), _red(cm._red), _green(cm._green), _blue(cm._blue), diff --git a/include/osg/ColorMatrix b/include/osg/ColorMatrix index ff617bb70..06cdec0f6 100644 --- a/include/osg/ColorMatrix +++ b/include/osg/ColorMatrix @@ -17,9 +17,9 @@ class SG_EXPORT ColorMatrix : public StateAttribute ColorMatrix(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - ColorMatrix(const ColorMatrix& cm,const Cloner& cloner=ShallowCopy()): - StateAttribute(cm,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + ColorMatrix(const ColorMatrix& cm,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(cm,copyop), _matrix(cm._matrix) {} META_StateAttribute(ColorMatrix, COLORMATRIX); diff --git a/include/osg/CullFace b/include/osg/CullFace index 9b637d01b..7c2ac1293 100644 --- a/include/osg/CullFace +++ b/include/osg/CullFace @@ -19,9 +19,9 @@ class SG_EXPORT CullFace : public StateAttribute CullFace(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - CullFace(const CullFace& cf,const Cloner& cloner=ShallowCopy()): - StateAttribute(cf,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + CullFace(const CullFace& cf,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(cf,copyop), _mode(cf._mode) {} META_StateAttribute(CullFace, CULLFACE); diff --git a/include/osg/DeepCopy b/include/osg/DeepCopy index d5b535cff..a5532bc33 100644 --- a/include/osg/DeepCopy +++ b/include/osg/DeepCopy @@ -12,10 +12,10 @@ namespace osg { -/** Cloner Functor used to control the whether shallow or deep copy is used - * during copy construction and clone operation. The base Cloner acts as +/** CopyOp Functor used to control the whether shallow or deep copy is used + * during copy construction and clone operation. The base CopyOp acts as * a shallow copy simply passing back the same pointer as passed in.*/ -struct DeepCopy : public Cloner +struct DeepCopy : public CopyOp { enum CopyOptions diff --git a/include/osg/Depth b/include/osg/Depth index d67ff55ed..d946cb924 100644 --- a/include/osg/Depth +++ b/include/osg/Depth @@ -20,9 +20,9 @@ class SG_EXPORT Depth : public StateAttribute Depth(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Depth(const Depth& dp,const Cloner& cloner=ShallowCopy()): - StateAttribute(dp,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Depth(const Depth& dp,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(dp,copyop), _func(dp._func), _depthWriteMask(dp._depthWriteMask), _zNear(dp._zNear), diff --git a/include/osg/Drawable b/include/osg/Drawable index 9e6bdae46..01d12cdc2 100644 --- a/include/osg/Drawable +++ b/include/osg/Drawable @@ -55,10 +55,10 @@ class SG_EXPORT Drawable : public Object Drawable(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Drawable(const Drawable& drawable,const Cloner& cloner=ShallowCopy()): - Object(drawable,cloner), - _dstate(cloner(drawable._dstate.get())), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Drawable(const Drawable& drawable,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + Object(drawable,copyop), + _dstate(copyop(drawable._dstate.get())), _supportsDisplayList(drawable._supportsDisplayList), _useDisplayList(drawable._useDisplayList), _globjList(drawable._globjList), diff --git a/include/osg/EarthSky b/include/osg/EarthSky index 38af2727e..d9c0ce2dd 100644 --- a/include/osg/EarthSky +++ b/include/osg/EarthSky @@ -26,8 +26,8 @@ class SG_EXPORT EarthSky : public Group EarthSky(); - EarthSky(const EarthSky& es, const Cloner& cloner=ShallowCopy()): - Group(es,cloner), + EarthSky(const EarthSky& es, const CopyOp& copyop=CopyOp::SHALLOW_COPY): + Group(es,copyop), _requiresClear(es._requiresClear), _clearColor(es._clearColor) {} diff --git a/include/osg/Fog b/include/osg/Fog index afbceb43c..dd31f4bf9 100644 --- a/include/osg/Fog +++ b/include/osg/Fog @@ -20,9 +20,9 @@ class SG_EXPORT Fog : public StateAttribute Fog(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Fog(const Fog& fog,const Cloner& cloner=ShallowCopy()): - StateAttribute(fog,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Fog(const Fog& fog,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(fog,copyop), _mode(fog._mode), _density(fog._density), _start(fog._start), diff --git a/include/osg/FrontFace b/include/osg/FrontFace index 21c88bf17..721df3639 100644 --- a/include/osg/FrontFace +++ b/include/osg/FrontFace @@ -18,9 +18,9 @@ class SG_EXPORT FrontFace : public StateAttribute FrontFace(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - FrontFace(const FrontFace& ff,const Cloner& cloner=ShallowCopy()): - StateAttribute(ff,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + FrontFace(const FrontFace& ff,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(ff,copyop), _mode(ff._mode) {} META_StateAttribute(FrontFace, FRONTFACE); diff --git a/include/osg/GeoSet b/include/osg/GeoSet index 78badea32..c44767afd 100644 --- a/include/osg/GeoSet +++ b/include/osg/GeoSet @@ -147,12 +147,12 @@ class SG_EXPORT GeoSet : public Drawable GeoSet(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - GeoSet(const GeoSet& geoset,const Cloner& cloner=ShallowCopy()); + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + GeoSet(const GeoSet& geoset,const CopyOp& copyop=CopyOp::SHALLOW_COPY); virtual Object* cloneType() const { return new GeoSet(); } - virtual Object* clone(const Cloner& cloner) const { return new GeoSet(*this,cloner); } + virtual Object* clone(const CopyOp& copyop) const { return new GeoSet(*this,copyop); } virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } diff --git a/include/osg/Geode b/include/osg/Geode index cf7f196c0..131f39217 100644 --- a/include/osg/Geode +++ b/include/osg/Geode @@ -20,8 +20,8 @@ class SG_EXPORT Geode : public Node Geode(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Geode(const Geode&,const Cloner& cloner=ShallowCopy()); + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Geode(const Geode&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); META_Node(Geode); diff --git a/include/osg/Group b/include/osg/Group index 49368ae08..de3e28e1d 100644 --- a/include/osg/Group +++ b/include/osg/Group @@ -22,8 +22,8 @@ class SG_EXPORT Group : public Node Group(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Group(const Group&,const Cloner& cloner=ShallowCopy()); + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Group(const Group&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); META_Node(Group); diff --git a/include/osg/Image b/include/osg/Image index e4e805e73..ea7d5223a 100644 --- a/include/osg/Image +++ b/include/osg/Image @@ -21,11 +21,11 @@ class SG_EXPORT Image : public Object Image(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Image(const Image& image,const Cloner& cloner=ShallowCopy()); + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Image(const Image& image,const CopyOp& copyop=CopyOp::SHALLOW_COPY); virtual Object* cloneType() const { return new Image(); } - virtual Object* clone(const Cloner& cloner) const { return new Image(*this,cloner); } + virtual Object* clone(const CopyOp& copyop) const { return new Image(*this,copyop); } virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=0; } virtual const char* className() const { return "Image"; } diff --git a/include/osg/Impostor b/include/osg/Impostor index 5e9ee235e..2cb955f4e 100644 --- a/include/osg/Impostor +++ b/include/osg/Impostor @@ -53,8 +53,8 @@ class SG_EXPORT Impostor : public LOD public : Impostor(); - Impostor(const Impostor& es, const Cloner& cloner=ShallowCopy()): - LOD(es,cloner), + Impostor(const Impostor& es, const CopyOp& copyop=CopyOp::SHALLOW_COPY): + LOD(es,copyop), _impostorSpriteList(), _impostorThreshold(es._impostorThreshold) {} diff --git a/include/osg/ImpostorSprite b/include/osg/ImpostorSprite index 2fecde36b..fe807fb24 100644 --- a/include/osg/ImpostorSprite +++ b/include/osg/ImpostorSprite @@ -36,7 +36,7 @@ class SG_EXPORT ImpostorSprite : public Drawable /** Clone on ImpostorSprite just returns a clone of type, * since it is not appropriate to share data of an ImpostorSprite.*/ - virtual Object* clone(const Cloner&) const { return new ImpostorSprite(); } + virtual Object* clone(const CopyOp&) const { return new ImpostorSprite(); } virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } virtual const char* className() const { return "ImpostorSprite"; } diff --git a/include/osg/LOD b/include/osg/LOD index e258bf55c..182018d93 100644 --- a/include/osg/LOD +++ b/include/osg/LOD @@ -29,8 +29,8 @@ class SG_EXPORT LOD : public Group LOD() {} - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - LOD(const LOD&,const Cloner& cloner=ShallowCopy()); + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + LOD(const LOD&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); META_Node(LOD); diff --git a/include/osg/Light b/include/osg/Light index bec6ee195..7075510d1 100644 --- a/include/osg/Light +++ b/include/osg/Light @@ -19,9 +19,9 @@ class SG_EXPORT Light : public StateAttribute Light(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Light(const Light& light,const Cloner& cloner=ShallowCopy()): - StateAttribute(light,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Light(const Light& light,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(light,copyop), _lightnum(light._lightnum), _ambient(light._ambient), _diffuse(light._diffuse), diff --git a/include/osg/LightSource b/include/osg/LightSource index dd012f18d..4bbd90ea9 100644 --- a/include/osg/LightSource +++ b/include/osg/LightSource @@ -18,9 +18,9 @@ class SG_EXPORT LightSource : public Node LightSource(); - LightSource(const LightSource& es, const Cloner& cloner=ShallowCopy()): - Node(es,cloner), - _light(dynamic_cast(cloner(es._light.get()))) {} + LightSource(const LightSource& es, const CopyOp& copyop=CopyOp::SHALLOW_COPY): + Node(es,copyop), + _light(dynamic_cast(copyop(es._light.get()))) {} META_Node(LightSource); diff --git a/include/osg/LineWidth b/include/osg/LineWidth index 02c30f5a4..a60e0523c 100644 --- a/include/osg/LineWidth +++ b/include/osg/LineWidth @@ -17,9 +17,9 @@ class SG_EXPORT LineWidth : public StateAttribute LineWidth(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - LineWidth(const LineWidth& lw,const Cloner& cloner=ShallowCopy()): - StateAttribute(lw,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + LineWidth(const LineWidth& lw,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(lw,copyop), _width(lw._width) {} META_StateAttribute(LineWidth, LINEWIDTH); diff --git a/include/osg/Material b/include/osg/Material index 49a674073..86001a15a 100644 --- a/include/osg/Material +++ b/include/osg/Material @@ -19,9 +19,9 @@ class SG_EXPORT Material : public StateAttribute Material(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Material(const Material& mat,const Cloner& cloner=ShallowCopy()): - StateAttribute(mat,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Material(const Material& mat,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(mat,copyop), _colorMode(mat._colorMode), _ambientFrontAndBack(mat._ambientFrontAndBack), _ambientFront(mat._ambientFront), diff --git a/include/osg/Matrix b/include/osg/Matrix index 6d34937ed..e7bac75d4 100644 --- a/include/osg/Matrix +++ b/include/osg/Matrix @@ -29,7 +29,7 @@ class SG_EXPORT Matrix : public Object float a30, float a31, float a32, float a33); virtual Object* cloneType() const { return new Matrix(); } \ - virtual Object* clone(const Cloner&) const { return new Matrix(*this); } \ + virtual Object* clone(const CopyOp&) const { return new Matrix(*this); } \ virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } \ virtual const char* className() const { return "Matrix"; } diff --git a/include/osg/Node b/include/osg/Node index 1fd4b9741..1bd9c8f51 100644 --- a/include/osg/Node +++ b/include/osg/Node @@ -24,7 +24,7 @@ class Group; * more convinient to define the required pure virtual methods.*/ #define META_Node(name) \ virtual osg::Object* cloneType() const { return new name (); } \ - virtual osg::Object* clone(const osg::Cloner& cloner) const { return new name (*this,cloner); } \ + virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \ virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } \ virtual const char* className() const { return #name; } \ virtual void accept(osg::NodeVisitor& nv) { if (nv.validNodeMask(*this)) nv.apply(*this); } \ @@ -42,14 +42,14 @@ class SG_EXPORT Node : public Object bounding sphere dirty flag to true.*/ Node(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Node(const Node&,const Cloner& cloner=ShallowCopy()); + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Node(const Node&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); /** clone the an object of the same type as the node.*/ virtual Object* cloneType() const { return new Node(); } /** return a clone of a node, with Object* return type.*/ - virtual Object* clone(const Cloner& cloner) const { return new Node(*this,cloner); } + virtual Object* clone(const CopyOp& copyop) const { return new Node(*this,copyop); } /** return true if this and obj are of the same kind of object.*/ virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } diff --git a/include/osg/Object b/include/osg/Object index a1191f969..a409034eb 100644 --- a/include/osg/Object +++ b/include/osg/Object @@ -10,16 +10,13 @@ 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 * which are required for all Object subclasses.*/ #define META_Object(T) \ virtual osg::Object* cloneType() const { return new T (); } \ - virtual osg::Object* clone(const osg::Cloner& cloner) const { return new T (*this,cloner); } \ + virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new T (*this,copyop); } \ virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } \ virtual const char* className() const { return #T; } @@ -39,9 +36,9 @@ class SG_EXPORT Object : public Referenced concrete classes and can be constructed.*/ Object() {} - /** Copy constructor, optional Cloner object can be used to control + /** Copy constructor, optional CopyOp object can be used to control * shallow vs deep copying of dynamic data.*/ - Object(const Object&,const Cloner& cloner=CopyOp::SHALLOW_COPY); + Object(const Object&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); /** Clone the type of an object, with Object* return type. Must be defined by derived classes.*/ @@ -49,7 +46,7 @@ class SG_EXPORT Object : public Referenced /** Clone the an object, with Object* return type. Must be defined by derived classes.*/ - virtual Object* clone(const Cloner&) const = 0; + virtual Object* clone(const CopyOp&) const = 0; virtual bool isSameKindAs(const Object*) const { return true; } diff --git a/include/osg/Point b/include/osg/Point index b60cb5fe8..98d739d1d 100644 --- a/include/osg/Point +++ b/include/osg/Point @@ -18,9 +18,9 @@ class SG_EXPORT Point : public StateAttribute Point(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Point(const Point& point,const Cloner& cloner=ShallowCopy()): - StateAttribute(point,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Point(const Point& point,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(point,copyop), _size(point._size), _fadeThresholdSize(point._fadeThresholdSize), _distanceAttenuation(point._distanceAttenuation) {} diff --git a/include/osg/PolygonMode b/include/osg/PolygonMode index 293a93f06..858a044f6 100644 --- a/include/osg/PolygonMode +++ b/include/osg/PolygonMode @@ -18,9 +18,9 @@ class SG_EXPORT PolygonMode : public StateAttribute PolygonMode(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - PolygonMode(const PolygonMode& pm,const Cloner& cloner=ShallowCopy()): - StateAttribute(pm,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + PolygonMode(const PolygonMode& pm,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(pm,copyop), _frontAndBack(pm._frontAndBack), _modeFront(pm._modeFront), _modeBack(pm._modeBack) {} diff --git a/include/osg/PolygonOffset b/include/osg/PolygonOffset index d13b38b90..31f5ca521 100644 --- a/include/osg/PolygonOffset +++ b/include/osg/PolygonOffset @@ -17,9 +17,9 @@ class SG_EXPORT PolygonOffset : public StateAttribute PolygonOffset(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - PolygonOffset(const PolygonOffset& po,const Cloner& cloner=ShallowCopy()): - StateAttribute(po,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + PolygonOffset(const PolygonOffset& po,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(po,copyop), _factor(po._factor), _units(po._units) {} diff --git a/include/osg/PositionAttitudeTransform b/include/osg/PositionAttitudeTransform index 4eb9ce35f..7b96fe041 100644 --- a/include/osg/PositionAttitudeTransform +++ b/include/osg/PositionAttitudeTransform @@ -19,8 +19,8 @@ class SG_EXPORT PositionAttitudeTransform : public Transform public : PositionAttitudeTransform(); - PositionAttitudeTransform(const PositionAttitudeTransform& pat,const Cloner& cloner=ShallowCopy()): - Transform(pat,cloner), + PositionAttitudeTransform(const PositionAttitudeTransform& pat,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + Transform(pat,copyop), _position(pat._position), _attitude(pat._attitude) {} diff --git a/include/osg/ShadeModel b/include/osg/ShadeModel index 26128c42d..4b1089b57 100644 --- a/include/osg/ShadeModel +++ b/include/osg/ShadeModel @@ -19,9 +19,9 @@ class SG_EXPORT ShadeModel : public StateAttribute ShadeModel(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - ShadeModel(const ShadeModel& sm,const Cloner& cloner=ShallowCopy()): - StateAttribute(sm,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + ShadeModel(const ShadeModel& sm,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(sm,copyop), _mode(sm._mode) {} diff --git a/include/osg/ShallowCopy b/include/osg/ShallowCopy index 80f4df750..df8856675 100644 --- a/include/osg/ShallowCopy +++ b/include/osg/ShallowCopy @@ -16,12 +16,12 @@ class StateAttribute; class Node; class Drawable; -/** Cloner Functor used to control the whether shallow or deep copy is used - * during copy construction and clone operation. The base Cloner acts as +/** CopyOp Functor used to control the whether shallow or deep copy is used + * during copy construction and clone operation. The base CopyOp acts as * a shallow copy simply passing back the same pointer as passed in.*/ -struct Cloner +struct CopyOp { - virtual ~Cloner() {} + virtual ~CopyOp() {} virtual Referenced* operator() (const Referenced* ref) const { return const_cast(ref); } virtual Object* operator() (const Object* obj) const { return const_cast(obj); } @@ -34,7 +34,7 @@ struct Cloner }; /** Convenience typedef so that users can use the more logical ShallowCopy in their own code.*/ -typedef Cloner ShallowCopy; +typedef CopyOp ShallowCopy; }; diff --git a/include/osg/StateAttribute b/include/osg/StateAttribute index 6a0d843d5..fadb6995c 100644 --- a/include/osg/StateAttribute +++ b/include/osg/StateAttribute @@ -23,7 +23,7 @@ class StateSet; * subclasses.*/ #define META_StateAttribute(name,type) \ virtual osg::Object* cloneType() const { return new name(); } \ - virtual osg::Object* clone(const osg::Cloner& cloner) const { return new name (*this,cloner); } \ + virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \ virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } \ virtual const char* className() const { return #name; } \ virtual const Type getType() const { return type; } @@ -149,8 +149,8 @@ class SG_EXPORT StateAttribute : public Object StateAttribute() {} - StateAttribute(const StateAttribute& sa,const Cloner& cloner=ShallowCopy()): - Object(sa,cloner) {} + StateAttribute(const StateAttribute& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + Object(sa,copyop) {} /** Clone the type of an attribute, with Object* return type. @@ -159,7 +159,7 @@ class SG_EXPORT StateAttribute : public Object /** Clone an attribute, with Object* return type. Must be defined by derived classes.*/ - virtual Object* clone(const Cloner&) const = 0; + virtual Object* clone(const CopyOp&) const = 0; /** return true if this and obj are of the same kind of object.*/ virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } diff --git a/include/osg/StateSet b/include/osg/StateSet index da60c8fce..3b4b94796 100644 --- a/include/osg/StateSet +++ b/include/osg/StateSet @@ -28,10 +28,10 @@ class SG_EXPORT StateSet : public Object StateSet(); - StateSet(const StateSet&,const Cloner& cloner=ShallowCopy()); + StateSet(const StateSet&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); virtual Object* cloneType() const { return new StateSet(); } - virtual Object* clone(const Cloner& cloner) const { return new StateSet(*this,cloner); } + virtual Object* clone(const CopyOp& copyop) const { return new StateSet(*this,copyop); } virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } virtual const char* className() const { return "StateSet"; } diff --git a/include/osg/Stencil b/include/osg/Stencil index e19db2a41..8272b7274 100644 --- a/include/osg/Stencil +++ b/include/osg/Stencil @@ -20,9 +20,9 @@ class SG_EXPORT Stencil : public StateAttribute Stencil(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Stencil(const Stencil& stencil,const Cloner& cloner=ShallowCopy()): - StateAttribute(stencil,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Stencil(const Stencil& stencil,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(stencil,copyop), _func(stencil._func), _funcRef(stencil._funcRef), _funcMask(stencil._funcMask), diff --git a/include/osg/Switch b/include/osg/Switch index d3c0d242a..53fa1da6b 100644 --- a/include/osg/Switch +++ b/include/osg/Switch @@ -31,8 +31,8 @@ class SG_EXPORT Switch : public Group Switch(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Switch(const Switch&,const Cloner& cloner=ShallowCopy()); + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Switch(const Switch&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); META_Node(Switch); diff --git a/include/osg/TexEnv b/include/osg/TexEnv index 4a3ef0a71..a15462d86 100644 --- a/include/osg/TexEnv +++ b/include/osg/TexEnv @@ -17,9 +17,9 @@ class SG_EXPORT TexEnv : public StateAttribute TexEnv(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - TexEnv(const TexEnv& texenv,const Cloner& cloner=ShallowCopy()): - StateAttribute(texenv,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + TexEnv(const TexEnv& texenv,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(texenv,copyop), _mode(texenv._mode) {} diff --git a/include/osg/TexGen b/include/osg/TexGen index cfd996d34..8396d6a4e 100644 --- a/include/osg/TexGen +++ b/include/osg/TexGen @@ -18,9 +18,9 @@ class SG_EXPORT TexGen : public StateAttribute TexGen(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - TexGen(const TexGen& texgen,const Cloner& cloner=ShallowCopy()): - StateAttribute(texgen,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + TexGen(const TexGen& texgen,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(texgen,copyop), _mode(texgen._mode), _plane_s(texgen._plane_s), _plane_t(texgen._plane_t), diff --git a/include/osg/TexMat b/include/osg/TexMat index d17afb933..758587731 100644 --- a/include/osg/TexMat +++ b/include/osg/TexMat @@ -17,9 +17,9 @@ class SG_EXPORT TexMat : public StateAttribute TexMat(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - TexMat(const TexMat& texmat,const Cloner& cloner=ShallowCopy()): - StateAttribute(texmat,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + TexMat(const TexMat& texmat,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(texmat,copyop), _matrix(texmat._matrix) {} META_StateAttribute(TexMat, TEXMAT); diff --git a/include/osg/Texture b/include/osg/Texture index c18fa60a9..cfcda4cc5 100644 --- a/include/osg/Texture +++ b/include/osg/Texture @@ -69,13 +69,13 @@ class SG_EXPORT Texture : public StateAttribute Texture(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Texture(const Texture& text,const Cloner& cloner=ShallowCopy()): - StateAttribute(text,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Texture(const Texture& text,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(text,copyop), _handleList(text._handleList), _modifiedTag(text._modifiedTag), _textureObjectSize(text._textureObjectSize), - _image(cloner(text._image.get())), + _image(copyop(text._image.get())), _textureUnit(text._textureUnit), _wrap_s(text._wrap_s), _wrap_t(text._wrap_t), diff --git a/include/osg/Transform b/include/osg/Transform index c1fe993ea..3f631c590 100644 --- a/include/osg/Transform +++ b/include/osg/Transform @@ -29,8 +29,8 @@ class SG_EXPORT Transform : public Group Transform(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Transform(const Transform&,const Cloner& cloner=ShallowCopy()); + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Transform(const Transform&,const CopyOp& copyop=CopyOp::SHALLOW_COPY); Transform(const Matrix& matix); diff --git a/include/osg/Transparency b/include/osg/Transparency index e51454f98..98a2d70d1 100644 --- a/include/osg/Transparency +++ b/include/osg/Transparency @@ -17,9 +17,9 @@ class SG_EXPORT Transparency : public StateAttribute Transparency(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Transparency(const Transparency& trans,const Cloner& cloner=ShallowCopy()): - StateAttribute(trans,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Transparency(const Transparency& trans,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(trans,copyop), _source_factor(trans._source_factor), _destination_factor(trans._destination_factor) {} diff --git a/include/osg/Viewport b/include/osg/Viewport index 29c06fefb..c14f45bb6 100644 --- a/include/osg/Viewport +++ b/include/osg/Viewport @@ -20,9 +20,9 @@ class SG_EXPORT Viewport : public StateAttribute Viewport(); - /** Copy constructor using Cloner to manage deep vs shallow copy.*/ - Viewport(const Viewport& vp,const Cloner& cloner=ShallowCopy()): - StateAttribute(vp,cloner), + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Viewport(const Viewport& vp,const CopyOp& copyop=CopyOp::SHALLOW_COPY): + StateAttribute(vp,copyop), _x(vp._x), _y(vp._y), _width(vp._width), diff --git a/include/osgText/Font b/include/osgText/Font index 348b2905d..d5df5cee5 100644 --- a/include/osgText/Font +++ b/include/osgText/Font @@ -40,7 +40,7 @@ namespace osgText { * subclasses.*/ #define META_Font(name) \ virtual osg::Object* cloneType() const { return new name(); } \ - virtual osg::Object* clone(const osg::Cloner& cloner) const { return new name (*this,cloner); } \ + virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \ virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } \ virtual const char* className() const { return #name; } \ @@ -51,8 +51,8 @@ class OSGTEXT_EXPORT Font : public osg::Object public: Font(); - Font(const Font& font,const osg::Cloner& cloner=osg::ShallowCopy()): - Object(font,cloner), + Font(const Font& font,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): + Object(font,copyop), _init(false), _created(false), _font(0L), @@ -113,8 +113,8 @@ class OSGTEXT_EXPORT RasterFont:public Font public: RasterFont():Font(){} - RasterFont(const RasterFont& font,const osg::Cloner& cloner=osg::ShallowCopy()): - Font(font,cloner) {} + RasterFont(const RasterFont& font,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): + Font(font,copyop) {} RasterFont(const std::string& font):Font() {} virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } @@ -130,8 +130,8 @@ class OSGTEXT_EXPORT VectorFont:public Font { public: VectorFont():Font(){} - VectorFont(const VectorFont& font,const osg::Cloner& cloner=osg::ShallowCopy()): - Font(font,cloner) {} + VectorFont(const VectorFont& font,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): + Font(font,copyop) {} VectorFont(const std::string& font):Font(){} virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } @@ -149,8 +149,8 @@ class OSGTEXT_EXPORT BitmapFont:public RasterFont BitmapFont() {} - BitmapFont(const BitmapFont& font,const osg::Cloner& cloner=osg::ShallowCopy()): - RasterFont(font,cloner) {} + BitmapFont(const BitmapFont& font,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): + RasterFont(font,copyop) {} BitmapFont(const std::string& font, int point_size); @@ -168,8 +168,8 @@ class OSGTEXT_EXPORT PixmapFont:public RasterFont public: PixmapFont() {} - PixmapFont(const PixmapFont& font,const osg::Cloner& cloner=osg::ShallowCopy()): - RasterFont(font,cloner) {} + PixmapFont(const PixmapFont& font,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): + RasterFont(font,copyop) {} PixmapFont(const std::string& font, int point_size); @@ -188,8 +188,8 @@ class OSGTEXT_EXPORT TextureFont:public RasterFont public: TextureFont() {} - TextureFont(const TextureFont& font,const osg::Cloner& cloner=osg::ShallowCopy()): - RasterFont(font,cloner) {} + TextureFont(const TextureFont& font,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): + RasterFont(font,copyop) {} TextureFont(const std::string& font, int point_size); @@ -211,8 +211,8 @@ class OSGTEXT_EXPORT OutlineFont:public VectorFont public: OutlineFont() {} - OutlineFont(const OutlineFont& font,const osg::Cloner& cloner=osg::ShallowCopy()): - VectorFont(font,cloner) {} + OutlineFont(const OutlineFont& font,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): + VectorFont(font,copyop) {} OutlineFont(const std::string& font, int point_size, @@ -232,8 +232,8 @@ class OSGTEXT_EXPORT PolygonFont:public VectorFont public: PolygonFont() {} - PolygonFont(const PolygonFont& font,const osg::Cloner& cloner=osg::ShallowCopy()): - VectorFont(font,cloner) {} + PolygonFont(const PolygonFont& font,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): + VectorFont(font,copyop) {} PolygonFont(const std::string& font, int point_size, diff --git a/include/osgText/Paragraph b/include/osgText/Paragraph index a57f1961d..bb895eb3f 100644 --- a/include/osgText/Paragraph +++ b/include/osgText/Paragraph @@ -15,7 +15,7 @@ class OSGTEXT_EXPORT Paragraph : public osg::Geode public: Paragraph(); - Paragraph(const Paragraph& paragraph,const osg::Cloner& cloner=osg::ShallowCopy()); + Paragraph(const Paragraph& paragraph,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); Paragraph(const osg::Vec3& position,const std::string& text,osgText::Font* font); META_Node(Paragraph) diff --git a/include/osgText/Text b/include/osgText/Text index c8e0975bc..3ad21035c 100644 --- a/include/osgText/Text +++ b/include/osgText/Text @@ -67,11 +67,11 @@ class OSGTEXT_EXPORT Text : public osg::Drawable }; Text(); - Text(const Text& text,const osg::Cloner& cloner=osg::ShallowCopy()); + Text(const Text& text,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); Text(Font* font); virtual osg::Object* cloneType() const { return new Text(); } - virtual osg::Object* clone(const osg::Cloner& cloner) const { return new Text(*this,cloner); } + virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new Text(*this,copyop); } virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } virtual const char* className() const { return "Text"; } diff --git a/include/osgUtil/RenderBin b/include/osgUtil/RenderBin index 6b6f8d286..86dec7f24 100644 --- a/include/osgUtil/RenderBin +++ b/include/osgUtil/RenderBin @@ -36,7 +36,7 @@ class OSGUTIL_EXPORT RenderBin : public osg::Object RenderBin(); virtual osg::Object* cloneType() const { return new RenderBin(); } - virtual osg::Object* clone(const osg::Cloner&) const { return new RenderBin(); } // note only implements a clone of type. + virtual osg::Object* clone(const osg::CopyOp&) const { return new RenderBin(); } // note only implements a clone of type. virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=0L; } virtual const char* className() const { return "RenderBin"; } diff --git a/include/osgUtil/RenderStage b/include/osgUtil/RenderStage index e387def60..30e81ce3c 100644 --- a/include/osgUtil/RenderStage +++ b/include/osgUtil/RenderStage @@ -28,8 +28,8 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin RenderStage(); - virtual osg::Object* cloneType(const osg::Cloner&) const { return new RenderStage(); } - virtual osg::Object* clone(const osg::Cloner&) const { return new RenderStage(); } // note only implements a clone of type. + virtual osg::Object* cloneType(const osg::CopyOp&) const { return new RenderStage(); } + virtual osg::Object* clone(const osg::CopyOp&) const { return new RenderStage(); } // note only implements a clone of type. virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=0L; } virtual const char* className() const { return "RenderStage"; } diff --git a/include/osgUtil/RenderStageLighting b/include/osgUtil/RenderStageLighting index 77796ce90..b971a5019 100644 --- a/include/osgUtil/RenderStageLighting +++ b/include/osgUtil/RenderStageLighting @@ -24,7 +24,7 @@ class OSGUTIL_EXPORT RenderStageLighting : public osg::Object RenderStageLighting(); virtual osg::Object* cloneType() const { return new RenderStageLighting(); } - virtual osg::Object* clone(const osg::Cloner&) const { return new RenderStageLighting(); } // note only implements a clone of type. + virtual osg::Object* clone(const osg::CopyOp&) const { return new RenderStageLighting(); } // note only implements a clone of type. virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=0L; } virtual const char* className() const { return "RenderStageLighting"; } diff --git a/include/osgUtil/RenderToTextureStage b/include/osgUtil/RenderToTextureStage index 259a7520f..a7b8cdc27 100644 --- a/include/osgUtil/RenderToTextureStage +++ b/include/osgUtil/RenderToTextureStage @@ -23,7 +23,7 @@ class OSGUTIL_EXPORT RenderToTextureStage : public RenderStage virtual osg::Object* cloneType() const { return new RenderToTextureStage(); } - virtual osg::Object* clone(const osg::Cloner&) const { return new RenderToTextureStage(); } // note only implements a clone of type. + virtual osg::Object* clone(const osg::CopyOp&) const { return new RenderToTextureStage(); } // note only implements a clone of type. virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=0L; } virtual const char* className() const { return "RenderToTextureStage"; } diff --git a/src/osg/Billboard.cpp b/src/osg/Billboard.cpp index c37bec515..a543ccf6e 100644 --- a/src/osg/Billboard.cpp +++ b/src/osg/Billboard.cpp @@ -14,8 +14,8 @@ Billboard::Billboard() setCachedMode(); } -Billboard::Billboard(const Billboard& billboard,const Cloner& cloner): - Geode(billboard,cloner), +Billboard::Billboard(const Billboard& billboard,const CopyOp& copyop): + Geode(billboard,copyop), _mode(billboard._mode), _axis(billboard._axis), _positionList(billboard._positionList), diff --git a/src/osg/GeoSet.cpp b/src/osg/GeoSet.cpp index 43ec5a0e9..ada6599d1 100644 --- a/src/osg/GeoSet.cpp +++ b/src/osg/GeoSet.cpp @@ -50,8 +50,8 @@ GeoSet::GeoSet() } -GeoSet::GeoSet(const GeoSet& geoset,const Cloner& cloner): - Drawable(geoset,cloner) +GeoSet::GeoSet(const GeoSet& geoset,const CopyOp& copyop): + Drawable(geoset,copyop) { // ensure that the num of vertices etc have been set up before we copy. geoset.computeNumVerts(); diff --git a/src/osg/Geode.cpp b/src/osg/Geode.cpp index 2ad0252f8..b771a3b67 100644 --- a/src/osg/Geode.cpp +++ b/src/osg/Geode.cpp @@ -10,14 +10,14 @@ Geode::Geode() { } -Geode::Geode(const Geode& geode,const Cloner& cloner): - Node(geode,cloner) +Geode::Geode(const Geode& geode,const CopyOp& copyop): + Node(geode,copyop) { for(DrawableList::const_iterator itr=geode._drawables.begin(); itr!=geode._drawables.end(); ++itr) { - Drawable* drawable = cloner(itr->get()); + Drawable* drawable = copyop(itr->get()); if (drawable) addDrawable(drawable); } } diff --git a/src/osg/Group.cpp b/src/osg/Group.cpp index 096819c1b..8b2b95ace 100644 --- a/src/osg/Group.cpp +++ b/src/osg/Group.cpp @@ -13,14 +13,14 @@ Group::Group() { } -Group::Group(const Group& group,const Cloner& cloner): - Node(group,cloner) +Group::Group(const Group& group,const CopyOp& copyop): + Node(group,copyop) { for(ChildList::const_iterator itr=group._children.begin(); itr!=group._children.end(); ++itr) { - Node* child = cloner(itr->get()); + Node* child = copyop(itr->get()); if (child) addChild(child); } } diff --git a/src/osg/Image.cpp b/src/osg/Image.cpp index 6bab583a5..a1f089d7d 100644 --- a/src/osg/Image.cpp +++ b/src/osg/Image.cpp @@ -26,8 +26,8 @@ Image::Image() _modifiedTag = 0; } -Image::Image(const Image& image,const Cloner& cloner): - Object(image,cloner), +Image::Image(const Image& image,const CopyOp& copyop): + Object(image,copyop), _fileName(image._fileName), _s(image._s), _t(image._t), _r(image._r), _internalFormat(image._internalFormat), diff --git a/src/osg/LOD.cpp b/src/osg/LOD.cpp index f3c7e6f51..f45db7db3 100644 --- a/src/osg/LOD.cpp +++ b/src/osg/LOD.cpp @@ -4,8 +4,8 @@ using namespace osg; -LOD::LOD(const LOD& lod,const Cloner& cloner): - Group(lod,cloner), +LOD::LOD(const LOD& lod,const CopyOp& copyop): + Group(lod,copyop), _rangeList(lod._rangeList), _rangeList2(lod._rangeList2), _center(lod._center) diff --git a/src/osg/Node.cpp b/src/osg/Node.cpp index 332e84c91..40f35740a 100644 --- a/src/osg/Node.cpp +++ b/src/osg/Node.cpp @@ -20,8 +20,8 @@ Node::Node() } -Node::Node(const Node& node,const Cloner& cloner): - Object(node,cloner), +Node::Node(const Node& node,const CopyOp& copyop): + Object(node,copyop), _bsphere(_bsphere), _bsphere_computed(node._bsphere_computed), _name(node._name), @@ -30,10 +30,10 @@ Node::Node(const Node& node,const Cloner& cloner): _numChildrenRequiringAppTraversal(0), // assume no children yet. _cullingActive(node._cullingActive), _numChildrenWithCullingDisabled(0), // assume no children yet. - _userData(cloner(node._userData.get())), + _userData(copyop(node._userData.get())), _nodeMask(node._nodeMask), _descriptions(node._descriptions), - _dstate(cloner(node._dstate.get())) + _dstate(copyop(node._dstate.get())) { } diff --git a/src/osg/Object.cpp b/src/osg/Object.cpp index 3d9bfd975..ae9dde005 100644 --- a/src/osg/Object.cpp +++ b/src/osg/Object.cpp @@ -2,5 +2,5 @@ using namespace osg; -Object::Object(const Object&,const Cloner&): +Object::Object(const Object&,const CopyOp&): Referenced() {} diff --git a/src/osg/StateSet.cpp b/src/osg/StateSet.cpp index a03814a0f..8c21fcef8 100644 --- a/src/osg/StateSet.cpp +++ b/src/osg/StateSet.cpp @@ -21,7 +21,7 @@ StateSet::StateSet() setRendingBinToInherit(); } -StateSet::StateSet(const StateSet& rhs,const Cloner& cloner):Object(rhs,cloner) +StateSet::StateSet(const StateSet& rhs,const CopyOp& copyop):Object(rhs,copyop) { _modeList = rhs._modeList; @@ -31,7 +31,7 @@ StateSet::StateSet(const StateSet& rhs,const Cloner& cloner):Object(rhs,cloner) { StateAttribute::Type type = itr->first; const RefAttributePair& rap = itr->second; - StateAttribute* attr = cloner(rap.first.get()); + StateAttribute* attr = copyop(rap.first.get()); if (attr) _attributeList[type]=RefAttributePair(attr,rap.second); } diff --git a/src/osg/Switch.cpp b/src/osg/Switch.cpp index 620895021..1fa76af35 100644 --- a/src/osg/Switch.cpp +++ b/src/osg/Switch.cpp @@ -13,8 +13,8 @@ Switch::Switch() _value = ALL_CHILDREN_OFF; } -Switch::Switch(const Switch& sw,const Cloner& cloner): - Group(sw,cloner), +Switch::Switch(const Switch& sw,const CopyOp& copyop): + Group(sw,copyop), _value(sw._value) { } diff --git a/src/osg/Transform.cpp b/src/osg/Transform.cpp index 415eeef10..63e1ac62c 100644 --- a/src/osg/Transform.cpp +++ b/src/osg/Transform.cpp @@ -16,8 +16,8 @@ Transform::Transform() _worldToLocalDirty = false; } -Transform::Transform(const Transform& transform,const Cloner& cloner): - Group(transform,cloner), +Transform::Transform(const Transform& transform,const CopyOp& copyop): + Group(transform,copyop), _type(transform._type), _mode(transform._mode), _localToWorldDirty(transform._localToWorldDirty), diff --git a/src/osgText/Paragraph.cpp b/src/osgText/Paragraph.cpp index 51e0caf16..ac6047b8a 100644 --- a/src/osgText/Paragraph.cpp +++ b/src/osgText/Paragraph.cpp @@ -8,11 +8,11 @@ Paragraph::Paragraph() _maxCharsPerLine = 80; } -Paragraph::Paragraph(const Paragraph& paragraph,const osg::Cloner& cloner): - Geode(paragraph,cloner), +Paragraph::Paragraph(const Paragraph& paragraph,const osg::CopyOp& copyop): + Geode(paragraph,copyop), _position(paragraph._position), _text(paragraph._text), - _font(dynamic_cast(cloner(paragraph._font.get()))), + _font(dynamic_cast(copyop(paragraph._font.get()))), _alignment(paragraph._alignment), _maxCharsPerLine(paragraph._maxCharsPerLine) { diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index 083aea4d9..bfa193d3d 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -35,9 +35,9 @@ Text::Text() setDefaults(); } -Text::Text(const Text& text,const osg::Cloner& cloner): - Drawable(text,cloner), - _font(dynamic_cast(cloner(text._font.get()))), +Text::Text(const Text& text,const osg::CopyOp& copyop): + Drawable(text,copyop), + _font(dynamic_cast(copyop(text._font.get()))), _init(text._init), _initAlignment(text._initAlignment), _text(text._text),