///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2024- Equinor ASA // // ResInsight is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. // // See the GNU General Public License at // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #undef signals #include #include #include #include #define signals Q_SIGNALS #include #include //================================================================================================== /// //================================================================================================== class RifByteArrayArrowRandomAccessFile : public arrow::io::RandomAccessFile { public: RifByteArrayArrowRandomAccessFile( const QByteArray& data ); arrow::Result ReadAt( int64_t position, int64_t nbytes, void* out ) override; arrow::Result> ReadAt( int64_t position, int64_t nbytes ) override; arrow::Result Read( int64_t nbytes, void* out ) override; arrow::Result> Read( int64_t nbytes ) override; arrow::Result GetSize() override; arrow::Result Tell() const override; arrow::Status Seek( int64_t position ) override; arrow::Status Close() override; bool closed() const override; private: const QByteArray& m_data; bool m_closed; int64_t m_position; };