ColumnField.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* ---------------------------------------------------------------------------
  2. Nullsoft Database Engine
  3. --------------------
  4. codename: Near Death Experience
  5. --------------------------------------------------------------------------- */
  6. /* ---------------------------------------------------------------------------
  7. ColumnField Class Prototypes
  8. Android (linux) 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, const char *FieldName, unsigned char FieldType, Table *parentTable);
  20. ColumnField();
  21. ~ColumnField();
  22. virtual void ReadTypedData(const uint8_t *, size_t len);
  23. virtual void WriteTypedData(uint8_t *, size_t len);
  24. virtual size_t GetDataSize(void);
  25. virtual int Compare(Field *Entry);
  26. void InitField(void);
  27. void SetDataType(unsigned char type);
  28. bool IsSearchableField() const;
  29. void SetSearchable(bool val);
  30. public:
  31. unsigned char GetDataType(void);
  32. char *GetFieldName(void); // not const because it's an NDE string
  33. protected:
  34. bool searchable;
  35. char *Name;
  36. unsigned char MyType;
  37. };
  38. #endif