/usr/include/ossim/init/ossimInit.h is in libossim-dev 1.8.16-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | //*******************************************************************
//
// License: See top level LICENSE.txt file.
//
// DESCRIPTION:
// Contains declaration of class ossimInit. This object handles all aspects
// of initialization for OSSIM applications. These tasks include:
//
// 1. Parsing the command line.
// 2. Instantiating all class factories as declared in ossimFactories.h
// 3. Initializing the "trace" code execution tracing functionality.
// 4. Scanning the preferences file for relevant values.
//
// SOFTWARE HISTORY:
//>
// 24Apr2001 Oscar Kramer
// Initial coding.
//<
//*****************************************************************************
// $Id: ossimInit.h 19440 2011-04-25 16:41:28Z dburken $
#ifndef ossimInit_HEADER
#define ossimInit_HEADER 1
#include <ossim/base/ossimFilename.h>
class ossimPreferences;
class ossimArgumentParser;
class OSSIMDLLEXPORT ossimInit
{
public:
~ossimInit();
/*!
* Returns the static instance of an ossimInit object. This is of no use
* until non-static methods are implemented.
*/
static ossimInit* instance();
void addOptions(ossimArgumentParser& parser);
/*!
* 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.
*/
void initialize(int& argc, char** argv);
void initialize(ossimArgumentParser& parser);
void initialize();
void finalize();
/*!
* METHOD: usage()
* Prints to stdout the list of command line options that this object parses
*/
void usage();
/** @return theElevEnabledFlag */
bool getElevEnabledFlag() const;
/**
* @brief Sets theElevEnabledFlag.
* @param flag If true ossimElevManager will be initialized. Set to false
* to NOT initialize the ossimElevManager from preferences.
* Default in class is true.
*/
void setElevEnabledFlag(bool flag);
void setPluginLoaderEnabledFlag(bool flag);
/**
* 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.
*
* @param plugin Is the filename of the plugin to load
* @param options Is a keywordlist of plugin specific options
*/
void loadPlugins(const ossimFilename& plugin, const char* options=0);
void initializePlugins();
void initializeDefaultFactories();
void initializeElevation();
/**
* @brief 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.
*/
void initializeLogFile();
/**
* @return The version in the form of:
* "version major.minor.release (yyyymmdd)"
* where
* yyyymmdd is the build date.
*
* e.g. "version 1.7.0 (20071003)"
*/
ossimString version() const;
ossimFilename appName()const;
protected:
/** protected default constructor. */
ossimInit();
/** Hidden from use copy constructor. */
ossimInit(const ossimInit& obj);
/** Hidden from use assignment operator. */
void operator=(const ossimInit& rhs) const;
void parseOptions(ossimArgumentParser& parser);
void parseNotifyOption(ossimArgumentParser& parser);
/*!
* METHOD: removeOptions()
* Utility for stripping from argv all characters associated with a
* particular option:
*/
void removeOption(int& argc,
char** argv,
int argToRemove);
static ossimInit* theInstance;
bool theInitializedFlag;
ossimFilename theAppName;
ossimPreferences* thePreferences;
bool theElevEnabledFlag;
bool thePluginLoaderEnabledFlag;
};
#endif
|