Ticket #445 (closed task: fixed)

Opened 1 year ago

Last modified 1 year ago

Make Model use SavedObjects everywhere

Reported by: bshearer Assigned to: mekstran
Priority: blocker Milestone: Goanna release 0.5
Component: Goanna Version: SVN HEAD
Keywords: Cc:
Blocking: 365,312

Description

Properties and some attributes will become SavedObjects? inside the Model.

Attachments

Change History

03/23/07 17:49:15 changed by bshearer

  • owner changed from mekstran to bshearer.
  • status changed from new to assigned.

03/23/07 17:57:57 changed by bshearer

(In [1864]) References #445. Branch to implement using SavedObjects? everywhere in the Model.

(follow-up: ↓ 4 ) 03/26/07 10:15:19 changed by mekstran

A short comment with regards to the children (pure?) virtual method of SavedObject? which is to retrieve a reference to a notifying list of child objects: Let's not make this pure virtual. It struck me today how we can reasonably implement a default implementation --- a static variable in the method implementation. If we have the declaration of children() as follows:

const notifying_list<SavedObject*>& children();

we can then define it thusly:

const notifying_list<SavedObject*>&
SavedObject::children()
{
    static notifying_list< RefPtr<SavedObject> >& dummy_nl;
    return dummy_nl;
}

This will return an empty list as default, without leaking empty lists or requiring unnecessary empty lists anywhere. We should probably have a typedef for this type - perhaps ObjectList.

One last thing: for consistency, we should also have a const overload which returns the following type:

const notifying_list< WeakPtr<const SavedObject> >&

I will document the Goanna model's const correctness policy in Goanna/DesignPrinciples.

(in reply to: ↑ 3 ) 03/26/07 10:16:55 changed by mekstran

Replying to mekstran:

const notifying_list<SavedObject*>& children();

This return type (and the corresponding occurances) should be redefined as the following:

const notifying_list< RefPtr<SavedObject> >&

04/07/07 07:45:05 changed by mekstran

For the record, I'll record here what this ticket is all about, and document decisions made by Brandon and I in a meeting yesterday.

Currently, we have our model tree (to which topography is an extension, and considered part of the model tree). Objects have sub-objects, properties, and attributes. For sake of terms to understand this, an attribute is something that just has get/set as normal member functions, and a property is managed through the NodeProperties mechanism.

Underneath this we have the XML tree representing the data file.

The goal of this ticket is to essentially expose a "data tree," a rough simplification of the XML tree, to using applications. Properties and some attributes will become SavedObjects in their own right, accessable through get_child_objects() and child_objects() methods, defined by SavedObject. Some of these will be used fairly behind-the-scenes by the model (e.g., the Name saved object for Node will be used to implement the get_name() and set_name() methods).

The child_objects() method will return a const reference to a notifying_list which allows interested parties to monitor changes in the list of children of a particular object.

For clarification, we are renaming the Topography::Object class to Topography::VObject (for Visual Object). From now on, the term "object" will be used to describe some data object (a child of SavedObject) in the model and data trees.

04/10/07 14:22:14 changed by mekstran

  • priority changed from critical to major.

04/20/07 13:42:50 changed by mekstran

  • blocking set to 365,312.

04/20/07 17:19:38 changed by mekstran

  • owner changed from bshearer to mekstran.
  • status changed from assigned to new.

04/20/07 17:19:47 changed by mekstran

  • status changed from new to assigned.

I'm taking this one now.

04/20/07 17:45:01 changed by mekstran

(In [2001]) Merged revisions 1864-1869,1872-1886,1888-1891,1893-1914,1916,1918,1920-1975,1977-1995,1997-2000 via svnmerge from svn+ssh://sss/sss/svn/goanna/branches/saved-objects-everywhere

Merged the renames, etc. that Brandon did into the trunk. #445 will progress from here, probably with a new branch.

........

r1864 | bshearer | 2007-03-23 17:57:57 -0500 (Fri, 23 Mar 2007) | 1 line

