NCBI C++ ToolKit
gb_ui_data_source.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: gb_ui_data_source.cpp 44934 2020-04-21 19:23:25Z asztalos $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Andrey Yazhuk
27  *
28  */
29 
30 #include <ncbi_pch.hpp>
31 
32 #include <corelib/ncbiexec.hpp>
33 #include <corelib/ncbi_process.hpp>
34 #include <corelib/ncbi_system.hpp>
35 
37 
39 
40 #include <gui/core/app_dialogs.hpp>
41 
45 
52 
57 
59 #include <gui/objutils/label.hpp>
61 
68 
70 
71 #include <wx/menu.h>
72 #include <wx/filename.h>
73 
76 
77 static const char* kGenBankLoadOption = "Data from GenBank";
78 
79 ///////////////////////////////////////////////////////////////////////////////
80 /// CGenBankDSEvtHandler - wxEvtHandler-derived adapter for GenBank data source.
81 
82 class CGenBankDSEvtHandler : public wxEvtHandler
83 {
85 public:
87  : m_Workbench(workbench) {
88  }
89  void OnLoadFromGenBank(wxCommandEvent& event)
90  {
91  if(m_Workbench) {
93  }
94  }
95 protected:
97 };
98 
99 
100 BEGIN_EVENT_TABLE(CGenBankDSEvtHandler, wxEvtHandler)
103 
104 
105 ///////////////////////////////////////////////////////////////////////////////
106 /// CGenBankUIDataSource
107 
108 static const char* kGB_DS_Icon = "icon::gb_data_source";
109 
111 : m_Type(&type),
112  m_Descr("GenBank", kGB_DS_Icon),
113  m_SrvLocator(NULL),
114  m_Open(false)
115 {
116 }
117 
119 {
120 }
121 
122 
124 {
125  return "genbank_data_source";
126 }
127 
128 
130 {
131  return "GenBank Data Source";
132 }
133 
134 
136 {
137  m_SrvLocator = locator;
138 }
139 
140 
143 {
145 
146  /// this is not a good solution, but simple
147  IWorkbench* workbench = dynamic_cast<IWorkbench*>(m_SrvLocator);
148 
149  if(items.size() != 1 || workbench == NULL) {
150  return contrib; // return empty object - nothing to contribute
151  }
152 
154 
155  PT::CItem* item = items[0];
156  int type = item->GetType();
157 
158  if(type == PT::eDataSource) {
159  PT::CDataSource* ds_item = dynamic_cast<PT::CDataSource*>(item);
160  if(ds_item) {
161  CIRef<IUIDataSource> ds = ds_item->GetData();
162  CGenBankUIDataSource* gb_ds = dynamic_cast<CGenBankUIDataSource*>(ds.GetPointer());
163 
164  if(gb_ds) {
165  wxMenu* menu = new wxMenu;
166  menu->Append(wxID_SEPARATOR, wxT("Top Actions"));
167  cmd_reg.AppendMenuItem(*menu, eCmdLoadFromGenBank);
168 
169  contrib.first = menu;
170  contrib.second = new CGenBankDSEvtHandler(workbench);
171  }
172  }
173  }
174  return contrib;
175 }
176 
177 
179 {
180  return *m_Type;
181 }
182 
183 
185 {
186  return m_Descr;
187 }
188 
189 
191 {
192  return m_Open;
193 }
194 
195 //static const char* kCmdExtPoint = "scoped_objects::cmd_contributor";
196 static const char* kAppExpCmdExtPoint = "project_tree_view::context_menu::item_cmd_contributor";
197 
199 {
200  if (m_Open) {
201  LOG_POST(Error << "CGenBankUIDataSource::Open(): "
202  "attempt to open already open data source");
203  return false;
204  }
205 
206  CStopWatch sw;
207  sw.Start();
208 
209  /// register itself as menu contributor
211  reg->AddExtension(kAppExpCmdExtPoint, *this);
212 
213  /// initialize the object manager
215  CRegistryReadView view =
216  registry.GetReadView("GBENCH.Services.ObjectManager");
217 
219 
220  // general genbank loader options
221  int priority = view.GetInt("Priority", 99);
222 
223  // caching options
224  string cache_path = FnToStdString(CSysPath::ResolvePath(wxT("<home>/cache")));
225  wxString system_cache_path = FnToWxString(cache_path);
226  if (sizeof(void*) == 8)
227  system_cache_path.append(wxT("64"));
228 
229  {{
230  /// make sure we can write in the cache path directory
231  if ( !wxFileName::DirExists(system_cache_path) ) {
232  if ( !wxFileName::Mkdir(system_cache_path) ) {
233  LOG_POST(Error << "Error creating cache path ("
234  << system_cache_path.ToUTF8() << "); caching will be disabled");
235  } else {
236  LOG_POST(Info << "Created cache path: " << system_cache_path.ToUTF8());
237  }
238  } else {
239  // clear the cache after new build is run
240  const string ts_key = "GBENCH.Application.LastRunBuildStamp";
241  const string st_build_date = __DATE__ "." __TIME__;
242  string last_run_build_date = registry.GetString(ts_key);
243  bool cache_reset = (last_run_build_date != st_build_date);
244 
245  // clean sqlite cash if previous launch of GBench ended with crash
246  if (cache_reset || registry.GetBool("GBENCH.Application.CrashDetected", false)) {
247  ::wxRemoveFile(wxFileName(system_cache_path, wxT("cache_ids.db")).GetFullPath());
248  ::wxRemoveFile(wxFileName(system_cache_path, wxT("cache_blobs.db")).GetFullPath());
249  wxFileName vdb_cache_path = wxFileName::DirName(system_cache_path + wxFileName::GetPathSeparator() + "vdb");
250  vdb_cache_path.Rmdir(wxPATH_RMDIR_RECURSIVE);
251  vdb_cache_path.Mkdir(wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
252  }
253  registry.Set(ts_key, st_build_date);
254  }
255  }}
256 
257  int cache_age = view.GetInt("CacheAge", 5);
258  if (cache_age == 0) {
259  cache_age = 5; // keep objects for 5 days (default)
260  }
261 
262  /// ID resolution time in hours
263  int id_resolution_time = view.GetInt("IdResolutionTime", 24);
264  if (id_resolution_time > 24 * 3) {
265  id_resolution_time = 24 * 3; // correct the unreasonable value
266  }
267 
268  wxString objmgr_config_path =
269  CSysPath::ResolvePathExisting(wxT("<home>/gbench-objmgr.ini, ")
270  wxT("<std>/etc/gbench-objmgr.ini"));
271 
272  if (objmgr_config_path.empty()) {
274  } else {
275  CMemoryRegistry reg;
276  CNcbiIfstream istr(objmgr_config_path.fn_str(), ios::binary|ios::in);
277  reg.Read(istr);
278 
279 
280  // override variables as needed
281  reg.Set("genbank/cache/id_cache/sqlite3", "database",
282  cache_path + "/cache_ids.db");
283  reg.Set("genbank/cache/id_cache/sqlite3", "cache_age",
284  NStr::IntToString(id_resolution_time * (60*60)));
285  reg.Set("genbank/cache/blob_cache/sqlite3", "database",
286  cache_path + "/cache_blobs.db");
287  reg.Set("genbank/cache/blob_cache/sqlite3", "cache_age",
288  NStr::IntToString(cache_age * (24*60*60)));
289 
290  // now, create the GenBank data loader
291  string msg;
293  try {
294  CConfig cfg(reg);
295  rinfo =
297  (*m_ObjMgr,
298  *cfg.GetTree(), CObjectManager::eDefault, priority);
299  }
300  catch (CException& e) {
301  msg = "An error occurred while creating the GenBank connection\n(";
302  msg += e.GetMsg();
303  msg += ")";
304  }
305  catch (std::exception& e) {
306  msg = "An error occurred while creating the GenBank connection\n(";
307  msg += e.what();
308  msg += ")";
309  }
310 
311  if ( !msg.empty() ) {
312  /// fall back to standard initialization
313  LOG_POST(Error << msg);
315  }
316  }
317 
318  string t = NStr::DoubleToString(sw.Elapsed(), 3);
319  LOG_POST(Info << "Registered GenBank Data Source - " << t << " sec");
320 
321  sw.Restart();
322 
324  string loader_name = CObjectManager::GetInstance()->RegisterDataLoader(0, "vdbgraph")->GetName();
326  loader_name = CObjectManager::GetInstance()->RegisterDataLoader(0, "wgs")->GetName();
328  loader_name = CObjectManager::GetInstance()->RegisterDataLoader(0, "snp")->GetName();
330 
332  LOG_POST(Info << "Registered VDBGraph, WGS and SNP data sources - " << t << " sec");
333 
334  m_Open = true;
335  return true;
336 }
337 
338 
340 {
341  if (m_Open) {
342 
343  /// remove itself from menu contribution points
345  reg->RemoveExtension(kAppExpCmdExtPoint, *this);
346 
347  try {
348  bool revoked = m_ObjMgr->RevokeDataLoader("GBLOADER");
349  if (!revoked) {
350  CDataLoader* dl = m_ObjMgr->FindDataLoader("GBLOADER");
351  CGBDataLoader* gbdl = dynamic_cast<CGBDataLoader*>(dl);
352  if (gbdl) {
353  gbdl->CloseCache();
354  }
355  }
356  }
357  catch(std::exception&)
358  {
359  LOG_POST(Error << "Cannot revoke genbank dataloader");
360  }
361 
362  /// finally, drop the object manager
364 
365  if (ptr) {
366  if ( !ptr->ReferencedOnlyOnce() ) {
367  LOG_POST(Error << "CGenBankUIDataSource::ShutDownService(): "
368  "object manager still referenced");
369  }
370  }
371 
372  m_Open = false;
373  return true;
374  }
375  return false;
376 }
377 
378 
380 {
381  //TODO
382 }
383 
384 
386 {
387  // TODO may need to link the manager to this particular datasource
388  return new CGenBankUILoadManager();
389 }
390 
391 
393  return eCmdLoadFromGenBank;
394 }
395 
397 
398 
399  IWorkbench* workbench = dynamic_cast<IWorkbench*>(m_SrvLocator);
400 
401  return new CGenBankDSEvtHandler( workbench );
402 }
403 
404 
405 
406 ///////////////////////////////////////////////////////////////////////////////
407 /// CGenBankUIDataSourceType
409 : m_Descr("GenBank Connection", "")
410 {
413  wxT("gb_data_source.png"));
414 }
415 
416 
418 {
419  return m_Descr;
420 }
421 
422 
424 {
425  return new CGenBankUIDataSource(*this);
426 }
427 
428 
430 {
431  return true; // we want to create default "GenBank" datasource
432 }
433 
434 
436 {
437  static string ext_id("genbank_data_source_type");
438  return ext_id;
439 }
440 
441 
443 {
444  return m_Descr.GetLabel();
445 }
446 
447 
448 
449 ///////////////////////////////////////////////////////////////////////////////
450 /// CGenBankUILoadManager
452 : m_SrvLocator(NULL),
453  m_ParentWindow(NULL),
454  m_Descriptor(kGenBankLoadOption, ""),
455  m_State(eInvalid),
456  m_OptionPanel(NULL),
457  m_ProjectSelPanel(NULL)
458 {
459  m_Descriptor.SetLogEvent("loaders");
460 }
461 
462 
464 {
465  m_SrvLocator = srv_locator;
466 }
467 
468 
470 {
471  m_ParentWindow = parent;
472 }
473 
474 
476 {
477  return m_Descriptor;
478 }
479 
480 
482 {
484 }
485 
486 
488 {
489  m_State = eInvalid;
490  if(m_OptionPanel) {
491  m_OptionPanel = NULL; // window is destroyed by the system
492  }
494 }
495 
496 
498 {
499  if(m_State == eSelectAcc) {
500  if(m_OptionPanel == NULL) {
502  LoadSettings();
503  }
504  return m_OptionPanel;
505  } else if(m_State == eSelectProject) {
506  if(m_ProjectSelPanel == NULL) {
508 
513  }
514  return m_ProjectSelPanel;
515  }
516  return NULL;
517 }
518 
519 
521 {
522  switch(m_State) {
523  case eSelectAcc:
524  return action == eNext;
525  case eSelectProject:
526  return action == eBack || action == eNext;
527  case eCompleted:
528  return false; // nothing left to do
529  default:
530  _ASSERT(false);
531  return false;
532  }
533 }
534 
535 
537 {
538  return m_State == eSelectProject;
539 }
540 
541 
543 {
544  return m_State == eCompleted;
545 }
546 
547 
549 {
550  if(m_State == eSelectAcc && action == eNext) {
551  if (m_OptionPanel->IsInputValid()) {
553  return true;
554  }
555  return false;
556  } else if( m_State == eSelectProject) {
557  if(action == eBack) {
559  return true;
560  } else if(action == eNext) {
563  return true;
564  }
565  return false;
566  }
567  }
568  _ASSERT(false);
569  return false;
570 }
571 
572 
574 {
575  // extract parameters from the dialog panels
577  CIRef<IObjectLoader> loader;
578  if ((!m_OptionPanel->GetSeqIds().empty() || !m_OptionPanel->GetNAs().empty())
579  && !m_OptionPanel->GetGenomicAccessions().empty()) {
580  CChainLoader *chain = new CChainLoader();
581  loader.Reset( chain );
584  }
585  else if (!m_OptionPanel->GetGenomicAccessions().empty())
587  else
589 
591  string folder_name = m_ProjectParams.m_CreateFolder ? m_ProjectParams.m_FolderName : "";
592 
594  CSelectProjectOptions options;
596  return new CObjectLoadingTask(srv, *loader, options);
597 }
598 
599 
601 {
602  m_RegPath = path; // store for later use
603 }
604 
605 
606 static const char* kProjectParamsTag = "ProjectParams";
607 
609 {
610  if (!m_RegPath.empty()) {
611 
612  /// remember the selected Format (only if m_OptionPanel exists)
613  if (m_OptionPanel)
615 
616  /// save Project Panel settings
618  CRegistryWriteView view = gui_reg.GetWriteView(m_RegPath);
620  }
621 }
622 
624 {
625  if (!m_RegPath.empty() && m_OptionPanel != 0)
627 }
628 
630 {
631  if (!m_RegPath.empty()) {
632 
633  if (m_OptionPanel)
635 
636  /// load Project Panel settings
638  CRegistryReadView view = gui_reg.GetReadView(m_RegPath);
640  }
641 }
642 
#define static
User-defined methods of the data storage class.
static void COpenDialog(IWorkbench *workbench, const string &loader_label=NcbiEmptyString, const vector< wxString > &filenames=vector< wxString >())
CAssemblyObjectLoader.
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const SLoaderParams &params, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
Definition: csraloader.cpp:254
CChainLoader.
virtual void CloseCache(void)=0
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
Definition: gbloader.cpp:366
CGBObjectLoader.
CGenBankDSEvtHandler - wxEvtHandler-derived adapter for GenBank data source.
CGenBankDSEvtHandler(IWorkbench *workbench)
void OnLoadFromGenBank(wxCommandEvent &event)
CGenBankLoadOptionPanel.
CGenBankUIDataSourceType.
CGenBankUIDataSource.
CGenBankUILoadManager.
CRegistryWriteView GetWriteView(const string &section)
get a read-write view at a particular level.
Definition: registry.cpp:462
static CGuiRegistry & GetInstance()
access the application-wide singleton
Definition: registry.cpp:400
CRegistryReadView GetReadView(const string &section) const
get a read-only view at a particular level.
Definition: registry.cpp:428
CMemoryRegistry –.
Definition: ncbireg.hpp:584
CObjectManager –.
CProjectSelectorPanel - a panel that allows the user to specify how the project items created by a pl...
void SetProjectService(CProjectService *service)
void GetParams(SProjectSelectorParams &params) const
void SetParams(const SProjectSelectorParams &params)
CProjectService - a service providing API for operations with Workspaces and Projects.
class CRegistryReadView provides a nested hierarchical view at a particular key.
Definition: reg_view.hpp:58
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
Definition: reg_view.cpp:230
CProjectSelectOptions - describes how new Project Items shall be added to a workspace.
CStopWatch –.
Definition: ncbitime.hpp:1937
static wxString ResolvePath(const wxString &path, const wxString &rel_name)
Utility function to hide the platform specifics of locating our standard directories and files.
Definition: sys_path.cpp:106
static wxString ResolvePathExisting(const wxString &path, const wxString &delim=wxT(","))
Utility function to hide the platform specifics of locating our standard directories.
Definition: sys_path.cpp:142
CUICommandRegistry is a centralized registry where all application commands should be registered.
Definition: ui_command.hpp:146
static CUICommandRegistry & GetInstance()
the main instance associated with the application
Definition: ui_command.cpp:176
wxMenuItem * AppendMenuItem(wxMenu &menu, TCmdID cmd_id) const
Definition: ui_command.cpp:300
IAppTask.
Definition: app_task.hpp:83
pair< wxMenu *, wxEvtHandler * > TContribution
Contribution consists of a Menu object and event handler.
Definition: pt_item.hpp:152
IServiceLocator - an abstract mechanism for locating services.
Definition: service.hpp:71
IUIDataSourceType - defines a type of a Data Source, can serve as a Data Source factory.
IUIDataSource - an interface representing a Data Source.
IUIObject - object that provides basic properties often required in a UI object.
Definition: ui_object.hpp:63
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
virtual int GetType() const =0
const TData & GetData() const
Definition: pt_item.hpp:135
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
static CMemoryRegistry registry
Definition: cn3d_tools.cpp:81
string DirName(const string &path)
Definition: fileutil.cpp:276
#define false
Definition: bool.h:36
USING_SCOPE(objects)
static const char * kProjectParamsTag
END_EVENT_TABLE()
static const char * kGenBankLoadOption
static const char * kGB_DS_Icon
CGenBankUIDataSource.
static const char * kAppExpCmdExtPoint
#define NULL
Definition: ncbistd.hpp:225
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
Definition: ncbidiag.hpp:226
void Error(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1197
const string & GetMsg(void) const
Get message string.
Definition: ncbiexpt.cpp:461
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
Definition: ncbiexpt.cpp:342
void Info(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1185
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
Definition: service.hpp:91
void SaveMruAccessions(const string &regPath)
virtual void EditProperties()
void SaveSettings(const string &regPath)
CGenBankLoadOptionPanel * m_OptionPanel
SProjectSelectorParams m_ProjectParams
virtual const IUIObject & GetDescr()
returns UI description of the type (label, icon etc.)
virtual bool IsOpen()
a Data source needs to be open before use and closed after.
virtual void SetServiceLocator(IServiceLocator *locator)
virtual void CleanUI()
CleanUI() is called after the host finished using the manager.
virtual bool CanDo(EAction action)
Indicates whether given transition is possible in the current state.
IServiceLocator * m_SrvLocator
virtual void InitUI()
Initializes the Manager before using it in UI.
virtual IExplorerItemCmdContributor::TContribution GetMenu(wxTreeCtrl &treeCtrl, PT::TItems &items)
for the given set of items returns a contribution
CProjectSelectorPanel * m_ProjectSelPanel
virtual void SetRegistryPath(const string &path)
virtual wxEvtHandler * CreateEvtHandler()
const vector< string > & GetNAs() const
virtual bool DoTransition(EAction action)
Performs transition if possible and returns true, otherwise the function shall warn the user about th...
virtual const IUIObject & GetDescr()
returns UI description of the object (label, icon etc.)
virtual IUIToolManager * GetLoadManager()
virtual bool AutoCreateDefaultDataSource()
returns "true" if this type needs to create a default instance of the Data Source at start-up
virtual int GetDefaultCommand()
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
CRef< objects::CObjectManager > m_ObjMgr
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
IServiceLocator * m_SrvLocator
virtual bool Open()
Prepares Data Source for use, any initialization that can be potentially time-consuming or may requir...
virtual void SaveSettings() const
virtual bool IsCompletedState()
Manager goes into "Complete" state when "Finish" button is pressed and all input data is gatherred an...
virtual IUIDataSource * CreateDataSource()
factory method; create an Data Source instance
CGenBankUILoadManager()
CGenBankUILoadManager.
virtual bool IsFinalState()
True if Tool Manager has reached its final state, i.e.
virtual IAppTask * GetTask()
Once parameters are gathered and validated this function is called to produce the final Task object t...
void Add(IObjectLoader *loader)
const vector< string > & GetGenomicAccessions() const
virtual IUIDataSourceType & GetType() const
virtual const IUIObject & GetDescriptor() const
Returns the object describing this tool (UI meta data).
virtual wxPanel * GetCurrentPanel()
Return the panel corresponding to the current state of Tool Manager.
CGenBankUIDataSourceType()
CGenBankUIDataSourceType.
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
virtual void SetServiceLocator(IServiceLocator *srv_locator)
Sets / unsets Service Locator.
virtual void SetParentWindow(wxWindow *parent)
CRef< CGenBankUIDataSourceType > m_Type
void LoadSettings(const string &regPath)
@ eCmdLoadFromGenBank
static CIRef< IExtensionRegistry > GetInstance()
provides access to the Singleton
virtual void SetLogEvent(const string &log_event)
Definition: ui_object.cpp:118
virtual const string & GetLabel() const
Definition: ui_object.cpp:124
const TParamTree * GetTree() const
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
string GetName(void) const
void SetLoaderOptions(const string &loader_name, EIsDefault is_default, TPriority priority=kPriority_Default)
Update loader's default-ness and priority.
CDataLoader * RegisterDataLoader(TPluginManagerParamTree *params=0, const string &driver_name=kEmptyStr)
Add data loader using plugin manager.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
bool ReferencedOnlyOnce(void) const THROWS_NONE
Check if object is referenced only once.
Definition: ncbiobj.hpp:475
TObjectType * Release(void)
Release a reference to the object and return a pointer to the object.
Definition: ncbiobj.hpp:846
virtual bool GetBool(const string &section, const string &name, bool default_value, TFlags flags=0, EErrAction err_action=eThrow) const
Get boolean value of specified parameter name.
Definition: ncbireg.cpp:391
IRWRegistry * Read(CNcbiIstream &is, TFlags flags=0, const string &path=kEmptyStr)
Read and parse the stream "is", and merge its content with current Registry entries.
Definition: ncbireg.cpp:605
virtual string GetString(const string &section, const string &name, const string &default_value, TFlags flags=0) const
Get the parameter string value.
Definition: ncbireg.cpp:321
bool Set(const string &section, const string &name, const string &value, TFlags flags=0, const string &comment=kEmptyStr)
Set the configuration parameter value.
Definition: ncbireg.cpp:826
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
Definition: ncbistre.hpp:439
static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)
Convert double to string.
Definition: ncbistr.hpp:5187
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
Definition: ncbistr.hpp:5084
double Restart(void)
Return time elapsed since first Start() or last Restart() call (in seconds).
Definition: ncbitime.hpp:2816
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
Definition: ncbitime.hpp:2775
void Start(void)
Start the timer.
Definition: ncbitime.hpp:2764
static CStopWatch sw
#define wxT(x)
Definition: muParser.cpp:41
@ eDataSource
Definition: pt_item.hpp:121
vector< CItem * > TItems
Definition: pt_item.hpp:113
EIPRangeType t
Definition: ncbi_localip.c:101
Defines process management classes.
Defines a portable execute class.
NetCache ICache client specs.
std::istream & in(std::istream &in_, double &x_)
The Object manager core.
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
void LoadSettings(CRegistryReadView &view, const string &section)
bool m_CreateFolder
package in a single item
void ToLoadingOptions(CSelectProjectOptions &options)
void SaveSettings(CRegistryWriteView &view, const string &section) const
SRegisterLoaderInfo –.
Definition: type.c:6
#define _ASSERT
wxFileArtProvider * GetDefaultFileArtProvider()
Definition: wx_utils.cpp:334
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
wxString FnToWxString(const string &s)
Definition: wx_utils.cpp:253
string FnToStdString(const wxString &s)
Definition: wx_utils.cpp:268
#define const
Definition: zconf.h:232
Modified on Sun May 05 05:19:16 2024 by modify_doxy.py rev. 669887