gbench.cpp
来自「ncbi源码」· C++ 代码 · 共 756 行 · 第 1/2 页
CPP
756 行
"<std>/etc/gbench.ini"); if (!config_path.empty()) { conf = &config_path; } } // Let the base class load the config file. // If we couldn't find it above, it will try and find it, and warn // otherwise. LOG_POST(Info << "loading registry file from " << *conf); return CNcbiApplication::LoadConfig(reg, conf);}//// x_LoadPlugins()// Here, we evaluate the plugin path for valid plugin cache files and load the// descriptions as needed//void CGBenchApp::x_LoadPlugins(const string& path){ list<string> paths; NStr::Split(path, ",\t\n\r", paths); ITERATE (list<string>, iter, paths) { string path = NStr::TruncateSpaces(*iter);; if (path == "<std>" || path == "<home>") { path = CSystemPath::ResolvePath(path, "plugins"); } else { path = CSystemPath::ResolvePath(path, ""); } if ( path.empty() ) { continue; } CPluginRegistry::InitPlugins(path); }}void CGBenchApp::OnHelpAbout(){ if ( !m_AboutDlg.get() ) { m_AboutDlg.reset(new CAboutDlg()); } // we don't need to wait for this - just show the dialog m_AboutDlg->Show();}void CGBenchApp::OnHelpIndex(){}// access our resource managerCResourceManager& CGBenchApp::x_GetResourceMgr(){ if ( !m_ResourceMgr ) { m_ResourceMgr.Reset(new CResourceManager("<home>;<std>")); } return *m_ResourceMgr;}// the end scope must not wrap main!!!END_NCBI_SCOPE/////////////////////////////////////////////////////////////////////////////// MAINint main(int argc, char** argv){ // Execute main application function return ncbi::CGBenchApp().AppMain(argc, argv, 0, ncbi::eDS_Default);}/* * =========================================================================== * $Log: gbench.cpp,v $ * Revision 1000.6 2004/06/01 20:48:09 gouriano * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.86 * * Revision 1.86 2004/05/25 17:10:35 dicuccio * Moved initialization to fltk_utils.cpp * * Revision 1.85 2004/05/21 22:27:42 gorelenk * Added PCH ncbi_pch.hpp * * Revision 1.84 2004/05/17 13:25:32 dicuccio * First implementation of new document workspace * * Revision 1.83 2004/04/12 18:14:09 dicuccio * Added Raise() prototype to raise the application to the foreground * * Revision 1.82 2004/04/07 12:51:02 dicuccio * Added CONNECT_Init() * * Revision 1.81 2004/03/26 18:28:08 jcherry * Made "remote" file opening the default behavior; added -noremote * and (synonymous) -nr flags to override this * * Revision 1.80 2004/03/22 16:56:13 jcherry * Made remote-control file opening a command-line/registry option * rather than default * * Revision 1.79 2004/03/22 15:40:19 jcherry * Added file type command-line argument * * Revision 1.78 2004/03/19 17:12:36 jcherry * Make relative paths absolute before trying to open via named pipe * * Revision 1.77 2004/03/15 16:06:18 jcherry * Launch default viewer when opening file from command line * * Revision 1.76 2004/03/11 19:25:35 jcherry * Moved load_file to gui/gbench * * Revision 1.75 2004/03/11 17:15:54 jcherry * Added named pipe capabilities * * Revision 1.74 2004/03/09 19:53:42 jcherry * Added optional data file command line argument * * Revision 1.73 2004/02/17 20:35:24 rsmith * moved core/settings.[ch]pp and core/system_path.[ch]pp to config and utils, respectively. * * Revision 1.72 2004/01/06 20:13:59 dicuccio * Use SetEnvironment() * * Revision 1.71 2003/12/31 20:20:13 dicuccio * Use CFltkUtils::Lock() * * Revision 1.70 2003/12/23 03:23:38 ucko * Conditionalize call to FL_LOCK on NCBI_THREADS. * * Revision 1.69 2003/12/22 19:22:48 dicuccio * Added direct calls to plugin message queue from timeout function * * Revision 1.68 2003/12/09 15:45:24 dicuccio * Use CException::GetMsg() instead of what() * * Revision 1.67 2003/12/02 14:42:47 dicuccio * Removed most of the explicitly initialized plugins in favor of restored * autorun. Use Fl::repeat_timeout() for better idle processing * * Revision 1.66 2003/11/26 17:11:00 dicuccio * Call initialization plugins explicitly * * Revision 1.65 2003/11/24 15:42:01 dicuccio * Renamed CVersion to CPluginVersion * * Revision 1.64 2003/11/18 17:45:04 dicuccio * Remove call to CSettingsSet::ShutDown() - handled in CDocManager * * Revision 1.63 2003/11/06 20:08:29 dicuccio * Removed reference to dispatcher. Be sure to open streams with ios::out. Use * ReportThis() instead of exception::what() for exception text retrieval * * Revision 1.62 2003/11/04 17:21:17 dicuccio * Removed dispatcher - now part of message queue. Tweaked argument processing - * call Fl::args early * * Revision 1.61 2003/10/27 17:40:38 dicuccio * Restructured diagnostic handler - use CDiagPanel * * Revision 1.60 2003/10/24 17:19:01 dicuccio * Fixed errors in parsing comma-separated paths (trim spaces) * * Revision 1.59 2003/10/23 16:19:55 dicuccio * Removed dead cache_dir statement. Changed to use * CSystemPath::ResolveExisting(). * * Revision 1.58 2003/09/24 18:24:12 dicuccio * Catched CException, not std::exception * * Revision 1.57 2003/09/04 14:02:36 dicuccio * Introduce IDocument as abstract base class for CDocument; replace use of * CDocument with IDocument * * Revision 1.56 2003/08/25 18:54:47 rsmith * Load and save Settings (Plugin Config Cache) * * Revision 1.55 2003/08/22 15:46:43 dicuccio * Removed config file from CSettings - accessible through CNcbiApplication * * Revision 1.54 2003/08/11 19:27:05 dicuccio * Use Fl::add_timeut() instead of Fl::add_idle(). Config file access fixes * * Revision 1.53 2003/08/06 13:24:31 dicuccio * Deprecated old main window; introduced new, compact window for multiple * document management * * Revision 1.52 2003/08/05 17:12:13 dicuccio * Fixed typo * * Revision 1.51 2003/08/05 17:09:05 dicuccio * Changed calling semantics of message queue - pass by reference, not CConstRef<> * * Revision 1.50 2003/07/31 16:58:42 dicuccio * Message queue / dispatcher clean-ups. Added idle function processing for * plugin message queue handling * * Revision 1.49 2003/07/30 12:51:53 dicuccio * Moved 'gbench_system.[h,c]pp' to 'system_path.[h,c]pp' * * Revision 1.48 2003/07/30 12:19:41 dicuccio * Cleaned up CGBenchApp. Changed name of system path requester class. * * Revision 1.47 2003/07/29 18:15:08 jcherry * Moved gbench_system.[ch]pp from gui/gbench to gui/core * * Revision 1.46 2003/07/14 11:21:48 shomrat * Plugin messageing system related changes * * Revision 1.45 2003/07/08 16:51:20 dicuccio * Added an explicit console message restore function - this is done before app * shut down to make sure that FLTK doesn't throw an exception about invalid text * buffers * * Revision 1.44 2003/06/30 13:35:51 dicuccio * Lots of clean-up. Restore the original diagnostic handler before shutting * down the application. Moved debug settings into the .ini file. Minor * clean-up of handling of config file * * Revision 1.43 2003/06/26 18:53:38 rsmith * replace x_LoadConfigFile with overloading LoadConfig * * Revision 1.42 2003/06/25 20:11:11 rsmith * if no plugin_path setting default to <std>,<home> * * Revision 1.41 2003/06/25 17:02:55 dicuccio * Split CPluginHandle into a handle (pointer-to-implementation) and * implementation file. Lots of #include file clean-ups. * * Revision 1.40 2003/06/25 16:53:37 rsmith * global Settings needs a Config registry object even if there was no config file. * * Revision 1.39 2003/06/25 15:59:30 rsmith * HonorDebugSettings after loading config file. * * Revision 1.38 2003/06/16 13:53:21 rsmith * ResolvePath delegated to GBenchApp_System::ResolvePath * * Revision 1.37 2003/05/30 14:15:42 dicuccio * Renamed MessageBox to NcbiMessageBox because brain-dead MSVC thinks this is * ::MessageBox and rewrites the symbol as MessageBoxA, which results in an * unresolved external and conflict with the Win32 API :(. * * Revision 1.36 2003/05/30 12:59:59 dicuccio * Converted code to use MessageBox() instead of fl_alert() * * Revision 1.35 2003/05/06 15:58:20 dicuccio * Removed some dead headers. * * Revision 1.34 2003/04/16 11:41:59 dicuccio * Changed main windows - store as pointer, CRef<> held in CDocManager * * Revision 1.33 2003/04/10 12:46:13 dicuccio * Re-enabled old main window - both are now active * * Revision 1.32 2003/04/08 18:10:58 lebedev * Document organizer added * * Revision 1.31 2003/04/07 17:30:26 dicuccio * Cleaned up window initialization to support multiple top-level doc manager * windows * * Revision 1.30 2003/04/03 17:25:03 dicuccio * Re-enabled the old-style window * * Revision 1.29 2003/03/31 20:01:07 dicuccio * Cast enum -> int to make a couple of picky compilers happy * * Revision 1.28 2003/03/31 13:38:42 dicuccio * General clean-up; changed standard start-up messages. Added new main window * * Revision 1.27 2003/03/28 13:38:15 dicuccio * Use canonical FLTK headers (*.H) * * Revision 1.26 2003/03/21 17:02:17 dicuccio * Moved fltk_utils.hpp --> gui/utils. Added link against libgui_utils * * Revision 1.25 2003/03/11 15:18:57 kuznets * iterate -> ITERATE * * Revision 1.24 2003/02/26 19:22:36 dicuccio * Promoted x_ResolvePath() to a public function (ResolvePath()). * * Revision 1.23 2003/02/26 14:29:27 dicuccio * Removed unnecessary _TRACE() statements * * Revision 1.22 2003/02/25 14:48:15 dicuccio * Implemented most of the plugin manager dialog features. * * Revision 1.21 2003/02/20 19:50:47 dicuccio * Created new plugin architecture, based on ASN.1 spec. Moved GBENCH framework * over to use new architecture. * * Revision 1.20 2003/01/16 13:28:22 dicuccio * Added fix for command-line app launch in Windows * * Revision 1.19 2003/01/13 13:10:10 dicuccio * Namespace clean-up. Retired namespace gui -> converted all to namespace * ncbi. Moved all FLUID-generated code into namespace ncbi. * * Revision 1.18 2003/01/10 17:27:15 dicuccio * Added first pass at plugin manager dialog - displays information about the * currently loaded plugins, allows setting plugin paths via GUI * * Revision 1.17 2003/01/09 21:10:32 dicuccio * Minor tweak - made background / foreground colors optional parameters instead * of default parameters (default values not valid on all platforms) * * Revision 1.16 2003/01/09 20:57:50 dicuccio * Added command-line arguments for FLTK-specific parameters: -scheme, -bg, -fg * Moved WinMain to its own (windows-specific) .cpp * * Revision 1.15 2003/01/08 17:16:52 dicuccio * Corrected a bug in handling of the 'gbench' std path for Windows - erase only * the *last* 'bin' component of the path... * * Revision 1.14 2003/01/03 20:39:13 dicuccio * Changed '-version' command line parameter to '-v' * * Revision 1.13 2002/12/23 14:12:29 dicuccio * added new command line option to return the version of the binaries * * Revision 1.12 2002/12/23 13:56:48 dicuccio * Fixed search-and-replace bug that affected a text output dialog * * Revision 1.11 2002/12/19 18:19:53 dicuccio * Don't manage the main window here - it's managed by the document manager. * * Revision 1.10 2002/12/11 19:07:42 dicuccio * Fixed coredump on app exit if the exit button / icon was used instead of the * menu option 'File->Exit'. * * Revision 1.9 2002/11/29 19:09:18 dicuccio * Added WinMain for windows compatibility * * Revision 1.8 2002/11/29 16:35:43 dicuccio * Reformatted tabs -> spaces. Added standard boilerplate for winmain.cpp * * Revision 1.7 2002/11/29 16:12:30 dicuccio * Wrapped Run() in a try/catch block. Added central path resolution function * to hide platform-specifics of resolving 'standar' file locations * * Revision 1.6 2002/11/29 15:37:27 dicuccio * Major interface change. Removed the original three panels in favor of a * single, integrated main application window. * * Revision 1.5 2002/11/25 20:59:46 dicuccio * Removed old file open mechanism in favor of data loader plugins. * * Revision 1.4 2002/11/19 17:16:22 dicuccio * Added cleaner handling of OS-specific mouse interaction through CFltkEvent. * * Revision 1.3 2002/11/09 21:02:45 dicuccio * Removed automatic view creationon document load. * * Revision 1.2 2002/11/07 18:53:39 dicuccio * Changed code to use ERR_POST() and _TRACE(). Minor string changes (use * string::empty()) * * Revision 1.1 2002/11/06 18:23:47 dicuccio * Initial revision * * =========================================================================== */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?