23 * questions. 24 */ 25 26 #ifndef PACKAGE_H 27 #define PACKAGE_H 28 29 30 #include "Platform.h" 31 #include "PlatformString.h" 32 #include "FilePath.h" 33 #include "PropertyFile.h" 34 35 #include <map> 36 #include <list> 37 38 class PackageBootFields { 39 public: 40 enum MemoryState {msManual, msAuto}; 41 42 public: 43 OrderedMap<TString, TString> FJVMArgs; 44 std::list<TString> FArgs; 45 46 TString FPackageRootDirectory; 47 TString FPackageAppDirectory; 48 TString FPackageLauncherDirectory; 49 TString FAppDataDirectory; 50 TString FAppID; 51 TString FPackageAppDataDirectory; 52 TString FClassPath; 53 TString FModulePath; 54 TString FMainJar; 55 TString FMainModule; 56 TString FMainClassName; 57 TString FJVMRuntimeDirectory; 58 TString FJVMLibraryFileName; 59 TString FSplashScreenFileName; 60 bool FUseJavaPreferences; 61 TString FCommandName; 62 63 TString FAppCDSCacheFileName; 64 65 TPlatformNumber FMemorySize; 66 MemoryState FMemoryState; 67 }; 68 69 70 class Package { 71 private: 72 Package(Package const&); // Don't Implement. 73 void operator=(Package const&); // Don't implement 74 75 private: 76 bool FInitialized; 77 PackageBootFields* FBootFields; 78 TString FAppCDSCacheDirectory; 79 80 DebugState FDebugging; 81 82 Package(void); 83 84 TString GetMainJar(); 85 void ReadJVMArgs(ISectionalPropertyContainer* Config); 86 void PromoteAppCDSState(ISectionalPropertyContainer* Config); 87 88 public: 89 static Package& GetInstance(); 90 ~Package(void); 91 92 void Initialize(); 93 void Clear(); 94 void FreeBootFields(); 95 96 void SetCommandLineArguments(int argc, TCHAR* argv[]); 97 98 OrderedMap<TString, TString> GetJVMArgs(); 99 TString GetMainModule(); 100 101 std::list<TString> GetArgs(); 102 103 TString GetPackageRootDirectory(); 104 TString GetPackageAppDirectory(); 105 TString GetPackageLauncherDirectory(); 106 TString GetAppDataDirectory(); 107 108 TString GetAppCDSCacheDirectory(); 109 TString GetAppCDSCacheFileName(); 110 111 TString GetAppID(); 112 TString GetPackageAppDataDirectory(); 113 TString GetClassPath(); 114 TString GetModulePath(); 115 TString GetMainClassName(); 116 TString GetJVMLibraryFileName(); 117 TString GetJVMRuntimeDirectory(); 118 TString GetSplashScreenFileName(); 119 bool HasSplashScreen(); 120 TString GetCommandName(); 121 122 TPlatformNumber GetMemorySize(); 123 PackageBootFields::MemoryState GetMemoryState(); 124 125 DebugState Debugging(); 126 }; 127 128 #endif // PACKAGE_H | 23 * questions. 24 */ 25 26 #ifndef PACKAGE_H 27 #define PACKAGE_H 28 29 30 #include "Platform.h" 31 #include "PlatformString.h" 32 #include "FilePath.h" 33 #include "PropertyFile.h" 34 35 #include <map> 36 #include <list> 37 38 class PackageBootFields { 39 public: 40 enum MemoryState {msManual, msAuto}; 41 42 public: 43 OrderedMap<TString, TString> FJavaOptions; 44 std::list<TString> FArgs; 45 46 TString FPackageRootDirectory; 47 TString FPackageAppDirectory; 48 TString FPackageLauncherDirectory; 49 TString FAppDataDirectory; 50 TString FPackageAppDataDirectory; 51 TString FClassPath; 52 TString FModulePath; 53 TString FMainJar; 54 TString FMainModule; 55 TString FMainClassName; 56 TString FJavaRuntimeDirectory; 57 TString FJavaLibraryFileName; 58 TString FSplashScreenFileName; 59 bool FUseJavaPreferences; 60 TString FCommandName; 61 62 TString FAppCDSCacheFileName; 63 64 TPlatformNumber FMemorySize; 65 MemoryState FMemoryState; 66 }; 67 68 69 class Package { 70 private: 71 Package(Package const&); // Don't Implement. 72 void operator=(Package const&); // Don't implement 73 74 private: 75 bool FInitialized; 76 PackageBootFields* FBootFields; 77 TString FAppCDSCacheDirectory; 78 79 DebugState FDebugging; 80 81 Package(void); 82 83 TString GetMainJar(); 84 void ReadJavaOptions(ISectionalPropertyContainer* Config); 85 void PromoteAppCDSState(ISectionalPropertyContainer* Config); 86 87 public: 88 static Package& GetInstance(); 89 ~Package(void); 90 91 void Initialize(); 92 void Clear(); 93 void FreeBootFields(); 94 95 void SetCommandLineArguments(int argc, TCHAR* argv[]); 96 97 OrderedMap<TString, TString> GetJavaOptions(); 98 TString GetMainModule(); 99 100 std::list<TString> GetArgs(); 101 102 TString GetPackageRootDirectory(); 103 TString GetPackageAppDirectory(); 104 TString GetPackageLauncherDirectory(); 105 TString GetAppDataDirectory(); 106 107 TString GetAppCDSCacheDirectory(); 108 TString GetAppCDSCacheFileName(); 109 110 TString GetPackageAppDataDirectory(); 111 TString GetClassPath(); 112 TString GetModulePath(); 113 TString GetMainClassName(); 114 TString GetJavaLibraryFileName(); 115 TString GetJavaRuntimeDirectory(); 116 TString GetSplashScreenFileName(); 117 bool HasSplashScreen(); 118 TString GetCommandName(); 119 120 TPlatformNumber GetMemorySize(); 121 PackageBootFields::MemoryState GetMemoryState(); 122 123 DebugState Debugging(); 124 }; 125 126 #endif // PACKAGE_H |