NCBI C++ ToolKit
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
CBLASTToolManagerBase Class Reference

Search Toolkit Book for CBLASTToolManagerBase

CBLASTToolManagerBase. More...

#include <gui/packages/pkg_alignment/blast_tool_manager_base.hpp>

+ Inheritance diagram for CBLASTToolManagerBase:
+ Collaboration diagram for CBLASTToolManagerBase:

List of all members.

Public Member Functions

 CBLASTToolManagerBase ()
 CBLASTToolManagerBase.
IUIToolManager interface implementation
virtual void SetServiceLocator (IServiceLocator *srv_locator)
 Sets / unsets Service Locator.
virtual void SetParentWindow (wxWindow *parent)
virtual const IUIObjectGetDescriptor () const
 Returns the object describing this tool (UI meta data).
virtual void InitUI ()
 Initializes the Manager before using it in UI.
virtual void CleanUI ()
 CleanUI() is called after the host finished using the manager.
virtual wxPanel * GetMaxPanel ()
 Return the panel that occupies max size on display, to calculate dialog window size.
virtual wxPanel * GetCurrentPanel ()
 Return the panel corresponding to the current state of Tool Manager.
virtual bool CanDo (EAction action)
 Indicates whether given transition is possible in the current state.
virtual bool IsFinalState ()
 True if Tool Manager has reached its final state, i.e.
virtual bool IsCompletedState ()
 Manager goes into "Complete" state when "Finish" button is pressed and all input data is gatherred and validated.
virtual bool DoTransition (EAction action)
 Performs transition if possible and returns true, otherwise the function shall warn the user about the problem preventing the transition (such as insufficient or invalid input) and return false.
virtual string GetCategory ()
 returns the name for the ToolCategory to which the tool belongs.
virtual string SetInputObjects (const TConstScopedObjects &input)
 sets input objects that can be used as arguments for the tool.
virtual bool CanQuickLaunch () const
virtual IAppTaskQuickLaunch ()
IRegSettings interface implementation

IExtension interface will be implemented in derived classes

virtual void SetRegistryPath (const string &path)
virtual void LoadSettings ()
virtual void SaveSettings () const

Protected Types

enum  EState {
  eInvalid = -1, eOptions, eParams, eSelectProject,
  eCompleted
}

Protected Member Functions

void x_InitDBsInParams (CNetBLASTUIDataSource &ds, bool nuc_db)
 validate DB and MRU DB fields in BLAST Params and initializes them if needed
CRef< CNetBLASTUIDataSourceGetBLASTDataSource ()
virtual void x_SelectCompatibleInputObjects ()
virtual bool x_IsNucInput () const
 defines whether Nucleotide or Protein options shall be selected by default
void x_ConvertInputObjects (const CTypeInfo *typeInfo, TConstScopedObjects &results)
virtual void x_CreateOptionsPanelIfNeeded ()
virtual void x_CreateParamsPanelIfNeeded ()
virtual void x_CreateProjectPanelIfNeeded ()
virtual bool x_ValidateOptions ()=0
virtual bool x_ValidateParams ()
 validate parameters after Params page

Protected Attributes

CUIObject m_Descriptor
 describes the Manager's UI properties
bool m_Remote
IServiceLocatorm_SrvLocator
wxWindow * m_ParentWindow
string m_RegPath
string m_LocalWinMaskDirPath
TConstScopedObjects m_InputObjects
TConstScopedObjects m_NucObjects
TConstScopedObjects m_ProtObjects
bool m_UseNucForMixInput
CBLASTParams m_Params
EState m_State
CBLASTSearchOptionsPanelm_OptionsPanel
CBLASTSearchParamsPanelm_ParamsPanel
CProjectSelectorPanelm_ProjectSelPanel
SProjectSelectorParams m_ProjectParams

Detailed Description

CBLASTToolManagerBase.

Definition at line 64 of file blast_tool_manager_base.hpp.


Member Enumeration Documentation

Enumerator:
eInvalid 
eOptions 
eParams 
eSelectProject 
eCompleted 

Definition at line 107 of file blast_tool_manager_base.hpp.


Constructor & Destructor Documentation


Member Function Documentation

bool CBLASTToolManagerBase::CanDo ( EAction  action) [virtual]

Indicates whether given transition is possible in the current state.

Implements IUIToolManager.

Definition at line 230 of file blast_tool_manager_base.cpp.

References _ASSERT, IUIToolManager::eBack, eCompleted, eInvalid, IUIToolManager::eNext, eOptions, eParams, eSelectProject, and m_State.

virtual bool CBLASTToolManagerBase::CanQuickLaunch ( ) const [inline, virtual]

Implements IUIAlgoToolManager.

Reimplemented in CBLASTSearchToolManager.

Definition at line 93 of file blast_tool_manager_base.hpp.

void CBLASTToolManagerBase::CleanUI ( ) [virtual]

CleanUI() is called after the host finished using the manager.

This function shall free resources associated with the session and reset internal state.

Implements IUIToolManager.

Definition at line 102 of file blast_tool_manager_base.cpp.

References eInvalid, m_InputObjects, m_OptionsPanel, m_ParamsPanel, m_ProjectSelPanel, and m_State.

Performs transition if possible and returns true, otherwise the function shall warn the user about the problem preventing the transition (such as insufficient or invalid input) and return false.

Typically this function would take user input from the current panel, validate the input and go to the next state creating new UI panel if needed.

Implements IUIToolManager.

Definition at line 261 of file blast_tool_manager_base.cpp.

