added call to copy constructor for virtual base classes in copy constructor of derived classes, removed these for abstract classes

This commit is contained in:
Laurens Voerman 2016-08-29 10:41:40 +02:00
parent 2bdf56cb4b
commit 628f8fd9dc
31 changed files with 88 additions and 42 deletions

View File

@ -229,7 +229,9 @@ class OSG_EXPORT AnimationPathCallback : public NodeCallback
_pauseTime(0.0) {} _pauseTime(0.0) {}
AnimationPathCallback(const AnimationPathCallback& apc,const CopyOp& copyop): AnimationPathCallback(const AnimationPathCallback& apc,const CopyOp& copyop):
NodeCallback(apc,copyop), Object(apc, copyop),
Callback(apc, copyop),
NodeCallback(apc, copyop),
_animationPath(apc._animationPath), _animationPath(apc._animationPath),
_pivotPoint(apc._pivotPoint), _pivotPoint(apc._pivotPoint),
_useInverseMatrix(apc._useInverseMatrix), _useInverseMatrix(apc._useInverseMatrix),

View File

@ -533,7 +533,8 @@ class OSG_EXPORT BufferData : public Object
{ {
ModifiedCallback() {} ModifiedCallback() {}
ModifiedCallback(const ModifiedCallback&,const CopyOp&) {} ModifiedCallback(const ModifiedCallback& org, const CopyOp& copyop) :
Object(org, copyop) {}
META_Object(osg,ModifiedCallback); META_Object(osg,ModifiedCallback);

View File

@ -213,7 +213,8 @@ class OSG_EXPORT NodeCallback : public virtual Callback {
NodeCallback(){} NodeCallback(){}
NodeCallback(const NodeCallback& nc,const CopyOp& copyop): NodeCallback(const NodeCallback& nc,const CopyOp& copyop):
Callback(nc,copyop) {} Object(nc, copyop),
Callback(nc, copyop) {}
META_Object(osg,NodeCallback); META_Object(osg,NodeCallback);
@ -240,7 +241,9 @@ class OSG_EXPORT StateAttributeCallback : public virtual osg::Callback
public: public:
StateAttributeCallback() {} StateAttributeCallback() {}
StateAttributeCallback(const StateAttributeCallback&,const CopyOp&) {} StateAttributeCallback(const StateAttributeCallback& org,const CopyOp& copyop) :
Object(org, copyop),
Callback(org, copyop) {}
META_Object(osg,StateAttributeCallback); META_Object(osg,StateAttributeCallback);
@ -263,7 +266,9 @@ class OSG_EXPORT UniformCallback : public virtual osg::Callback
public: public:
UniformCallback() {} UniformCallback() {}
UniformCallback(const UniformCallback&, const CopyOp&) {} UniformCallback(const UniformCallback& org, const CopyOp& copyop) :
Object(org, copyop),
Callback(org, copyop) {}
META_Object(osg, UniformCallback); META_Object(osg, UniformCallback);
@ -288,7 +293,9 @@ class OSG_EXPORT DrawableUpdateCallback : public virtual Callback
public: public:
DrawableUpdateCallback() {} DrawableUpdateCallback() {}
DrawableUpdateCallback(const DrawableUpdateCallback&,const CopyOp&) {} DrawableUpdateCallback(const DrawableUpdateCallback& org,const CopyOp& copyop):
Object(org, copyop),
Callback(org, copyop) {}
META_Object(osg,DrawableUpdateCallback); META_Object(osg,DrawableUpdateCallback);
@ -308,7 +315,9 @@ class OSG_EXPORT DrawableEventCallback : public virtual Callback
public: public:
DrawableEventCallback() {} DrawableEventCallback() {}
DrawableEventCallback(const DrawableEventCallback&,const CopyOp&) {} DrawableEventCallback(const DrawableEventCallback& org, const CopyOp& copyop) :
Object(org, copyop),
Callback(org, copyop) {}
META_Object(osg,DrawableEventCallback); META_Object(osg,DrawableEventCallback);
@ -327,7 +336,9 @@ class OSG_EXPORT DrawableCullCallback : public virtual Callback
public: public:
DrawableCullCallback() {} DrawableCullCallback() {}
DrawableCullCallback(const DrawableCullCallback&,const CopyOp&) {} DrawableCullCallback(const DrawableCullCallback& org, const CopyOp& copyop) :
Object(org, copyop),
Callback(org, copyop) {}
META_Object(osg,DrawableCullCallback); META_Object(osg,DrawableCullCallback);

View File

@ -590,7 +590,8 @@ class OSG_EXPORT Camera : public Transform, public CullSettings
{ {
DrawCallback() {} DrawCallback() {}
DrawCallback(const DrawCallback&,const CopyOp&) {} DrawCallback(const DrawCallback& org,const CopyOp& copyop):
Object(org, copyop) {}
META_Object(osg, DrawCallback); META_Object(osg, DrawCallback);

View File

@ -168,7 +168,8 @@ class OSG_EXPORT Drawable : public Node
{ {
ComputeBoundingBoxCallback() {} ComputeBoundingBoxCallback() {}
ComputeBoundingBoxCallback(const ComputeBoundingBoxCallback&,const CopyOp&) {} ComputeBoundingBoxCallback(const ComputeBoundingBoxCallback& org,const CopyOp& copyop):
Object(org, copyop) {}
META_Object(osg,ComputeBoundingBoxCallback); META_Object(osg,ComputeBoundingBoxCallback);
@ -285,7 +286,8 @@ class OSG_EXPORT Drawable : public Node
{ {
DrawCallback() {} DrawCallback() {}
DrawCallback(const DrawCallback&,const CopyOp&) {} DrawCallback(const DrawCallback& org,const CopyOp& copyop):
Object(org, copyop) {}
META_Object(osg,DrawCallback); META_Object(osg,DrawCallback);

View File

@ -447,7 +447,8 @@ class OSG_EXPORT Node : public Object
{ {
ComputeBoundingSphereCallback() {} ComputeBoundingSphereCallback() {}
ComputeBoundingSphereCallback(const ComputeBoundingSphereCallback&,const CopyOp&) {} ComputeBoundingSphereCallback(const ComputeBoundingSphereCallback& org,const CopyOp& copyop):
Object(org, copyop) {}
META_Object(osg,ComputeBoundingSphereCallback); META_Object(osg,ComputeBoundingSphereCallback);

View File

@ -367,7 +367,9 @@ class DummyObject : public osg::Object
{ {
public: public:
DummyObject() {} DummyObject() {}
DummyObject(const DummyObject&, const osg::CopyOp&) {} DummyObject(const DummyObject& org, const CopyOp& copyop) :
Object(org, copyop) {}
META_Object(osg, DummyObject) META_Object(osg, DummyObject)
protected: protected:
virtual ~DummyObject() {} virtual ~DummyObject() {}

View File

@ -438,7 +438,9 @@ class OSG_EXPORT StateSet : public Object
{ {
Callback() {} Callback() {}
Callback(const Callback&,const CopyOp&) {} Callback(const Callback& org,const CopyOp& copyop):
osg::Object(org, copyop),
osg::Callback(org, copyop) {}
META_Object(osg,Callback); META_Object(osg,Callback);

View File

@ -41,7 +41,8 @@ namespace osgAnimation
{ {
public: public:
Callback(){} Callback(){}
Callback(const Callback& nc,const osg::CopyOp&) : Callback(const Callback& nc,const osg::CopyOp& copyop) :
osg::Object(nc, copyop),
_nestedCallback(nc._nestedCallback) {} _nestedCallback(nc._nestedCallback) {}
META_Object(osgAnimation,Callback); META_Object(osgAnimation,Callback);

View File

@ -182,7 +182,10 @@ namespace osgAnimation
{ {
UpdateMorphGeometry() {} UpdateMorphGeometry() {}
UpdateMorphGeometry(const UpdateMorphGeometry&, const osg::CopyOp&) {} UpdateMorphGeometry(const UpdateMorphGeometry& org, const osg::CopyOp& copyop):
osg::Object(org, copyop),
osg::Callback(org, copyop),
osg::DrawableUpdateCallback(org, copyop) {}
META_Object(osgAnimation, UpdateMorphGeometry); META_Object(osgAnimation, UpdateMorphGeometry);

View File

@ -128,7 +128,10 @@ namespace osgAnimation
{ {
UpdateRigGeometry() {} UpdateRigGeometry() {}
UpdateRigGeometry(const UpdateRigGeometry&, const osg::CopyOp&) {} UpdateRigGeometry(const UpdateRigGeometry& org, const osg::CopyOp& copyop):
osg::Object(org, copyop),
osg::Callback(org, copyop),
osg::DrawableUpdateCallback(org, copyop) {}
META_Object(osgAnimation, UpdateRigGeometry); META_Object(osgAnimation, UpdateRigGeometry);

View File

@ -26,7 +26,8 @@ namespace osgAnimation
{ {
public: public:
RigTransform() {} RigTransform() {}
RigTransform(const RigTransform&, const osg::CopyOp&) {} RigTransform(const RigTransform& org, const osg::CopyOp& copyop):
osg::Object(org, copyop) {}
META_Object(osgAnimation,RigTransform) META_Object(osgAnimation,RigTransform)

View File

@ -44,7 +44,10 @@ namespace osgAnimation
META_Object(osgAnimation, VertexInfluenceMap); META_Object(osgAnimation, VertexInfluenceMap);
VertexInfluenceMap() {} VertexInfluenceMap() {}
VertexInfluenceMap(const osgAnimation::VertexInfluenceMap&, const osg::CopyOp&) {} VertexInfluenceMap(const osgAnimation::VertexInfluenceMap& org, const osg::CopyOp& copyop):
std::map<std::string, VertexInfluence>(org),
osg::Object(org, copyop)
{}
}; };

View File

@ -38,8 +38,8 @@ class DraggerCallback : virtual public osg::Object
DraggerCallback(): DraggerCallback():
osg::Object(true) {} osg::Object(true) {}
DraggerCallback(const DraggerCallback&, const osg::CopyOp& /*copyop*/ = osg::CopyOp::SHALLOW_COPY): DraggerCallback(const DraggerCallback& org, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
osg::Object(true) {} osg::Object(org, copyop) {}
META_Object(osgManipulator, DraggerCallback); META_Object(osgManipulator, DraggerCallback);

View File

@ -104,6 +104,8 @@ class OSGPRESENTATION_EXPORT AnimationMaterialCallback : public osg::NodeCallbac
AnimationMaterialCallback(const AnimationMaterialCallback& apc,const osg::CopyOp& copyop): AnimationMaterialCallback(const AnimationMaterialCallback& apc,const osg::CopyOp& copyop):
osg::Object(apc, copyop),
osg::Callback(apc, copyop),
osg::NodeCallback(apc,copyop), osg::NodeCallback(apc,copyop),
_animationMaterial(apc._animationMaterial), _animationMaterial(apc._animationMaterial),
_useInverseMatrix(apc._useInverseMatrix), _useInverseMatrix(apc._useInverseMatrix),

View File

@ -29,7 +29,10 @@ ClusterCullingCallback::ClusterCullingCallback():
} }
ClusterCullingCallback::ClusterCullingCallback(const ClusterCullingCallback& ccc,const CopyOp& copyop): ClusterCullingCallback::ClusterCullingCallback(const ClusterCullingCallback& ccc,const CopyOp& copyop):
DrawableCullCallback(ccc,copyop), Object(ccc, copyop),
Callback(ccc, copyop),
DrawableCullCallback(ccc, copyop),
NodeCallback(ccc, copyop),
_controlPoint(ccc._controlPoint), _controlPoint(ccc._controlPoint),
_normal(ccc._normal), _normal(ccc._normal),
_radius(ccc._radius), _radius(ccc._radius),

View File

@ -24,7 +24,8 @@ Action::Action()
_loop = 1; _loop = 1;
_state = Stop; _state = Stop;
} }
Action::Action(const Action&rhs,const osg::CopyOp&) Action::Action(const Action&rhs,const osg::CopyOp& copyop):
osg::Object(rhs, copyop)
{ {
_numberFrame = rhs._numberFrame; _numberFrame = rhs._numberFrame;
_fps = rhs._fps; _fps = rhs._fps;

View File

@ -63,8 +63,6 @@ void AnimationManagerBase::operator()(osg::Node* node, osg::NodeVisitor* nv)
AnimationManagerBase::AnimationManagerBase(const AnimationManagerBase& b, const osg::CopyOp& copyop) : AnimationManagerBase::AnimationManagerBase(const AnimationManagerBase& b, const osg::CopyOp& copyop) :
osg::Object(b,copyop),
osg::Callback(b,copyop),
osg::NodeCallback(b,copyop) // TODO check this osg::NodeCallback(b,copyop) // TODO check this
{ {
const AnimationList& animationList = b.getAnimationList(); const AnimationList& animationList = b.getAnimationList();

View File

@ -22,8 +22,10 @@ BasicAnimationManager::BasicAnimationManager()
{ {
} }
BasicAnimationManager::BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop) BasicAnimationManager::BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop):
: AnimationManagerBase(b,copyop) osg::Object(b, copyop),
osg::Callback(b, copyop),
AnimationManagerBase(b,copyop)
, _lastUpdate(0.0) , _lastUpdate(0.0)
{ {
} }

View File

@ -198,6 +198,7 @@ void MorphGeometry::transformSoftwareMethod()
UpdateMorph::UpdateMorph(const UpdateMorph& apc,const osg::CopyOp& copyop) : UpdateMorph::UpdateMorph(const UpdateMorph& apc,const osg::CopyOp& copyop) :
osg::Object(apc, copyop), osg::Object(apc, copyop),
osg::Callback(apc, copyop),
AnimationUpdateCallback<osg::NodeCallback>(apc, copyop) AnimationUpdateCallback<osg::NodeCallback>(apc, copyop)
{ {
} }

View File

@ -27,9 +27,12 @@ TimelineAnimationManager::TimelineAnimationManager(const AnimationManagerBase& m
_timeline = new Timeline; _timeline = new Timeline;
} }
TimelineAnimationManager::TimelineAnimationManager(const TimelineAnimationManager& nc,const osg::CopyOp& co) : AnimationManagerBase(nc, co) TimelineAnimationManager::TimelineAnimationManager(const TimelineAnimationManager& nc,const osg::CopyOp& co):
osg::Object(nc,co),
osg::Callback(nc,co),
AnimationManagerBase(nc, co)
{ {
_timeline = new Timeline(*nc.getTimeline()); _timeline = new Timeline(*nc.getTimeline(), co);
} }
void TimelineAnimationManager::update(double time) void TimelineAnimationManager::update(double time)

View File

@ -23,7 +23,7 @@ UpdateBone::UpdateBone(const std::string& name) : UpdateMatrixTransform(name)
{ {
} }
UpdateBone::UpdateBone(const UpdateBone& apc,const osg::CopyOp& copyop) : osg::Object(apc,copyop), UpdateMatrixTransform(apc, copyop) UpdateBone::UpdateBone(const UpdateBone& apc,const osg::CopyOp& copyop) : osg::Object(apc,copyop), osg::Callback(apc, copyop), UpdateMatrixTransform(apc, copyop)
{ {
} }

View File

@ -19,6 +19,7 @@ using namespace osgAnimation;
UpdateMaterial::UpdateMaterial(const UpdateMaterial& apc,const osg::CopyOp& copyop) UpdateMaterial::UpdateMaterial(const UpdateMaterial& apc,const osg::CopyOp& copyop)
: osg::Object(apc, copyop), : osg::Object(apc, copyop),
osg::Callback(apc,copyop),
AnimationUpdateCallback<osg::StateAttributeCallback>(apc, copyop) AnimationUpdateCallback<osg::StateAttributeCallback>(apc, copyop)
{ {
_diffuse = new osgAnimation::Vec4Target(apc._diffuse->getValue()); _diffuse = new osgAnimation::Vec4Target(apc._diffuse->getValue());

View File

@ -20,9 +20,7 @@ CameraManipulator::CameraManipulator()
} }
CameraManipulator::CameraManipulator(const CameraManipulator& mm, const CopyOp& copyOp) CameraManipulator::CameraManipulator(const CameraManipulator& mm, const CopyOp& copyOp):
: osg::Object(mm, copyOp),
osg::Callback(mm, copyOp),
inherited(mm, copyOp), inherited(mm, copyOp),
_intersectTraversalMask(mm._intersectTraversalMask), _intersectTraversalMask(mm._intersectTraversalMask),
_autoComputeHomePosition(mm._autoComputeHomePosition), _autoComputeHomePosition(mm._autoComputeHomePosition),

View File

@ -47,9 +47,7 @@ StandardManipulator::StandardManipulator( int flags )
/// Constructor. /// Constructor.
StandardManipulator::StandardManipulator( const StandardManipulator& uim, const CopyOp& copyOp ) StandardManipulator::StandardManipulator( const StandardManipulator& uim, const CopyOp& copyOp ):
: osg::Object(uim, copyOp),
osg::Callback(uim, copyOp),
inherited( uim, copyOp ), inherited( uim, copyOp ),
_thrown( uim._thrown ), _thrown( uim._thrown ),
_allowThrow( uim._allowThrow ), _allowThrow( uim._allowThrow ),

View File

@ -883,6 +883,8 @@ SlideEventHandler::SlideEventHandler(osgViewer::Viewer* viewer):
} }
SlideEventHandler::SlideEventHandler(const SlideEventHandler& seh,const osg::CopyOp& copyop): SlideEventHandler::SlideEventHandler(const SlideEventHandler& seh,const osg::CopyOp& copyop):
osg::Object(seh, copyop),
osg::Callback(seh, copyop),
osgGA::GUIEventHandler(seh,copyop), osgGA::GUIEventHandler(seh,copyop),
_viewer(seh._viewer), _viewer(seh._viewer),
_activePresentation(seh._activePresentation), _activePresentation(seh._activePresentation),

View File

@ -40,7 +40,7 @@ Widget::Widget():
} }
Widget::Widget(const Widget& widget, const osg::CopyOp& copyop): Widget::Widget(const Widget& widget, const osg::CopyOp& copyop):
osg::Group(), osg::Group(widget, copyop),
_focusBehaviour(widget._focusBehaviour), _focusBehaviour(widget._focusBehaviour),
_hasEventFocus(false), _hasEventFocus(false),
_graphicsInitialized(false), _graphicsInitialized(false),

View File

@ -30,8 +30,8 @@ CompositeViewer::CompositeViewer()
constructorInit(); constructorInit();
} }
CompositeViewer::CompositeViewer(const CompositeViewer& cv,const osg::CopyOp& /*copyop*/): CompositeViewer::CompositeViewer(const CompositeViewer& cv,const osg::CopyOp& copyop):
osg::Object(true), osg::Object(cv, copyop),
ViewerBase(cv) ViewerBase(cv)
{ {
constructorInit(); constructorInit();

View File

@ -177,7 +177,7 @@ View::View():
View::View(const osgViewer::View& view, const osg::CopyOp& copyop): View::View(const osgViewer::View& view, const osg::CopyOp& copyop):
osg::Object(true), osg::Object(view, copyop),
osg::View(view,copyop), osg::View(view,copyop),
osgGA::GUIActionAdapter(), osgGA::GUIActionAdapter(),
_startTick(0), _startTick(0),

View File

@ -194,7 +194,7 @@ Viewer::Viewer(osg::ArgumentParser& arguments)
} }
Viewer::Viewer(const osgViewer::Viewer& viewer, const osg::CopyOp& copyop): Viewer::Viewer(const osgViewer::Viewer& viewer, const osg::CopyOp& copyop):
osg::Object(true), osg::Object(viewer, copyop),
ViewerBase(viewer), ViewerBase(viewer),
View(viewer,copyop) View(viewer,copyop)
{ {

View File

@ -369,7 +369,11 @@ PropertyAdjustmentCallback::PropertyAdjustmentCallback():
{ {
} }
PropertyAdjustmentCallback::PropertyAdjustmentCallback(const PropertyAdjustmentCallback& pac,const osg::CopyOp&): PropertyAdjustmentCallback::PropertyAdjustmentCallback(const PropertyAdjustmentCallback& pac,const osg::CopyOp& copyop):
osg::Object(pac, copyop),
osg::Callback(pac, copyop),
osg::StateSet::Callback(pac, copyop),
osgGA::GUIEventHandler(pac, copyop),
_cyleForwardKey(pac._cyleForwardKey), _cyleForwardKey(pac._cyleForwardKey),
_cyleBackwardKey(pac._cyleBackwardKey), _cyleBackwardKey(pac._cyleBackwardKey),
_transparencyKey(pac._transparencyKey), _transparencyKey(pac._transparencyKey),