home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / NextDeveloper / Examples / IndexingKit / Ledger / JFTableVectorConfiguration.h < prev    next >
Encoding:
Text File  |  1993-01-25  |  2.6 KB  |  81 lines

  1.  
  2. /* 
  3.  *    JFTableVectorConfiguration
  4.  *    Written by Joe Freeman
  5.  *
  6.  *    A list of these configuration objects is fed to a JFTableViewLoader
  7.  *    to tell it what ivars and titles map into a DBTableView
  8.  */
  9. #import <appkit/appkit.h>
  10.  
  11. @interface JFTableVectorConfiguration:Object
  12. {
  13.     /* vars in this block are archived */
  14.     const char *templateName;    /* class name of the template */
  15.     const char *title;
  16.     const char *ivarName;
  17.     
  18.     /* these are cached so only figure out once */
  19.     BOOL    kindOfStringTable;    /* funny hack put in for kris */
  20.     Ivar    ivarInfo;        /* ivar_name ,ivar_type, ivar_offset */
  21.     SEL    setMethod;
  22.     SEL    getMethod;
  23.     Class    template;        /* only used when rebuilding */
  24. }
  25.  
  26. /*======================================================================
  27.  *    designated initializer
  28.  *======================================================================*/
  29.  
  30. - initDataClassName:(const char *)aString 
  31.     titleName:(const char *)newTitle 
  32.     ivarName:(const char *)newIvar;
  33.  
  34. /*======================================================================
  35.  *    setup methods for this configuration object
  36.  *======================================================================*/
  37.  
  38.     /* we give the class by name, because we continue to try and look
  39.      * up the class, so we can configure this object without the data
  40.      * class being linked into the application
  41.      */
  42. - setDataClassName:(const char *)aString;
  43.     /* this will become the title of the column */
  44. - setTitle:(const char *)newTitle;    /* DOES NOT MAKE COPY */
  45.     /* this supports a special case.  subclass of NXStringTable
  46.      * may put the key to one of their elements here instead of an ivar
  47.      * this class looks to see if it is a subclass of an NXStringTable
  48.      */
  49. - setIvarName:(const char *)newIvar;    /* DOES NOT MAKE COPY */
  50.  
  51. - (const char *)dataClassName;
  52. - (const char *)title;
  53. - (const char *)ivarName;
  54.  
  55. /*======================================================================
  56.  *    archiving support (for the palette!)
  57.  *======================================================================*/
  58.  
  59. - awake;
  60. - read:(NXTypedStream *)typedStream;
  61. - write:(NXTypedStream *)typedStream;
  62.  
  63.  
  64. /*======================================================================
  65.  *    use this thing to transfer data from dbvalues to datastore objects
  66.  *======================================================================*/
  67.  
  68. /*
  69.  * Load up the DBValue object (aValue) from the portion of the 
  70.  * dataObject specified by this configuration object
  71.  */
  72. - getValueFromObject:dataObject into:aValue;
  73.  
  74. /*
  75.  * save the dbvalue object into the portion of the data object specified by
  76.  * this configuration object 
  77.  */
  78. - setValueForObject:dataObject from:aValue;
  79.  
  80. @end
  81.