Hi Carsten,
thanks for the patch. I added it to the cvs.
Andreas
> Hi,
>
> the attached small patch (against 1.x cvs) allows to call the
> deepCloneAttachments functions for all types derived from
> AttachmentContainer. The drawback is a small performance penalty as
> instead of passing a NodePtr&, now AttachmentContainerPtr (note: not a
> reference) is used.
> It compiled fine for me on linux, and tutorial 17deepClone still works
> (this is relevant as deepCloneTree calls deepCloneAttachments).
>
> Cheers,
> Carsten
>
>
> ------------------------------------------------------------------------
>
> Index: Source/System/FieldContainer/OSGNode.cpp
> ===================================================================
> RCS file: /cvsroot/opensg/OpenSG/Source/System/FieldContainer/OSGNode.cpp,v
> retrieving revision 1.25
> diff -u -r1.25 OSGNode.cpp
> --- Source/System/FieldContainer/OSGNode.cpp 3 Jul 2006 13:52:23 -0000
> 1.25
> +++ Source/System/FieldContainer/OSGNode.cpp 26 Aug 2006 15:11:37 -0000
> @@ -899,7 +899,8 @@
> }
>
> // deep clone of attachements.
> -void OSG::deepCloneAttachments(const NodePtr &src, NodePtr &dst,
> +void OSG::deepCloneAttachments(const AttachmentContainerPtr &src,
> + AttachmentContainerPtr dst,
> const std::vector<std::string> &share)
> {
> SFAttachmentMap *amap = (SFAttachmentMap *) src->getSFAttachments();
> @@ -934,7 +935,8 @@
> endEditCP(dst, Node::AttachmentsFieldMask);
> }
>
> -void OSG::deepCloneAttachments(const NodePtr &src, NodePtr &dst,
> +void OSG::deepCloneAttachments(const AttachmentContainerPtr &src,
> + AttachmentContainerPtr dst,
> const std::vector<UInt16> &shareGroupIds)
> {
> std::vector<std::string> share;
> @@ -951,7 +953,8 @@
>
> // shareString is a comma separated FieldContainer type list
> // e.g. "Material, Geometry"
> -void OSG::deepCloneAttachments(const NodePtr &src, NodePtr &dst,
> +void OSG::deepCloneAttachments(const AttachmentContainerPtr &src,
> + AttachmentContainerPtr dst,
> const std::string &shareString)
> {
> std::vector<std::string> share;
> Index: Source/System/FieldContainer/Impl/OSGNodeImpl.h
> ===================================================================
> RCS file:
> /cvsroot/opensg/OpenSG/Source/System/FieldContainer/Impl/OSGNodeImpl.h,v
> retrieving revision 1.10
> diff -u -r1.10 OSGNodeImpl.h
> --- Source/System/FieldContainer/Impl/OSGNodeImpl.h 20 Jul 2005 00:09:07
> -0000 1.10
> +++ Source/System/FieldContainer/Impl/OSGNodeImpl.h 26 Aug 2006 15:11:37
> -0000
> @@ -356,15 +356,18 @@
> const std::string &shareString = "");
>
> OSG_SYSTEMLIB_DLLMAPPING
> -void deepCloneAttachments(const NodePtr &src, NodePtr &dst,
> +void deepCloneAttachments(const AttachmentContainerPtr &src,
> + AttachmentContainerPtr dst,
> const std::vector<std::string> &share);
>
> OSG_SYSTEMLIB_DLLMAPPING
> -void deepCloneAttachments(const NodePtr &src, NodePtr &dst,
> +void deepCloneAttachments(const AttachmentContainerPtr &src,
> + AttachmentContainerPtr dst,
> const std::vector<UInt16> &shareGroupIds);
>
> OSG_SYSTEMLIB_DLLMAPPING
> -void deepCloneAttachments(const NodePtr &src, NodePtr &dst,
> +void deepCloneAttachments(const AttachmentContainerPtr &src,
> + AttachmentContainerPtr dst,
> const std::string &shareString = "");
>
> OSG_SYSTEMLIB_DLLMAPPING
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users