From 9e613ae8a3cd7994194d2d709f6ff9b88feac70b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 31 Oct 2020 22:44:28 +0100 Subject: Add Data class and change API to a raw pointer. --- src/array_data.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/array_data.h') 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 #include #include 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 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 -- cgit v1.2.3