IOHandle::IOHandle(const char* fname, nitf::AccessFlags access, nitf::CreationFlags creation) throw (nitf::NITFException) : IOInterface(open(fname, access, creation)) { setManaged(false); }
nitf::SegmentMemorySource::SegmentMemorySource(const char * data, size_t size, nitf::Off start, int byteSkip, bool copyData) throw (nitf::NITFException) { setNative(nitf_SegmentMemorySource_construct(data, size, start, byteSkip, copyData, &error)); setManaged(false); }
IOHandle::IOHandle(const std::string& fname, nitf::AccessFlags access, nitf::CreationFlags creation) throw (nitf::NITFException) : IOInterface(open(fname.c_str(), access, creation)) { setManaged(false); }
MemoryIO::MemoryIO(size_t capacity) throw(nitf::NITFException) : IOInterface(create(NRT_MALLOC(capacity), capacity, true)) { // NOTE: We are telling the C layer to adopt this memory which means it // will use NRT_FREE() to deallocate it. So, we must allocate with // NRT_MALLOC(). setManaged(false); }
nitf::SegmentReaderSource::SegmentReaderSource(nitf::SegmentReader reader) throw (nitf::NITFException) { setNative(nitf_SegmentReaderSource_construct(reader.getNativeOrThrow(), &error)); setManaged(false); reader.setManaged(true); //TODO unmanage on deletion }
nitf::FileSource::FileSource(nitf::IOHandle & io, nitf::Off start, int numBytesPerPixel, int pixelSkip) throw(nitf::NITFException) { setNative(nitf_IOSource_construct(io.getNative(), start, numBytesPerPixel, pixelSkip, &error)); setManaged(false); io.setManaged(true); //TODO must release this on destruction }
nitf::MemorySource::MemorySource(const void* data, size_t size, nitf::Off start, int numBytesPerPixel, int pixelSkip) throw(nitf::NITFException) { setNative(nitf_MemorySource_construct(data, size, start, numBytesPerPixel, pixelSkip, &error)); setManaged(false); }
nitf::DirectBlockSource::DirectBlockSource(nitf::ImageReader& imageReader, nitf::Uint32 numBands) throw(nitf::NITFException) { setNative(nitf_DirectBlockSource_construct(this, &DirectBlockSource::nextBlock, imageReader.getNative(), numBands, &error)); setManaged(false); }
nitf::SegmentFileSource::SegmentFileSource(nitf::IOHandle & io, nitf::Off start, int byteSkip) throw (nitf::NITFException) { setNative(nitf_SegmentFileSource_constructIO(io.getNative(), start, byteSkip, &error)); setManaged(false); io.setManaged(true); //TODO unmanage on deletion }
nitf::FileSource::FileSource(const std::string& fname, nitf::Off start, int numBytesPerPixel, int pixelSkip) throw (nitf::NITFException) { setNative(nitf_FileSource_constructFile(fname.c_str(), start, numBytesPerPixel, pixelSkip, & error)); setManaged(false); }
nitf::RowSource::RowSource( nitf::Uint32 band, nitf::Uint32 numRows, nitf::Uint32 numCols, nitf::Uint32 pixelSize, nitf::RowSourceCallback *callback) throw(nitf::NITFException) : mBand(band), mNumRows(numRows), mNumCols(numCols), mPixelSize(pixelSize) { setNative(nitf_RowSource_construct(callback, &RowSource::nextRow, mBand, mNumRows, mNumCols * mPixelSize, &error)); setManaged(false); }
ImageSubheader::ImageSubheader() throw(nitf::NITFException) { setNative(nitf_ImageSubheader_construct(&error)); getNativeOrThrow(); setManaged(false); }
nitf::HashTable::HashTable(int nbuckets) throw(nitf::NITFException) { setNative(nitf_HashTable_construct(nbuckets, &error)); getNativeOrThrow(); setManaged(false); }
MemoryIO::MemoryIO(void* buffer, size_t size, bool adopt) throw(nitf::NITFException) : IOInterface(create(buffer, size, adopt)) { setManaged(false); }
nitf::PixelSkip::PixelSkip(nitf::Uint32 rowSkip, nitf::Uint32 colSkip) throw (nitf::NITFException) { setNative(nitf_PixelSkip_construct(rowSkip, colSkip, &error)); setManaged(false); }
nitf::Select2DownSample::Select2DownSample(nitf::Uint32 rowSkip, nitf::Uint32 colSkip) throw (nitf::NITFException) { setNative(nitf_Select2DownSample_construct(rowSkip, colSkip, &error)); setManaged(false); }
CustomIO::CustomIO() : IOInterface(createInterface(this)) { setManaged(false); }