diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-10-31 22:44:28 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-11-02 00:12:56 +0100 |
| commit | 9e613ae8a3cd7994194d2d709f6ff9b88feac70b (patch) | |
| tree | 40611aafec40f836ca23ef9b99093d526f9d43c1 /src/array_data.h | |
| parent | da15bff6e278d351301c9c50a4c96737ae4b5545 (diff) | |
Add Data class and change API to a raw pointer.
Diffstat (limited to 'src/array_data.h')
| -rw-r--r-- | src/array_data.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/array_data.h b/src/array_data.h index 06ccec27..09cfd09d 100644 --- a/src/array_data.h +++ b/src/array_data.h @@ -34,13 +34,16 @@ #ifndef LIBDCP_ARRAY_DATA_H #define LIBDCP_ARRAY_DATA_H + +#include "data.h" #include <boost/shared_array.hpp> #include <boost/filesystem.hpp> #include <stdint.h> namespace dcp { -class ArrayData + +class ArrayData : public Data { public: ArrayData (); @@ -51,11 +54,12 @@ public: virtual ~ArrayData () {} - void write (boost::filesystem::path file) const; - void write_via_temp (boost::filesystem::path temp, boost::filesystem::path final) const; + uint8_t const * data () const { + return _data.get(); + } - boost::shared_array<uint8_t> data () const { - return _data; + uint8_t * data () { + return _data.get(); } int size () const { @@ -72,8 +76,6 @@ private: int _size; }; -bool operator==(ArrayData const & a, ArrayData const & b); - } #endif |
