Hi Martin, I agree that having a Clone method, which is not implemented, is confusing. For reasons of consistency the Clone should perform a deep copy of the DataNode and its data (like your are doing it right now). If you have already implemented that and you are willing to contribute, we would appreciated this very much!
However I am not absolutely sure if this is the best way to realize a auto-saving feature. Usually if you process a data object you will get a new one as a result, which can then be stored again in a different node. Also you do not save the DataNode but the data contained by the node. Best, Andreas Am 30/03/15 12:47 schrieb "Martin Klemm" unter <[email protected]>: >Hi Andreas, > >you are right, what I am doing at the moment is cloning the data and >then the property list and set it in a new node. But for convenience >reasons it would be nice to just call dataNode->Clone(). It is also >confusing that there is a Clone() method available but not implemented. > >I have the use case where I want to contain the node in its current >state while continue working with a clone of itself (e.g. for >auto-saving mechanism, first create a clone, then save the clone while >the original data can be worked on). So the clone should be exactly like >the original. > >Best, > >Martin > >On 30.03.2015 09:17, Fetzer, Andreas wrote: >> Hi Martin, >> >> I am not entirely sure, but as far as I remember, the DataNode has no >> internal clone method, since it is only a container of the data. The >>clone >> method should always be implemented by the data itself. >> The only reason I can think of, why a node should be cloned, is that you >> want to get another node with exactly the same properties. However this >> could be done by cloning the PropertyList of a node. >> Are there any other requirements for you, so that you need the clone >> method for a data node? >> >> Best, >> Andreas >> >> Am 20/03/15 14:26 schrieb "Martin Klemm" unter >> <[email protected]>: >> >>> Hello everyone, >>> >>> I was just wondering why data nodes have no InternalClone method? Was >>>it >>> never needed so far? If there is no reason that speaks against it I >>> would give it a try to implement it. >>> >>> Best >>> >>> Martin >>> >>> >>>------------------------------------------------------------------------ >>>-- >>> ---- >>> Dive into the World of Parallel Programming The Go Parallel Website, >>> sponsored >>> by Intel and developed in partnership with Slashdot Media, is your hub >>> for all >>> things parallel software development, from weekly thought leadership >>> blogs to >>> news, videos, case studies, tutorials and more. Take a look and join >>>the >>> conversation now. http://goparallel.sourceforge.net/ >>> _______________________________________________ >>> mitk-users mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/mitk-users >> > >-- > >-------------------------------------------------------------------------- >---- >Dive into the World of Parallel Programming The Go Parallel Website, >sponsored >by Intel and developed in partnership with Slashdot Media, is your hub >for all >things parallel software development, from weekly thought leadership >blogs to >news, videos, case studies, tutorials and more. Take a look and join the >conversation now. http://goparallel.sourceforge.net/ >_______________________________________________ >mitk-users mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
