File:  [NeXTSTEP 3.3 examples] / Examples / IndexingKit / Ledger / JFTableVectorConfiguration.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:49:02 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3


/* 
 *	JFTableVectorConfiguration
 *	Written by Joe Freeman
 *
 *	A list of these configuration objects is fed to a JFTableViewLoader
 *	to tell it what ivars and titles map into a DBTableView
 */
#import <appkit/appkit.h>

@interface JFTableVectorConfiguration:Object
{
	/* vars in this block are archived */
	const char *templateName;	/* class name of the template */
	const char *title;
	const char *ivarName;
	
	/* these are cached so only figure out once */
	BOOL	kindOfStringTable;	/* funny hack put in for kris */
	Ivar	ivarInfo;		/* ivar_name ,ivar_type, ivar_offset */
	SEL	setMethod;
	SEL	getMethod;
	Class	template;		/* only used when rebuilding */
}

/*======================================================================
 *	designated initializer
 *======================================================================*/

- initDataClassName:(const char *)aString 
	titleName:(const char *)newTitle 
	ivarName:(const char *)newIvar;

/*======================================================================
 *	setup methods for this configuration object
 *======================================================================*/

	/* we give the class by name, because we continue to try and look
	 * up the class, so we can configure this object without the data
	 * class being linked into the application
	 */
- setDataClassName:(const char *)aString;
	/* this will become the title of the column */
- setTitle:(const char *)newTitle;	/* DOES NOT MAKE COPY */
	/* this supports a special case.  subclass of NXStringTable
	 * may put the key to one of their elements here instead of an ivar
	 * this class looks to see if it is a subclass of an NXStringTable
	 */
- setIvarName:(const char *)newIvar;	/* DOES NOT MAKE COPY */

- (const char *)dataClassName;
- (const char *)title;
- (const char *)ivarName;

/*======================================================================
 *	archiving support (for the palette!)
 *======================================================================*/

- awake;
- read:(NXTypedStream *)typedStream;
- write:(NXTypedStream *)typedStream;


/*======================================================================
 *	use this thing to transfer data from dbvalues to datastore objects
 *======================================================================*/

/*
 * Load up the DBValue object (aValue) from the portion of the 
 * dataObject specified by this configuration object
 */
- getValueFromObject:dataObject into:aValue;

/*
 * save the dbvalue object into the portion of the data object specified by
 * this configuration object 
 */
- setValueForObject:dataObject from:aValue;

@end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.