ftp.nice.ch/pub/next/text/apps/eText5.0.93.s.tar.gz#/eText5/Bookmark.subproj/eTBookmarkBinder.h

This is eTBookmarkBinder.h in view mode; [Download] [Up]

///////////////////////////////////////////////////////////////////////////////
//	FILENAME:	eTBookmarkBinder.h 
//	SUMMARY:	Appwide rendezvous point for bookmark management
//	SUPERCLASS:	Object
//	INTERFACE:	None
//	PROTOCOLS:	None
//	AUTHOR:		Rohit Khare
//	COPYRIGHT:	(c) 1994 California Institure of Technology, eText Project
///////////////////////////////////////////////////////////////////////////////
//  DESCRIPTION
//		The Binder enables 3 functions:
//			* when reading in an eText stream, matching up the beginning
//			  and ending tags for an anchor
//			* allowing link traversal to select a particular anchor in a doc.
//			* working with the eTBookmarkUI to present a list of anchors 
//			  a given doc. 
//		Ideally, we could have a binder for each document, but then we have
//	namespace problems, and we'd have to hardwire new functionality into the
//	kernel. Instead, [eTBookmarkBinder new] returns an appwide binder that
//	internally maintains a table of anchor tables.
//
//	TO DO
//		What are the memory management/integrity constraints on this solution?
//	It requires invariant and unique anchorID-annotation mappings.
//
//		What happens when bookmarks are destroyed/corrupted? memory corruption,
//	unpaired links... bookmark integrity checking?
//
//		What happens to a "stale" anchor-ref-- when the anchor don't exist?
///////////////////////////////////////////////////////////////////////////////
//	HISTORY
//	06/15/94:	Added dirty bit management. RK & TRZ
//	05/08/94:	Created. First actual implementation.
///////////////////////////////////////////////////////////////////////////////

#import "Bookmark.h"

@interface eTBookmarkBinder:Object 
{
	id	docTable;		// A hashtable of hashtables.
	id	anchorTable;	// master anchor concordance -- shortcut
	BOOL dirtyBit;
}

- registerBM:theBookmark ID:(long)anchorID inDoc:(long)docID;
- unregisterBM:theBookmark ID:(long)anchorID inDoc:(long)docID;
- getBookmarks:theStorage inDoc:(long)docID;
- bookmarkForID:(long)anchorID;
- (BOOL) isDirty;
@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.