References #445. Branch to implement using SavedObjects? everywhere in the Model.

........

r1891 | mekstran | 2007-03-28 10:28:01 -0500 (Wed, 28 Mar 2007) | 3 lines

Blocked revisions 1882-1884 via svnmerge

........

r1941 | bshearer | 2007-04-06 15:36:27 -0500 (Fri, 06 Apr 2007) | 1 line

References #450 With the move of SavedObject? code to its own files, some fixes to the member variable names were excluded. This indicates the completion of that fix for the new SavedObject? files.

........

r1942 | bshearer | 2007-04-06 15:38:51 -0500 (Fri, 06 Apr 2007) | 1 line

Added SavedObject?.h and SavedObject?.cpp to svn

........

r1973 | bshearer | 2007-04-12 15:34:56 -0500 (Thu, 12 Apr 2007) | 1 line

Added to aide in the name changes.

........

r1975 | bshearer | 2007-04-12 16:19:12 -0500 (Thu, 12 Apr 2007) | 1 line

xxxxObjectxxxx related classes names changed to xxxxVObjectxxxx

........

04/20/07 17:48:16 changed by mekstran

(In [2003]) References #445. Re-branched to resume work on this.

04/23/07 12:43:50 changed by mekstran

  • priority changed from major to critical.

04/23/07 12:43:56 changed by mekstran

  • priority changed from critical to blocker.

04/24/07 17:13:48 changed by mekstran

(In [2009]) References #445. Buildable but non-functional code to implement properties as saved objects.

04/26/07 10:30:03 changed by mekstran

(In [2011]) Cleared up a number of segfaults, and fixed the NULL_CHECK_SEGFAULT support. Refs #445.

04/26/07 13:27:07 changed by mekstran

(In [2013]) Refs #445. Much work towards working-again-ness, but properties still aren't showing up. Time to head in a different direction to try fix them.

04/27/07 13:58:11 changed by mekstran

  • blocking changed from 365,312 to 365,312,431.

This blocks #431, simply because #431 will depend on some refactorings that have only happened in the saved-objects-everywhere branch.

04/28/07 13:56:54 changed by mekstran

(In [2026]) Refs #445. Fixed many bugs, including the no-network-devices bug and some get_status bugs.

04/28/07 14:56:24 changed by mekstran

(In [2029]) Refs #445. Some initial work on a child_objects.

04/28/07 15:05:08 changed by mekstran

(In [2030]) Merged revisions 2001-2003,2005-2017,2019-2021,2023-2029 via svnmerge from svn+ssh://sss.scl.ameslab.gov/sss/svn/goanna/branches/saved-objects-everywhere

References #445.

This merges in the significant refactorings of the saved-objects-everywhere branch; #445 should be finished off as we work on the data manager.

................

r2001 | mekstran | 2007-04-20 17:45:00 -0500 (Fri, 20 Apr 2007) | 31 lines

Merged revisions 1864-1869,1872-1886,1888-1891,1893-1914,1916,1918,1920-1975,1977-1995,1997-2000 via svnmerge from svn+ssh://sss/sss/svn/goanna/branches/saved-objects-everywhere

Merged the renames, etc. that Brandon did into the trunk. #445 will progress from here, probably with a new branch.

........

r1864 | bshearer | 2007-03-23 17:57:57 -0500 (Fri, 23 Mar 2007) | 1 line

References #445. Branch to implement using SavedObjects? everywhere in the Model.

........

r1891 | mekstran | 2007-03-28 10:28:01 -0500 (Wed, 28 Mar 2007) | 3 lines

Blocked revisions 1882-1884 via svnmerge

........

r1941 | bshearer | 2007-04-06 15:36:27 -0500 (Fri, 06 Apr 2007) | 1 line

References #450 With the move of SavedObject? code to its own files, some fixes to the member variable names were excluded. This indicates the completion of that fix for the new SavedObject? files.

........

r1942 | bshearer | 2007-04-06 15:38:51 -0500 (Fri, 06 Apr 2007) | 1 line

