blob.pxd 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. from libcpp cimport bool as bool_t
  2. from util.generic.string cimport TString
  3. from util.system.types cimport ui8
  4. cdef extern from "util/memory/blob.h" nogil:
  5. cdef cppclass TBlob:
  6. TBlob()
  7. TBlob(const TBlob&)
  8. void Swap(TBlob& r)
  9. const void* Data() const
  10. size_t Size() const
  11. bool_t Empty() const
  12. bool_t IsNull() const
  13. const char* AsCharPtr() const
  14. const unsigned char* AsUnsignedCharPtr() const
  15. void Drop()
  16. TBlob SubBlob(size_t len) except +
  17. TBlob SubBlob(size_t begin, size_t end) except +
  18. TBlob DeepCopy() except +
  19. @staticmethod
  20. TBlob NoCopy(const void* data, size_t length) except +
  21. @staticmethod
  22. TBlob Copy(const void* data, size_t length) except +
  23. @staticmethod
  24. TBlob FromFile(const TString& path) except +
  25. @staticmethod
  26. TBlob PrechargedFromFile(const TString& path) except +
  27. @staticmethod
  28. TBlob FromString(const TString& s) except +
  29. ui8& operator[](size_t) const
  30. TBlob& operator=(TBlob&)