OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
This is a generic stream registry. More...
#include <ossimStreamFactoryRegistry.h>
Classes | |
class | BufferInfo |
This is an internal class used to store the buffer information loaded from the preferences. More... | |
Public Member Functions | |
virtual | ~StreamFactoryRegistry () |
void | registerFactory (StreamFactoryBase *factory) |
Registers a stream factory. More... | |
void | unregisterFactory (StreamFactoryBase *factory) |
Removes a factory from the registry. More... | |
virtual std::shared_ptr< ossim::istream > | createIstream (const std::string &connectionString, const ossimKeywordlist &options=ossimKeywordlist(), std::ios_base::openmode mode=std::ios_base::in|std::ios_base::binary) const |
Will try to creates an istream interface to the connectionString passed in. More... | |
virtual std::shared_ptr< ossim::ostream > | createOstream (const std::string &connectionString, const ossimKeywordlist &options=ossimKeywordlist(), std::ios_base::openmode mode=std::ios_base::out|std::ios_base::binary) const |
Will try to creates an ostream interface to the connectionString passed in. More... | |
virtual std::shared_ptr< ossim::iostream > | createIOstream (const std::string &connectionString, const ossimKeywordlist &options=ossimKeywordlist(), std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out|std::ios_base::binary) const |
Will try to creates an iostream interface to the connectionString passed in. More... | |
bool | exists (const std::string &connectionString) const |
Methods to test if connection exists. More... | |
virtual bool | exists (const std::string &connectionString, bool &continueFlag) const |
Methods to test if connection exists. More... | |
void | loadPreferences () |
This will load the buffer information from the preferences. More... | |
![]() | |
virtual | ~StreamFactoryBase () |
Static Public Member Functions | |
static StreamFactoryRegistry * | instance () |
Protected Member Functions | |
StreamFactoryRegistry () | |
Private Member Functions | |
StreamFactoryRegistry (const StreamFactoryRegistry &) | |
copy constructor hidden from use More... | |
bool | getBufferInfo (BufferInfo &bufferInfo, const ossimString &connectionString) const |
Private Attributes | |
std::vector< StreamFactoryBase * > | m_factoryList |
std::vector< BufferInfo > | m_bufferInfoList |
ossimRegExp | m_patternMatcher |
std::mutex | m_mutex |
Static Private Attributes | |
static StreamFactoryRegistry * | m_instance = 0 |
This is a generic stream registry.
We could try to create streams for http, https, s3 protocols as well as local file. We have also exposed an exists for supporting exists() calls for different stream types.
We have added support for Buffered reads. You can enable buffered reads to be block boundary. If it's not block then it will use a pubsetbuf for a buffered I/O It will read the
The includePattern keyword is a regular expression. Examples:
Local file example:
S3 file example:
https or https file example:
Definition at line 84 of file ossimStreamFactoryRegistry.h.
|
virtual |
Definition at line 31 of file ossimStreamFactoryRegistry.cpp.
|
protected |
Definition at line 26 of file ossimStreamFactoryRegistry.cpp.
|
private |
copy constructor hidden from use
|
virtual |
Will try to creates an iostream interface to the connectionString passed in.
connectionString | Is the connection string used to create the stream |
options | If a stream is found then this holds specific options for the stream. Defaults to empty options |
mode | Is the mode to be used. Defaults to a binary output stream. |
Implements ossim::StreamFactoryBase.
Definition at line 200 of file ossimStreamFactoryRegistry.cpp.
|
virtual |
Will try to creates an istream interface to the connectionString passed in.
connectionString | Is the connection string used to create a stream. Possible examples: s3://<bucket>/path or /data/foo.tif or https://<host>/<path> |
options | If a stream is found then this holds specific options for the stream. Defaults to empty options |
mode | Is the mode to be used. Defaults to a binary input stream. |
Implements ossim::StreamFactoryBase.
Definition at line 148 of file ossimStreamFactoryRegistry.cpp.
Referenced by ossimSrtmSupportData::computeMinMaxTemplate(), ossimImageHandler::initVertices(), ossimImageHandler::loadMetaData(), ossimTiffInfo::open(), and ossimNitfTileSource::open().
|
virtual |
Will try to creates an ostream interface to the connectionString passed in.
connectionString | Is the connection string used to create the stream |
options | If a stream is found then this holds specific options for the stream. Defaults to empty options |
mode | Is the mode to be used. Defaults to a binary output stream. |
Implements ossim::StreamFactoryBase.
Definition at line 191 of file ossimStreamFactoryRegistry.cpp.
bool ossim::StreamFactoryRegistry::exists | ( | const std::string & | connectionString | ) | const |
Methods to test if connection exists.
Definition at line 209 of file ossimStreamFactoryRegistry.cpp.
Referenced by ossimFilename::exists().
|
virtual |
Methods to test if connection exists.
connectionString | |
continueFlag | Initializes by this, if set to true, indicates factory handles file/url and no more factory checks are necessary. |
Implements ossim::StreamFactoryBase.
Definition at line 215 of file ossimStreamFactoryRegistry.cpp.
|
private |
bufferInfo | Holds the result of the first buffer info matching the connection string |
connecitonString | The connection string |
Definition at line 120 of file ossimStreamFactoryRegistry.cpp.
References ossimString::c_str().
|
static |
Definition at line 35 of file ossimStreamFactoryRegistry.cpp.
Referenced by ossimSrtmSupportData::computeMinMaxTemplate(), ossimInfoFactoryRegistry::create(), ossimFilename::exists(), ossimFilename::fileSize(), for(), ossimNitfFile::getNewDataExtensionSegment(), ossimNitfFile::getNewImageHeader(), ossimNitfFile::getNewLabelHeader(), ossimNitfFile::getNewSymbolHeader(), ossimNitfFile::getNewTextHeader(), ossimAuxXmlSupportData::getProjection(), ossimMultiResLevelHistogram::importHistogram(), ossimInit::initializeDefaultFactories(), ossimImageHandler::initVertices(), ossimApplanixEOFile::isEOFile(), ossimSensorModelFactory::isNitf(), ossimImageHandler::loadMetaData(), ossimNitfInfo::open(), ossimDemInfo::open(), ossimCcfInfo::open(), ossimInfoBase::open(), ossimDemHeader::open(), ossimTiffInfo::open(), ossimNitfTileSource::open(), ossimDtedHandler::open(), ossimFfRevb::ossimFfRevb(), ossimFfRevc::ossimFfRevc(), ossimSharedLibraryFinalize(), ossimSharedLibraryInitialize(), ossimCcfHead::parseCcfHeader(), ossimApplanixEOFile::parseFile(), ossimKeywordlist::parseFile(), and ossimApplanixEOFile::parseHeader().
void ossim::StreamFactoryRegistry::loadPreferences | ( | ) |
This will load the buffer information from the preferences.
Definition at line 57 of file ossimStreamFactoryRegistry.cpp.
void ossim::StreamFactoryRegistry::registerFactory | ( | ossim::StreamFactoryBase * | factory | ) |
Registers a stream factory.
This allows for a pluggable stream Please see ossim-plugins and look at curl, aws for example stream definitions.
factory | To be added to the registry |
Definition at line 239 of file ossimStreamFactoryRegistry.cpp.
void ossim::StreamFactoryRegistry::unregisterFactory | ( | StreamFactoryBase * | factory | ) |
Removes a factory from the registry.
factory | To be removed from the registry |
Definition at line 249 of file ossimStreamFactoryRegistry.cpp.
|
private |
Definition at line 215 of file ossimStreamFactoryRegistry.h.
|
private |
Definition at line 214 of file ossimStreamFactoryRegistry.h.
|
staticprivate |
Definition at line 216 of file ossimStreamFactoryRegistry.h.
|
mutableprivate |
Definition at line 218 of file ossimStreamFactoryRegistry.h.
|
mutableprivate |
Definition at line 217 of file ossimStreamFactoryRegistry.h.