References _ASSERT, eCompleted, eInvalid, IUIToolManager::eNext, eOptions, eParams, ERR_POST, eSelectProject, CException::GetMsg(), LOG_POST, m_OptionsPanel, m_ParamsPanel, m_ProjectSelPanel, m_State, NcbiErrorBox(), CException::ReportAll(), Trace(), CBLASTSearchOptionsPanel::TransferDataFromWindow(), CBLASTSearchParamsPanel::TransferDataFromWindow(), CProjectSelectorPanel::TransferDataFromWindow(), CBLASTSearchOptionsPanel::TransferDataToWindow(), CBLASTSearchParamsPanel::TransferDataToWindow(), CProjectSelectorPanel::TransferDataToWindow(), x_CreateOptionsPanelIfNeeded(), x_CreateParamsPanelIfNeeded(), x_CreateProjectPanelIfNeeded(), x_ValidateOptions(), and x_ValidateParams().

returns the name for the ToolCategory to which the tool belongs.

Tools are shown in in UI groupped by Categories.

Implements IUIAlgoToolManager.

Definition at line 332 of file blast_tool_manager_base.cpp.

wxPanel * CBLASTToolManagerBase::GetCurrentPanel ( ) [virtual]

Return the panel corresponding to the current state of Tool Manager.

Implements IUIToolManager.

Definition at line 122 of file blast_tool_manager_base.cpp.

References eOptions, eParams, eSelectProject, m_OptionsPanel, m_ParamsPanel, m_ProjectSelPanel, and m_State.

Returns the object describing this tool (UI meta data).

Implements IUIToolManager.

Definition at line 83 of file blast_tool_manager_base.cpp.

References m_Descriptor.

wxPanel * CBLASTToolManagerBase::GetMaxPanel ( ) [virtual]

Return the panel that occupies max size on display, to calculate dialog window size.

Reimplemented from IUIToolManager.

Definition at line 114 of file blast_tool_manager_base.cpp.

References CBLASTSearchOptionsPanel::Create(), m_ParentWindow, m_Remote, and CBLASTSearchOptionsPanel::SetRemote().

void CBLASTToolManagerBase::InitUI ( ) [virtual]

Initializes the Manager before using it in UI.

This function shall reset Internal state of the tool.

Implements IUIToolManager.

Definition at line 89 of file blast_tool_manager_base.cpp.

References eInvalid, m_InputObjects, m_OptionsPanel, m_ParamsPanel, m_ProjectSelPanel, and m_State.

Manager goes into "Complete" state when "Finish" button is pressed and all input data is gatherred and validated.

Typically this is the last state after Final state. This state does not have an associated UI panel. When manager reaches the “Completed” state the framework hides the dialog and calls GetTask() function.

Implements IUIToolManager.

Definition at line 255 of file blast_tool_manager_base.cpp.

References eCompleted, and m_State.

True if Tool Manager has reached its final state, i.e.

the last page (panel) in the sequence is displayed and "Finish" button is shown. The framework calls this function to decide whether “Finish” or “Next” button needs to be shown.

Implements IUIToolManager.

Definition at line 249 of file blast_tool_manager_base.cpp.

References eSelectProject, and m_State.

virtual IAppTask* CBLASTToolManagerBase::QuickLaunch ( ) [inline, virtual]

Implements IUIAlgoToolManager.

Reimplemented in CBLASTSearchToolManager.

Definition at line 94 of file blast_tool_manager_base.hpp.

void CBLASTToolManagerBase::SaveSettings ( ) const [virtual]

sets input objects that can be used as arguments for the tool.

the manager can save the pointer, it will remain valid until CleanUI() is called.

Implements IUIAlgoToolManager.

Definition at line 338 of file blast_tool_manager_base.cpp.

References m_InputObjects.

void CBLASTToolManagerBase::SetParentWindow ( wxWindow *  parent) [virtual]

Implements IUIToolManager.

Definition at line 77 of file blast_tool_manager_base.cpp.

References m_ParentWindow.

Implements IRegSettings.

Definition at line 390 of file blast_tool_manager_base.cpp.

References m_RegPath.

void CBLASTToolManagerBase::SetServiceLocator ( IServiceLocator srv_locator) [virtual]

Sets / unsets Service Locator.

Tool Manager can use the locator to obtain the services necessary services.

Implements IUIToolManager.

Definition at line 71 of file blast_tool_manager_base.cpp.

References m_SrvLocator.

void CBLASTToolManagerBase::x_ConvertInputObjects ( const CTypeInfo typeInfo,
TConstScopedObjects results 
) [protected]

Definition at line 370 of file blast_tool_manager_base.cpp.

References CAsyncCall::Execute(), and m_InputObjects.

Referenced by x_SelectCompatibleInputObjects().

void CBLASTToolManagerBase::x_InitDBsInParams ( CNetBLASTUIDataSource ds,
bool  nuc_db 
) [protected]
bool CBLASTToolManagerBase::x_IsNucInput ( ) const [protected, virtual]

defines whether Nucleotide or Protein options shall be selected by default

Definition at line 378 of file blast_tool_manager_base.cpp.

References m_NucObjects, m_ProtObjects, and m_UseNucForMixInput.

Referenced by CBLASTSearchToolManager::QuickLaunch(), and x_CreateOptionsPanelIfNeeded().

virtual bool CBLASTToolManagerBase::x_ValidateOptions ( ) [protected, pure virtual]

Implemented in CBLASTSeqToolManager, and CBLASTSearchToolManager.

Referenced by DoTransition().

validate parameters after Params page

Definition at line 325 of file blast_tool_manager_base.cpp.

References m_Params, and CBLASTParams::ToBlastOptions().

Referenced by DoTransition().


Member Data Documentation

Definition at line 141 of file blast_tool_manager_base.hpp.

Referenced by LoadSettings().


The documentation for this class was generated from the following files:
Modified on Wed Jul 23 17:24:29 2014 by modify_doxy.py rev. 426318