Added SavedObject?.h and SavedObject?.cpp to svn

........

r1973 | bshearer | 2007-04-12 15:34:56 -0500 (Thu, 12 Apr 2007) | 1 line

Added to aide in the name changes.

........

r1975 | bshearer | 2007-04-12 16:19:12 -0500 (Thu, 12 Apr 2007) | 1 line

xxxxObjectxxxx related classes names changed to xxxxVObjectxxxx

........

................

r2003 | mekstran | 2007-04-20 17:48:16 -0500 (Fri, 20 Apr 2007) | 2 lines

References #445. Re-branched to resume work on this.

................

r2007 | mekstran | 2007-04-23 12:39:13 -0500 (Mon, 23 Apr 2007) | 3 lines

Initialized merge tracking via "svnmerge" with revisions "1-2002" from svn+ssh://sss/sss/svn/goanna/trunk

................

r2009 | mekstran | 2007-04-24 17:13:48 -0500 (Tue, 24 Apr 2007) | 2 lines

References #445. Buildable but non-functional code to implement properties as saved objects.

................

r2011 | mekstran | 2007-04-26 10:30:02 -0500 (Thu, 26 Apr 2007) | 2 lines

Cleared up a number of segfaults, and fixed the NULL_CHECK_SEGFAULT support. Refs #445.

................

r2012 | mekstran | 2007-04-26 10:33:04 -0500 (Thu, 26 Apr 2007) | 2 lines

Updated a TODO comment.

................

r2013 | mekstran | 2007-04-26 13:27:07 -0500 (Thu, 26 Apr 2007) | 2 lines

Refs #445. Much work towards working-again-ness, but properties still aren't showing up. Time to head in a different direction to try fix them.

................

r2014 | mekstran | 2007-04-27 13:56:06 -0500 (Fri, 27 Apr 2007) | 2 lines

A highly broken refactor of the NodeViewer to attempt to comprehend it. Bugfixes now needed!

................

r2015 | mekstran | 2007-04-27 13:59:35 -0500 (Fri, 27 Apr 2007) | 2 lines

Finishes off [2014], it was missing a file.

................

r2020 | mekstran | 2007-04-27 17:08:46 -0500 (Fri, 27 Apr 2007) | 2 lines

Some good work towards solidifying the new NodeViewer layout.

................

r2021 | mekstran | 2007-04-27 17:25:40 -0500 (Fri, 27 Apr 2007) | 2 lines

Minor formatting tweak.

................

r2024 | mekstran | 2007-04-28 12:52:07 -0500 (Sat, 28 Apr 2007) | 2 lines

Re-connected add node button.

................

r2025 | mekstran | 2007-04-28 13:01:09 -0500 (Sat, 28 Apr 2007) | 2 lines

some minor node-viewer glade tweaks.

................

r2026 | mekstran | 2007-04-28 13:56:53 -0500 (Sat, 28 Apr 2007) | 2 lines

Refs #445. Fixed many bugs, including the no-network-devices bug and some get_status bugs.

................

r2027 | mekstran | 2007-04-28 14:30:01 -0500 (Sat, 28 Apr 2007) | 2 lines

More bugfixes! This refactoring and such is going fairly well.

................

r2028 | mekstran | 2007-04-28 14:36:33 -0500 (Sat, 28 Apr 2007) | 2 lines

Makes selection changes bail when no device is displayed in the NetworkDeviceViewer.

................

r2029 | mekstran | 2007-04-28 14:56:23 -0500 (Sat, 28 Apr 2007) | 2 lines

Refs #445. Some initial work on a child_objects.

................

04/28/07 15:07:44 changed by mekstran

  • blocking changed from 365,312,431 to 365,312.

This no longer blocks #431; the refactorings have been merged.

04/28/07 15:25:11 changed by mekstran

  • status changed from assigned to closed.
  • resolution set to fixed.

This is done enough to close. Further work will be done in #365.


Add/Change #445 (Make Model use SavedObjects everywhere)




Action