Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Purpose: PCIDSK External Database Interface declaration. This provides 4 : * mechanisms for access to external linked image file formats. 5 : * 6 : ****************************************************************************** 7 : * Copyright (c) 2010 8 : * PCI Geomatics, 90 Allstate Parkway, Markham, Ontario, Canada. 9 : * 10 : * Permission is hereby granted, free of charge, to any person obtaining a 11 : * copy of this software and associated documentation files (the "Software"), 12 : * to deal in the Software without restriction, including without limitation 13 : * the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 : * and/or sell copies of the Software, and to permit persons to whom the 15 : * Software is furnished to do so, subject to the following conditions: 16 : * 17 : * The above copyright notice and this permission notice shall be included 18 : * in all copies or substantial portions of the Software. 19 : * 20 : * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 : * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 : * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 : * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 : * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 : * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 : * DEALINGS IN THE SOFTWARE. 27 : ****************************************************************************/ 28 : #ifndef INCLUDE_PCIDSK_EDB_H 29 : #define INCLUDE_PCIDSK_EDB_H 30 : 31 : #include "pcidsk_config.h" 32 : 33 : #include <string> 34 : 35 : namespace PCIDSK 36 : { 37 : /************************************************************************/ 38 : /* EDBFile */ 39 : /************************************************************************/ 40 : 41 : //! External Database Interface class. 42 : 43 : class EDBFile 44 : { 45 : public: 46 0 : virtual ~EDBFile() {} 47 : virtual int Close() const = 0; 48 : 49 : virtual int GetWidth() const = 0; 50 : virtual int GetHeight() const = 0; 51 : virtual int GetChannels() const = 0; 52 : virtual int GetBlockWidth(int channel ) const = 0; 53 : virtual int GetBlockHeight(int channel ) const = 0; 54 : virtual eChanType GetType(int channel ) const = 0; 55 : virtual int ReadBlock(int channel, 56 : int block_index, void *buffer, 57 : int win_xoff=-1, int win_yoff=-1, 58 : int win_xsize=-1, int win_ysize=-1 ) = 0; 59 : virtual int WriteBlock( int channel, int block_index, void *buffer) = 0; 60 : }; 61 : 62 : EDBFile PCIDSK_DLL *DefaultOpenEDB(const std::string& filename, 63 : const std::string& access); 64 : } // end namespace PCIDSK 65 : 66 : #endif // INCLUDE_PCIDSK_EDB_H