Hi Wayne,

  Your diagram makes me see that Sparky is all links and no data!

  Here are some comments about the C++ classes in Sparky and your diagram.
I counted 190 classes using

	% grep "^class " *.h *.cc | grep -v \;\$

to find all lines beginning with class and not ending with semi-colon.
There are 81 classes defined in header files, and 109 internally in *.cc
files.

  One of the key ugly aspects of Sparky is that the NMR data objects
are not separate from the application/graphics state.  For example a
CrossPeak holds both NMR data like assignments and position, and
graphics state like the drawing color.  Having a separate NMR data
cross peak, and a graphics object cross peak would be cleaner but more
complex.  With that division I could have different view windows for
the same spectrum show the peak marker with different size or color
which is not possible now.  One of the added complexities would be
that many changes of the NMR data state have to notify the graphics
state objects so they can redraw (eg. peak position moved).  Those
notifications are easier to handle if the NMR data peak and the
graphics peak is the same object.

  I list the Sparky classes below with minus signs next to the ones
not in your diagram.  I think your diagram has included all the NMR
data classes except the many subclasses of Block_File (Bruker_Block_File,
NIH_Block_File, ...) and NMR_Data (Projected_NMR_Data, Permuted_NMR_Data,
...)  These aren't essential if you are concerned mostly with Sparky
output data rather than input data.  The other classes not in your
diagram are mostly application / user interface stuff like spectrum
view windows and dialogs for many features.  Also there are some generic
objects, List, Table, Stringy, SPoint, ..., and window system objects.

  Here are some errors in your diagram:

Should not be connected:
	Atom_Entry	Atom

Should be connected:
	Dialog_Table 1		Dialog *
	Command_Dispatcher 1	Accelerator *
	Spectrum *		Molecule 1
	Spectrum *		Condition 1
	Spectrum 1		SpectrumData 1

Wrong multiplicity:
	Dialog_Table 1	Session 1
	Notifier 1	Session 1
	CrossPeak 0..1	Label 0..1

Many links are uni-directional.  I think this is pretty important to
indicate.  For instance, the following links confused me:
	Session		Dialog
	Session		Accelerator
	Spectrum	ContourPlane
I thought these were wrong at first because the diagram suggested
the object on the left pointed to the one on the right which is not
true.  Only the links in the opposite direction exist.

Another aspect that the diagram does not convey that is important
for understanding Sparky code is ownership.  There is a tree structure
to the objects.  The practical significance of the tree structure is
that parents delete their children when they are deleted.  It is also
the way I think about the objects being connected when I am programming.
The tree could be deduced from looking at destructors.  Here's the basics:

	Session
	  Command_Dispatcher
	  Notifier
	  Dialog_Table
	  WinSys
	  Project
	    Molecule
              Atom
	      Group
	      Condition
                Resonance
	    Spectrum
	      Peak
              PeakGp
	    Contour_Cache
	    Memory_Cache

There are backward links going up the tree so indicating uni-directional
links is not sufficient to understand the ownership (= object lifetime)
tree.

The AttachedData class was added for Python features to attach extra
data to Spectrum, Molecule, and Project classes that will be saved in
the session files.  It is used more for application data than NMR data
so you might want to omit it from your diagram.

Assignment_Guess and Guess_Assignments I think of as application data
rather than NMR data.  They are calculated results that are not saved
in the session files.  You may want to take them out of the diagram.

In Guess_Assignments the any_group, this_group, no_group, ... are
symbolic constants used as arguments for some methods.  They could
just as well be enum values.  They probably don't belong as attributes
in your diagram.

I looked at the diagram for missing class attributes and checked a
few header files but did not do a thorough check.  All those I looked
at were complete in your diagram.

Have a good trip to RCSB,

	Tom



List of classes
---------------

Minus sign indicates not in your diagram.

assignguess.h
	Guess_Assignments
	Assignment_Guess
assignguess.cc
-	assignment_guess_compare : public ListOrder
atom.h
	Atom
attacheddata.h
	AttachedData
axismap.h
-	Axis_Map
blockfile.h
	Block_File
blockfile.cc
	Data_Block
-	Packed_Block_File : public Block_File
brukerfile.cc
-	Bruker_Block_File : public Block_File
-	Bruker_Params
color.h
	Color
command.h
	Command_Dispatcher
command.cc
	Accelerator
-	Accelerator_List
condition.h
	Condition
contour.h
	Contour_Levels
-	Drawing_Routines
contour.cc
	Contour_Cache
contourplane.h
	ContourPlane
contourplane.cc
-	calculate_contours
contourstream.h
-	ContourStream
crosspeak.h
	CrossPeak : public Ornament
dataregion.h
-	Data_Region
-	Marked_Region : public Data_Region
format.cc
-	View_Parameters
-	Ornament_Properties
grid.h
	Grid : public Ornament
group.h
	Group
integrate.h
-	Integration_Parameters
label.h
	Label : public Ornament
line.h
	Line : public Ornament
linefit.cc
-	LinefitPeak
-	LinefitVolume
list.h
-	List
-	ListOrder
memcache.h
	Memory_Cache
memcache.cc
	Cache_Entry
model.h
	Model
model.cc
	Atom_Entry
molecule.h
	Molecule
molecule.cc
-	String_Pair
nihfile.cc
-	NIH_Block_File : public Block_File
nmrdata.h
	NMR_Data
nmrdata.cc
-	Permuted_NMR_Data : public NMR_Data
-	NMR_Data_Subregion : public NMR_Data
-	Thresholded_NMR_Data : public NMR_Data
-	Squished_NMR_Data : public NMR_Data
-	Projected_NMR_Data : public NMR_Data
-	NMR_Data_Plane : public NMR_Data
-	Dataless_NMR_Data : public NMR_Data
	Block_File_NMR_Data : public NMR_Data
