IndexField.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* ---------------------------------------------------------------------------
  2. Nullsoft Database Engine
  3. --------------------
  4. codename: Near Death Experience
  5. --------------------------------------------------------------------------- */
  6. /* ---------------------------------------------------------------------------
  7. IndexField Class Prototypes
  8. --------------------------------------------------------------------------- */
  9. #ifndef __INDEXFIELD_H
  10. #define __INDEXFIELD_H
  11. class IndexField : public Field
  12. {
  13. public:
  14. IndexField(unsigned char id, int Pos, int type, CFStringRef FieldName);
  15. IndexField();
  16. ~IndexField();
  17. virtual void ReadTypedData(const uint8_t *, size_t len);
  18. virtual void WriteTypedData(uint8_t *, size_t len);
  19. virtual size_t GetDataSize(void);
  20. virtual int Compare(Field *Entry);
  21. void InitField(void);
  22. CFStringRef GetIndexName(void);
  23. int TranslateToIndex(int Id, IndexField *index);
  24. Index *index; // TODO: make protected
  25. protected:
  26. int Position;
  27. int DataType;
  28. CFStringRef Name;
  29. };
  30. #endif