From f9325048496d7cdbcad233f8a6b84c88e79adcc2 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Tue, 17 Sep 2019 20:11:47 -0400 Subject: [PATCH] Rename link2master to link2support. --- FileObject.java | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 54 insertions(+), 2 deletions(-) diff --git a/FileObject.java b/FileObject.java index 6de2b2c..e899a71 100644 --- a/FileObject.java +++ b/FileObject.java @@ -17,6 +17,41 @@ filecontent = null; } + boolean HasBigData() + { + return filecontent != null; + } + + void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) + { + Object3D o; + + if (hashtable.containsKey(GetUUID())) + { + o = hashtable.get(GetUUID()); + + //Grafreed.Assert(this.filecontent == ((FileObject)o).filecontent); + } + else + { + o = new Object3D("copy of " + this.name); + + hashtable.put(GetUUID(), o); + } + + ExtractBigData(o); + } + + void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) + { + if (!hashtable.containsKey(GetUUID())) + return; + + Object3D o = hashtable.get(GetUUID()); + + RestoreBigData(o); + } + boolean IsStatic() { return false; // ???? false; @@ -81,6 +116,23 @@ this.objfile = objfile; } + void ExtractBigData(Object3D o) + { + super.ExtractBigData(o); + + o.savefilecontent = this.filecontent; + + // filecontent is transient + this.filecontent = null; + } + + void RestoreBigData(Object3D o) + { + super.RestoreBigData(o); + + this.filecontent = o.savefilecontent; + } + Object3D deepCopy() { FileObject e = new FileObject(name, objfile); @@ -88,9 +140,9 @@ return e; } - protected void deepCopySelf(Object3D other) + protected void deepCopyNode(Object3D other) { - super.deepCopySelf(other); + super.deepCopyNode(other); } // void Draw(CameraPane display, Object3D /*Composite*/ root, boolean selected) -- Gitblit v1.6.2