OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimInit.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // DESCRIPTION:
6 // Contains declaration of class ossimInit. This object handles all aspects
7 // of initialization for OSSIM applications. These tasks include:
8 //
9 // 1. Parsing the command line.
10 // 2. Instantiating all class factories as declared in ossimFactories.h
11 // 3. Initializing the "trace" code execution tracing functionality.
12 // 4. Scanning the preferences file for relevant values.
13 //
14 // SOFTWARE HISTORY:
15 //>
16 // 24Apr2001 Oscar Kramer
17 // Initial coding.
18 //<
19 //*****************************************************************************
20 // $Id: ossimInit.h 19440 2011-04-25 16:41:28Z dburken $
21 #ifndef ossimInit_HEADER
22 #define ossimInit_HEADER 1
23 
25 
26 class ossimPreferences;
28 
30 {
31 public:
32 
33  ~ossimInit();
38  static ossimInit* instance();
39 
40  void addOptions(ossimArgumentParser& parser);
41 
59  void initialize(int& argc, char** argv);
60 
61  void initialize(ossimArgumentParser& parser);
62 
63  void initialize();
64 
65  void finalize();
66 
71  void usage();
72 
74  bool getElevEnabledFlag() const;
75 
82  void setElevEnabledFlag(bool flag);
83 
84  void setPluginLoaderEnabledFlag(bool flag);
85 
94  void loadPlugins(const ossimFilename& plugin, const char* options=0);
95 
96  void initializePlugins();
97  void initializeDefaultFactories();
98  void initializeElevation();
99 
108  void initializeLogFile();
109 
118  ossimString version() const;
119 
120  ossimFilename appName()const;
121 
122 protected:
124  ossimInit();
125 
127  ossimInit(const ossimInit& obj);
128 
130  void operator=(const ossimInit& rhs) const;
131 
132  void parseOptions(ossimArgumentParser& parser);
133 
134  void parseNotifyOption(ossimArgumentParser& parser);
135  void parseEnvOptions(ossimArgumentParser& parser);
136  void parsePrefsOptions(ossimArgumentParser& parser);
142  void removeOption(int& argc,
143  char** argv,
144  int argToRemove);
145 
152 };
153 
154 #endif
void usage()
#define OSSIMDLLEXPORT
bool theElevEnabledFlag
Definition: ossimInit.h:150
bool theInitializedFlag
Definition: ossimInit.h:147
bool thePluginLoaderEnabledFlag
Definition: ossimInit.h:151
ossimPreferences * thePreferences
Definition: ossimInit.h:149
ossimFilename theAppName
Definition: ossimInit.h:148
static ossimInit * theInstance
Definition: ossimInit.h:146