home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / indexing / IXAttributeParser.h next >
Text File  |  1992-03-22  |  2KB  |  70 lines

  1. /*
  2. IXAttributeParser.h
  3. Copyright 1991, NeXT Computer, Inc.
  4. */
  5.  
  6. #import    <objc/Object.h>
  7. #import    <objc/hashtable.h>
  8.  
  9. @class List, IXWeightingDomain;
  10.  
  11. extern NXAtom    IXAttributeReaderPboardType;
  12. extern NXAtom    IXFileDescriptionPboardType;
  13.  
  14. typedef enum {
  15.     IX_NoWeighting = 0, 
  16.     IX_AbsoluteWeighting, IX_FrequencyWeighting, IX_PeculiarityWeighting 
  17. } IXWeightingType;
  18.  
  19. @interface IXAttributeParser: Object
  20. {
  21.     BOOL        _tokenUniquing;
  22.     NXHashTable        *_sourceTypes;
  23.     id            _attributeBinder;
  24.     id            _fileConverter;
  25.     List        *_attributeMapping;
  26.     List        *_attributeReaders;
  27.     IXWeightingType    _weightingType;
  28.     IXWeightingDomain    *_weightingDomain;
  29.     unsigned        _minimumWeight;
  30.     unsigned        _percentPassed;
  31. }
  32.  
  33. - getAttributeReaders:(List *)aList;
  34. - setAttributeReaders:(List *)aList;
  35.  
  36. - (BOOL)understandsType:(const char *)type; // always yes until types added
  37. - addSourceType:(const char *)type; // adds to set of understood types
  38. - removeSourceType:(const char *)type; // removes a previously added type
  39.  
  40. @end
  41.  
  42. @interface IXAttributeParser(Parsing)
  43.  
  44. - reset; // clears the accumulated attribute bindings
  45.  
  46. - parseFile:(const char *)filename ofType:(const char *)type;
  47. - parseStream:(NXStream *)stream ofType:(const char *)type;
  48.  
  49. - (NXStream *)analyzeFile:(const char *)filename ofType:(const char *)type;
  50. - (NXStream *)analyzeStream:(NXStream *)stream ofType:(const char *)type;
  51.  
  52. @end
  53.  
  54. @interface IXAttributeParser(Configuration)
  55.  
  56. - (unsigned)minimumWeight; // returns minimum weight
  57. - setMinimumWeight:(unsigned)aMinimum; // sets minimum weight
  58.  
  59. - (unsig`percentPassed; // returns per centage passed
  60. - setPercentPassed:(unsigned)aPercent; // sets per centage passed
  61.  
  62. - (IXWeightingDomain *)weightingDomain; // returns weighting domain
  63. - setWeightingDomain:(IXWeightingDomain *)aDomain; // sets weighting domain
  64.  
  65. - (IXWeightingType)weightingType; // returns weighting type 
  66. - setWeightingType:(IXWeightingType)type; // sets weighting type
  67.  
  68. @end
  69.  
  70.