notifier.h
	Notifier
notifier.cc
-	Notification
objectid.h
-	Object_Table
objectid.cc
-	typed_pointer
ornament.h
	Ornament
-	ODraw
peak.h
	Peak : public CrossPeak
peakgp.h
	PeakGp : public CrossPeak
peakpick.h
-	Peak_Pick_Parameters
peaks2ucsf.cc
-	gaussian_parameters
-	Peak_NMR_Data : public NMR_Data
-	Peak_Block_Data : public Block_File
print.h
-	Print_Options
print.cc
-	Printing_Routines : public Drawing_Routines
project.h
	Preferences
	Project
-	view_axis
project.cc
-	Overlay
python.cc
-	Attribute_Name
-	Attribute_Method
-	C_Python_Map
-	Python_Callback
-	Notifier_Callback : public Python_Callback
-	Python_Input_Callback : public Python_Callback
rectangle.h
-	Rectangle
region.h
-	Region2
reporter.h
	Reporter
resonance.h
	Resonance
resonance.cc
-	compare_aliased_resonances: public ListOrder
-	compare_resonance_distance : public ListOrder
savefile.h
-	SaveFile
session.h
	Session
session.cc
	Session_Reporter : public Reporter
spectrum.h
	Spectrum : public SpectrumData
spectrumdata.h
	SpectrumData
spoint.h
-	SPoint
-	SRegion
-	IPoint
-	IRegion
-	Subarray_Iterator
stringc.h
-	Stringy
table.h
-	Table
uiassign.cc
-	assignment_dialog : public Dialog
uiassigncopy.cc
-	assignment_copy_dialog : public Dialog
uicolor.cc
-	color_dialog : public Dialog
uicomponents.h
-	Spectrum_Menu
-	View_Menu
-	Condition_Menu
-	Condition_Field
-	Molecule_Field
-	Resonance_Field
-	ContourScale : public edge_panel
uicontour.cc
-	contour_dialog : public Dialog
uidatalocation.cc
-	data_location_dialog : public Dialog
uidialog.h
	Dialog
uidialog.h
	Dialog_Table
uidrawing.h
-	Drawing
uiepanel.h
-	edge_panel
uiguess.cc
-	guess_dialog : public Dialog
uiintegrate.cc
-	integration_dialog : public Dialog
uilabel.cc
-	label_dialog : public Dialog
uimain.cc
-	main_dialog : public Dialog
-	Query_Dialog
uimenu.cc
-	Menu_Entry
uimidas.cc
-	midas_connection
-	midas_dialog : public Dialog
uimode.cc
-	mode_dialog : public Dialog
uinote.cc
-	note_dialog : public Dialog
uiornament.cc
-	ornament_dialog : public Dialog
uiornamentsize.cc
-	ornament_size_dialog : public Dialog
uioverlay.cc
-	overlay_dialog : public Dialog
uipeak.cc
-	peak_list_dialog : public Dialog
-	spectrum_peaks_dialog : public peak_list_dialog
-	resonance_peaks_dialog : public peak_list_dialog
uipick.cc
-	pick_dialog : public Dialog
uipkpanel.h
-	Peak_Panel : public edge_panel
uiplop.h
-	Peak_List_Options
uiplop.cc
-	peak_list_options_dialog : public Dialog
-	axis_comparitor : public ListOrder
-	pairx_comparitor : public ListOrder
uipredefined.cc
-	predefined_resonance_dialog : public Dialog
uipreference.cc
-	preference_dialog : public Dialog
uiprint.cc
-	print_dialog : public Dialog
uiregion.h
-	View_Region
-	View_Regions
uiregion.cc
-	region_dialog : public Dialog
uirename.cc
-	rename_dialog : public Dialog
uiresonances.cc
-	resonance_list_dialog : public Dialog
uirpanel.h
-	RPanel : public edge_panel
-	Panel_String
uiscale.h
-	Scale : public edge_panel
uishifts.cc
-	resonance_table_dialog : public Dialog
uislice.h
-	Slice : public edge_panel
uispectrum.cc
-	spectrum_dialog : public Dialog
uisync.cc
-	sync_dialog : public Dialog
uiview.h
-	Contour_Parameters
-	View_Settings
-	View : public View_Window
uiview.cc
-	Ornament_Routines : public ODraw
-	Screen_Routines : public Drawing_Routines
-	Overlay_Routines : public Drawing_Routines
uiviewdepth.cc
-	view_depth_dialog : public Dialog
uiviewlist.cc
-	hide_dialog : public Dialog
uiviewopt.cc
-	view_dialog : public Dialog
uiviewwin.h
-	View_Window : public Drawing
uiviewwin.cc
-	ZScroll
uiwait.cc
-	wait_dialog
-	wait_cb : public Wait
undo.h
-	Undo
varianfile.cc
-	VNMR_2D_Block_File : public Block_File
-	VNMR_3D_Block_File : public Block_File
-	procpar
wait.h
-	Wait
winsystem.h
	WinSys
-	Drawing_Window
winsystem-all.cc
	WinSysP
-	WinSys_Widget
-	Work_Proc
-	Work_Proc_Manager
-	Event_Callback
-	Event_Callback_Table
-	Timer_Callback
-	Timer_Callback_List
-	Pointer_Pause
-	Pointer_Pause_List
-	Command_Callback
-	Variable_Callback : public Command_Callback
-	Variable_Callback_Manager
-	Scroll_Callback: public Command_Callback
-	Scroll_Callback_Table
-	Menu_Callback: public Command_Callback
-	Input_Callback
-	Input_Callback_Manager
-	Scaled_Font
-	Scaled_Font_Manager
-	DrawWinP
-	Color_Manager
