FileInMemory_def.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* FileInMemory_def.h
  2. *
  3. * Copyright (C) 2017 David Weenink
  4. *
  5. * This code is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * This code is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #define ooSTRUCT FileInMemory
  19. oo_DEFINE_CLASS (FileInMemory, Daata)
  20. oo_LSTRING (d_path)
  21. oo_LSTRING (d_id)
  22. oo_INTEGER (d_numberOfBytes)
  23. oo_INTEGER (d_position)
  24. oo_INTEGER (d_errno)
  25. oo_INT32 (ungetChar)
  26. #if oo_DESTROYING
  27. if (! _dontOwnData) {
  28. oo_UBYTE_VECTOR_FROM (d_data, 0, d_numberOfBytes)
  29. }
  30. #else
  31. oo_UBYTE_VECTOR_FROM (d_data, 0, d_numberOfBytes) // final null byte possible
  32. #endif
  33. oo_UBYTE (writable)
  34. #if oo_DECLARING || oo_DESCRIBING
  35. oo_UBYTE (_dontOwnData)
  36. #endif
  37. #if oo_DECLARING
  38. void v_info () override;
  39. #endif
  40. oo_END_CLASS (FileInMemory)
  41. #undef ooSTRUCT
  42. /* End of file FileInMemory_def.h */