libpcidsk

pcidsk_io.h

00001 /******************************************************************************
00002  *
00003  * Purpose:  PCIDSK I/O Interface declaration. The I/O interfaces for the
00004  *           library can be overridden by an object implementing this class.
00005  * 
00006  ******************************************************************************
00007  * Copyright (c) 2009
00008  * PCI Geomatics, 50 West Wilmot Street, Richmond Hill, Ont, Canada
00009  *
00010  * Permission is hereby granted, free of charge, to any person obtaining a
00011  * copy of this software and associated documentation files (the "Software"),
00012  * to deal in the Software without restriction, including without limitation
00013  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00014  * and/or sell copies of the Software, and to permit persons to whom the
00015  * Software is furnished to do so, subject to the following conditions:
00016  *
00017  * The above copyright notice and this permission notice shall be included
00018  * in all copies or substantial portions of the Software.
00019  *
00020  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00021  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00022  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00023  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00024  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00025  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00026  * DEALINGS IN THE SOFTWARE.
00027  ****************************************************************************/
00028 #ifndef __INCLUDE_PCIDSK_IO_H
00029 #define __INCLUDE_PCIDSK_IO_H
00030 
00031 #include "pcidsk_config.h"
00032 
00033 #include <string>
00034 
00035 namespace PCIDSK
00036 {
00037 /************************************************************************/
00038 /*                             IOInterfaces                             */
00039 /************************************************************************/
00040 
00042 
00043     class IOInterfaces
00044     {
00045     public:
00046         virtual ~IOInterfaces() {}
00047         virtual void   *Open( std::string filename, std::string access ) const = 0;
00048         virtual uint64  Seek( void *io_handle, uint64 offset, int whence ) const = 0;
00049         virtual uint64  Tell( void *io_handle ) const = 0;
00050         virtual uint64  Read( void *buffer, uint64 size, uint64 nmemb, void *io_handle ) const = 0;
00051         virtual uint64  Write( const void *buffer, uint64 size, uint64 nmemb, void *io_handle ) const = 0;
00052         virtual int     Eof( void *io_handle ) const = 0;
00053         virtual int     Flush( void *io_handle ) const = 0;
00054         virtual int     Close( void *io_handle ) const = 0;
00055     };
00056 
00057     const IOInterfaces PCIDSK_DLL *GetDefaultIOInterfaces();
00058 
00059 } // end namespace PCIDSK
00060 
00061 #endif // __INCLUDE_PCIDSK_IO_H

Generated for GDAL by doxygen 1.7.3.