1
0

ifc_metadata_editor.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include "foundation/dispatch.h"
  3. #include "nx/nxstring.h"
  4. #include "foundation/error.h"
  5. #include "metadata/MetadataKeys.h"
  6. #include "nx/nxdata.h"
  7. #include "metadata/types.h"
  8. class NOVTABLE ifc_metadata_editor : public Wasabi2::Dispatchable
  9. {
  10. protected:
  11. ifc_metadata_editor() : Dispatchable(DISPATCHABLE_VERSION) {}
  12. ~ifc_metadata_editor() {}
  13. public:
  14. enum
  15. {
  16. INDEX_DEFAULT = -1,
  17. };
  18. int Save() { return MetadataEditor_Save(); }
  19. /* Fields */
  20. int SetField(int field, unsigned int index, nx_string_t value) { return MetadataEditor_SetField(field, index, value); }
  21. int SetInteger(int field, unsigned int index, int64_t value) { return MetadataEditor_SetInteger(field, index, value); }
  22. int SetReal(int field, unsigned int index, double value) { return MetadataEditor_SetReal(field, index, value); }
  23. /* Art */
  24. int SetArtwork(int field, unsigned int index, artwork_t *data, data_flags_t flags=DATA_FLAG_ALL) { return MetadataEditor_SetArtwork(field, index, data, flags); }
  25. /* Binary Data */
  26. enum
  27. {
  28. DISPATCHABLE_VERSION,
  29. };
  30. protected:
  31. virtual int WASABICALL MetadataEditor_Save()=0;
  32. virtual int WASABICALL MetadataEditor_SetField(int field, unsigned int index, nx_string_t value)=0;
  33. virtual int WASABICALL MetadataEditor_SetInteger(int field, unsigned int index, int64_t value)=0;
  34. virtual int WASABICALL MetadataEditor_SetReal(int field, unsigned int index, double value)=0;
  35. virtual int WASABICALL MetadataEditor_SetArtwork(int field, unsigned int index, artwork_t *data, data_flags_t flags)=0;
  36. };