ColumnField.h 1.2 KB

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