OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimInit.h>
Public Member Functions | |
~ossimInit () | |
void | addOptions (ossimArgumentParser &parser) |
void | initialize (int &argc, char **argv) |
void | initialize (ossimArgumentParser &parser) |
void | initialize () |
void | finalize () |
void | usage () |
bool | getElevEnabledFlag () const |
void | setElevEnabledFlag (bool flag) |
Sets theElevEnabledFlag. More... | |
void | setPluginLoaderEnabledFlag (bool flag) |
void | loadPlugins (const ossimFilename &plugin, const char *options=0) |
Can take a file or a directory. More... | |
void | initializePlugins () |
void | initializeDefaultFactories () |
void | initializeElevation () |
void | initializeLogFile () |
Initializes log file from preferences keyword lookup of "ossim.log.file" if log file has not already been set and keyword is set in preferences. More... | |
ossimString | version () const |
ossimFilename | appName () const |
Static Public Member Functions | |
static ossimInit * | instance () |
Protected Member Functions | |
ossimInit () | |
protected default constructor. More... | |
ossimInit (const ossimInit &obj) | |
Hidden from use copy constructor. More... | |
void | operator= (const ossimInit &rhs) const |
Hidden from use assignment operator. More... | |
void | parseOptions (ossimArgumentParser &parser) |
void | parseNotifyOption (ossimArgumentParser &parser) |
void | parseEnvOptions (ossimArgumentParser &parser) |
void | parsePrefsOptions (ossimArgumentParser &parser) |
void | removeOption (int &argc, char **argv, int argToRemove) |
Protected Attributes | |
bool | theInitializedFlag |
ossimFilename | theAppName |
ossimPreferences * | thePreferences |
bool | theElevEnabledFlag |
bool | thePluginLoaderEnabledFlag |
Static Protected Attributes | |
static ossimInit * | theInstance = 0 |
Definition at line 29 of file ossimInit.h.
ossimInit::~ossimInit | ( | ) |
|
protected |
protected default constructor.
Definition at line 79 of file ossimInit.cpp.
Referenced by instance().
|
protected |
void ossimInit::addOptions | ( | ossimArgumentParser & | parser | ) |
Definition at line 100 of file ossimInit.cpp.
References ossimApplicationUsage::addCommandLineOption(), and ossimArgumentParser::getApplicationUsage().
Referenced by main(), ossimHillshadeTool::setUsage(), ossimInfo::setUsage(), ossimChipProcTool::setUsage(), ossimTool::setUsage(), ossimPointCloudTool::usage(), ossimAutRegUtil::usage(), ossimImageUtil::usage(), and ossimChipperUtil::usage().
ossimFilename ossimInit::appName | ( | ) | const |
void ossimInit::finalize | ( | ) |
bool ossimInit::getElevEnabledFlag | ( | ) | const |
Definition at line 290 of file ossimInit.cpp.
References theElevEnabledFlag.
void ossimInit::initialize | ( | int & | argc, |
char ** | argv | ||
) |
METHOD: initialize() This method shall be called from the application's main module with the command-line arguments. Every OSSIM application should have the following line early in the main module:
ossimInit::initialize(argc, argv);
OR
ossimInit::instance()->initialize(argc, argv);
The two forms are functionally identical. Pick the latter form if you like to type. The argv command line options are parsed and may be stripped. the value of argc will be adjusted to account for stripped options.
METHOD: ossimInit::initialize()
Method called from the OSSIM application main.
Definition at line 119 of file ossimInit.cpp.
References initialize(), theInitializedFlag, and theInstance.
Referenced by initialize(), and main().
void ossimInit::initialize | ( | ossimArgumentParser & | parser | ) |
Definition at line 130 of file ossimInit.cpp.
References theInitializedFlag.
void ossimInit::initialize | ( | ) |
Definition at line 190 of file ossimInit.cpp.
References theInitializedFlag.
void ossimInit::initializeDefaultFactories | ( | ) |
Definition at line 526 of file ossimInit.cpp.
References ossimFactoryListInterface< T, NativeType >::addFactory(), ossimCodecFactoryRegistry::instance(), ossimImageSourceFactoryRegistry::instance(), ossim::ImageHandlerStateFactory::instance(), ossimBaseObjectFactory::instance(), ossimProjectionViewControllerFactory::instance(), ossimImageMetaDataWriterRegistry::instance(), ossimFontFactoryRegistry::instance(), ossimImageGeometryRegistry::instance(), ossimObjectFactoryRegistry::instance(), ossim::ImageHandlerStateRegistry::instance(), ossim2dTo2dTransformRegistry::instance(), ossimProjectionFactoryRegistry::instance(), ossimImageWriterFactoryRegistry::instance(), ossimOverviewBuilderFactory::instance(), ossimDatumFactoryRegistry::instance(), ossimOverviewBuilderFactoryRegistry::instance(), ossimImageHandlerRegistry::instance(), ossim::StreamFactoryRegistry::instance(), and ossimFactoryListInterface< T, NativeType >::registerFactory().
void ossimInit::initializeElevation | ( | ) |
Definition at line 825 of file ossimInit.cpp.
void ossimInit::initializeLogFile | ( | ) |
Initializes log file from preferences keyword lookup of "ossim.log.file" if log file has not already been set and keyword is set in preferences.
So this should be called after parse options as the –ossim-logfile should override any preferences setting.
Definition at line 884 of file ossimInit.cpp.
References ossimKeywordlist::find(), ossimGetLogFilename(), ossimSetLogFilename(), ossimPreferences::preferencesKWL(), ossimString::size(), and thePreferences.
void ossimInit::initializePlugins | ( | ) |
Definition at line 561 of file ossimInit.cpp.
References ossimString::c_str(), ossimFilename::dirCat(), ossimString::empty(), ossimFilename::exists(), ossimKeywordlist::find(), ossimKeywordlist::findKey(), ossimKeywordlist::getNumberOfSubstringKeys(), ossimKeywordlist::getSubstringKeyList(), ossimEnvironmentUtility::getUserOssimPluginDir(), ossimEnvironmentUtility::instance(), ossimSharedPluginRegistry::instance(), ossimPreferences::instance(), loadPlugins(), ossimDirectory::OSSIM_DIR_FILES, ossimFilename::path(), ossimPreferences::preferencesKWL(), ossimSharedPluginRegistry::registerPlugin(), ossimString::size(), ossimString::string(), theAppName, thePreferences, ossimString::toBool(), ossimString::toInt(), and ossimString::toString().
|
static |
Returns the static instance of an ossimInit object. This is of no use until non-static methods are implemented.
Definition at line 89 of file ossimInit.cpp.
References ossimInit(), and theInstance.
Referenced by main(), ossimHillshadeTool::setUsage(), ossimInfo::setUsage(), ossimChipProcTool::setUsage(), ossimTool::setUsage(), ossimPointCloudTool::usage(), ossimAutRegUtil::usage(), ossimImageUtil::usage(), and ossimChipperUtil::usage().
void ossimInit::loadPlugins | ( | const ossimFilename & | plugin, |
const char * | options = 0 |
||
) |
Can take a file or a directory.
If a directory is givien then it will check all files in the directory and add each file that is detected to be a valid plugin.
plugin | Is the filename of the plugin to load |
options | Is a keywordlist of plugin specific options |
Definition at line 305 of file ossimInit.cpp.
References ossimFilename::exists(), ossimDirectory::getFirst(), ossimDirectory::getNext(), ossimSharedPluginRegistry::instance(), ossimFilename::isDir(), ossimDirectory::open(), ossimDirectory::OSSIM_DIR_FILES, ossimSharedPluginRegistry::registerPlugin(), and thePluginLoaderEnabledFlag.
Referenced by initializePlugins().
|
protected |
|
protected |
Definition at line 474 of file ossimInit.cpp.
References ossimString::after(), ossimString::before(), ossimString::c_str(), ossimString::contains(), ossimEnvironmentUtility::instance(), ossimArgumentParser::read(), and ossimEnvironmentUtility::setEnvironmentVariable().
|
protected |
Definition at line 438 of file ossimInit.cpp.
References ossimString::downcase(), ossimDisableNotify(), ossimNotifyFlags_ALL, ossimNotifyFlags_DEBUG, ossimNotifyFlags_FATAL, ossimNotifyFlags_INFO, ossimNotifyFlags_NOTICE, ossimNotifyFlags_WARN, and ossimArgumentParser::read().
|
protected |
Definition at line 379 of file ossimInit.cpp.
|
protected |
Definition at line 335 of file ossimInit.cpp.
|
protected |
METHOD: removeOptions() Utility for stripping from argv all characters associated with a particular option:
METHOD: ossimInit::removeOption()
Removes all characters associated with the indicated option from the command line string.
Definition at line 503 of file ossimInit.cpp.
void ossimInit::setElevEnabledFlag | ( | bool | flag | ) |
Sets theElevEnabledFlag.
flag | If true ossimElevManager will be initialized. Set to false to NOT initialize the ossimElevManager from preferences. Default in class is true. |
Definition at line 295 of file ossimInit.cpp.
References theElevEnabledFlag.
void ossimInit::setPluginLoaderEnabledFlag | ( | bool | flag | ) |
void ossimInit::usage | ( | ) |
METHOD: usage() Prints to stdout the list of command line options that this object parses
Prints to stdout the list of command line options that this object parses.
Definition at line 268 of file ossimInit.cpp.
References ossimNotify(), and ossimNotifyLevel_INFO.
ossimString ossimInit::version | ( | ) | const |
e.g. "version 1.7.0 (20071003)"
Definition at line 905 of file ossimInit.cpp.
References OSSIM_BUILD_DATE, and OSSIM_VERSION.
|
protected |
Definition at line 148 of file ossimInit.h.
Referenced by appName(), and initializePlugins().
|
protected |
Definition at line 150 of file ossimInit.h.
Referenced by getElevEnabledFlag(), and setElevEnabledFlag().
|
protected |
Definition at line 147 of file ossimInit.h.
Referenced by initialize().
|
staticprotected |
Definition at line 146 of file ossimInit.h.
Referenced by initialize(), instance(), and ~ossimInit().
|
protected |
Definition at line 151 of file ossimInit.h.
Referenced by loadPlugins(), and setPluginLoaderEnabledFlag().
|
protected |
Definition at line 149 of file ossimInit.h.
Referenced by initializeLogFile(), and initializePlugins().