ColumnField.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* ---------------------------------------------------------------------------
  2. Nullsoft Database Engine
  3. --------------------
  4. codename: Near Death Experience
  5. --------------------------------------------------------------------------- */
  6. /* ---------------------------------------------------------------------------
  7. ColumnField Class Prototypes
  8. Mac OS X implementation
  9. --------------------------------------------------------------------------- */
  10. #ifndef __COLUMNFIELD_H
  11. #define __COLUMNFIELD_H
  12. #include "Field.h"
  13. #include "LinkedList.h"
  14. #include "Table.h"
  15. #include "Scanner.h"
  16. class ColumnField : public Field
  17. {
  18. public:
  19. ColumnField(unsigned char FieldID, CFStringRef FieldName, unsigned char FieldType, Table *parentTable);
  20. ColumnField();
  21. ~ColumnField();
  22. /* Field implementation */
  23. virtual void ReadTypedData(const uint8_t *, size_t len);
  24. virtual void WriteTypedData(uint8_t *, size_t len);
  25. virtual size_t GetDataSize(void);
  26. virtual int Compare(Field *Entry);
  27. /* ColumnField methods */
  28. void InitField(void);
  29. void SetDataType(unsigned char type);
  30. bool IsSearchableField() const;
  31. void SetSearchable(bool val);
  32. unsigned char GetDataType(void);
  33. CFStringRef GetFieldName(void);
  34. protected:
  35. bool searchable;
  36. CFStringRef Name;
  37. unsigned char MyType;
  38. };
  39. #endif