1
0

BinaryField.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* ---------------------------------------------------------------------------
  2. Nullsoft Database Engine
  3. --------------------
  4. codename: Near Death Experience
  5. --------------------------------------------------------------------------- */
  6. /* ---------------------------------------------------------------------------
  7. BinaryField Class Prototypes
  8. --------------------------------------------------------------------------- */
  9. #ifndef __BINARYFIELD_H
  10. #define __BINARYFIELD_H
  11. #include "../Field.h"
  12. #include <foundation/types.h>
  13. class BinaryField : public Field
  14. {
  15. protected:
  16. virtual void ReadTypedData(const uint8_t *, size_t len);
  17. virtual void WriteTypedData(uint8_t *, size_t len);
  18. virtual size_t GetDataSize(void);
  19. virtual int Compare(Field *Entry);
  20. virtual bool ApplyFilter(Field *Data, int flags);
  21. void InitField(void);
  22. uint8_t *Data;
  23. size_t Size;
  24. public:
  25. ~BinaryField();
  26. BinaryField(const uint8_t *Data, int len);
  27. BinaryField();
  28. const uint8_t *GetData(size_t *len);
  29. void SetData(const uint8_t *Data, size_t len);
  30. };
  31. #endif