NCBI C++ ToolKit
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
CBedLoadManager Class Reference

Search Toolkit Book for CBedLoadManager

CBedLoadManager. More...

#include "bed_load_manager.hpp"
(Private to src/gui/packages/pkg_sequence.)

+ Inheritance diagram for CBedLoadManager:
+ Collaboration diagram for CBedLoadManager:

List of all members.

Classes

class  CPage

Public Member Functions

 CBedLoadManager ()
 CBedLoadManager.
IFileLoadPanelClient interface implementation
virtual string GetLabel () const
virtual wxString GetFormatWildcard () const
 return file wildcard for the format (example - "*.txt;*.tab" )
virtual string GetFileLoaderId () const
IUILoadManager 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 * 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 IAppTaskGetTask ()
 Once parameters are gathered and validated this function is called to produce the final Task object that will be executed to do the actual computational work.
virtual IWizardPageGetFirstPage ()
 Returns first options page (if any) of the tool to be shown in wizard dialog.
virtual IWizardPageGetOptionsPage ()
 Returns page for tool options (long wizard path via "Options" button)
virtual void SetPrevPage (IWizardPage *prevPage)
 Sets a wizard page which should show before the first page of the tool.
virtual IExecuteUnitGetExecuteUnit ()
virtual wxString GetFormatWildcard ()
virtual bool ValidateFilenames (const vector< wxString > &filenames)
 checks given filenames and returns true if the manager can handle them, otherwise - shows an error message
virtual void SetFilenames (const vector< wxString > &filenames)
 initilize the manager with the given filenames
virtual void GetFilenames (vector< wxString > &filenames) const
 get actual filenames that will be opened
virtual bool IsInitialState ()
 return true if the current state of the loader UI is the first valid state (first step in a wizard-like sequence)
virtual bool RecognizeFormat (const wxString &filename)
 return true if the given file format is supported by this manager
virtual bool RecognizeFormat (CFormatGuess::EFormat fmt)
 return true if the given file format is supported by this manager
IExtension interface implementation
virtual string GetExtensionIdentifier () const
 returns the unique human-readable identifier for the extension the id should use lowercase letters separated by underscores - "like_this"
virtual string GetExtensionLabel () const
 returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
IRegSettings interface implementation
virtual void SetRegistryPath (const string &path)
virtual void LoadSettings ()
virtual void SaveSettings () const

Static Public Member Functions

static string Id ()
static string Label ()

Protected Types

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

Protected Member Functions

CBedParamsPanelx_GetParamsPanel ()

Protected Attributes

CUIObject m_Descr
IServiceLocatorm_SrvLocator
wxWindow * m_ParentWindow
EState m_State
string m_RegPath
CBedParamsPanelm_ParamsPanel
CBedLoadParams m_Params
vector< wxString > m_FileNames
CPage m_OptionsPage

Detailed Description

CBedLoadManager.

Definition at line 61 of file bed_load_manager.hpp.


Member Enumeration Documentation

enum CBedLoadManager::EState [protected]
Enumerator:
eInvalid 
eParams 
eCompleted 

Definition at line 126 of file bed_load_manager.hpp.


Constructor & Destructor Documentation

CBedLoadManager.

Definition at line 50 of file bed_load_manager.cpp.


Member Function Documentation

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

Indicates whether given transition is possible in the current state.

Implements IUIToolManager.

Definition at line 125 of file bed_load_manager.cpp.

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

void CBedLoadManager::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 103 of file bed_load_manager.cpp.

References eInvalid, m_ParamsPanel, 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 151 of file bed_load_manager.cpp.

References _ASSERT, IUIToolManager::eBack, eCompleted, IUIToolManager::eNext, eParams, CBedParamsPanel::GetData(), m_Params, m_ParamsPanel, m_State, and CBedParamsPanel::TransferDataFromWindow().

wxPanel * CBedLoadManager::GetCurrentPanel ( ) [virtual]

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

Implements IUIToolManager.

Definition at line 110 of file bed_load_manager.cpp.

References eParams, m_State, and x_GetParamsPanel().

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

Implements IUIToolManager.

Definition at line 91 of file bed_load_manager.cpp.

References m_Descr.

Reimplemented from IFileLoadPanelClient.

Definition at line 174 of file bed_load_manager.cpp.

References m_FileNames, and m_Params.

returns the unique human-readable identifier for the extension the id should use lowercase letters separated by underscores - "like_this"

Implements IExtension.

Definition at line 223 of file bed_load_manager.cpp.

returns a displayable label for this extension ( please capitalize the key words - "My Extension" )

Implements IExtension.

Definition at line 230 of file bed_load_manager.cpp.

virtual string CBedLoadManager::GetFileLoaderId ( ) const [inline, virtual]

Implements IFileFormatLoaderManager.

Definition at line 76 of file bed_load_manager.hpp.

References Id().

void CBedLoadManager::GetFilenames ( vector< wxString > &  filenames) const [virtual]

get actual filenames that will be opened

Implements IFileFormatLoaderManager.

Definition at line 198 of file bed_load_manager.cpp.

References m_FileNames.

virtual IWizardPage* CBedLoadManager::GetFirstPage ( ) [inline, virtual]

Returns first options page (if any) of the tool to be shown in wizard dialog.

Reimplemented from IToolWizard.

Definition at line 92 of file bed_load_manager.hpp.

wxString CBedLoadManager::GetFormatWildcard ( ) const [virtual]

return file wildcard for the format (example - "*.txt;*.tab" )

Implements IFileLoadPanelClient.

Definition at line 69 of file bed_load_manager.cpp.

References CFileExtensions::GetDialogFilter(), CFileExtensions::kAllFiles, CFileExtensions::kBED, and wxT.

wxString CBedLoadManager::GetFormatWildcard ( ) [virtual]
string CBedLoadManager::GetLabel ( void  ) const [virtual]

Implements IFileLoadPanelClient.

Definition at line 64 of file bed_load_manager.cpp.

References CUIObject::GetLabel(), and m_Descr.

virtual IWizardPage* CBedLoadManager::GetOptionsPage ( ) [inline, virtual]

Returns page for tool options (long wizard path via "Options" button)

Reimplemented from IToolWizard.

Definition at line 93 of file bed_load_manager.hpp.

References m_OptionsPage.

Once parameters are gathered and validated this function is called to produce the final Task object that will be executed to do the actual computational work.

Implements IUIToolManager.

Definition at line 169 of file bed_load_manager.cpp.

static string CBedLoadManager::Id ( void  ) [inline, static]

Definition at line 122 of file bed_load_manager.hpp.

Referenced by GetFileLoaderId().

void CBedLoadManager::InitUI ( ) [virtual]

Initializes the Manager before using it in UI.

This function shall reset Internal state of the tool.

Implements IUIToolManager.

Definition at line 97 of file bed_load_manager.cpp.

References eParams, 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 145 of file bed_load_manager.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 139 of file bed_load_manager.cpp.

References eParams, and m_State.

return true if the current state of the loader UI is the first valid state (first step in a wizard-like sequence)

Implements IFileFormatLoaderManager.

Definition at line 203 of file bed_load_manager.cpp.

References eParams, and m_State.

static string CBedLoadManager::Label ( ) [inline, static]

Definition at line 123 of file bed_load_manager.hpp.

void CBedLoadManager::LoadSettings ( ) [virtual]

Implements IRegSettings.

Definition at line 248 of file bed_load_manager.cpp.

References CBedLoadParams::LoadSettings(), and m_Params.

bool CBedLoadManager::RecognizeFormat ( const wxString &  filename) [virtual]

return true if the given file format is supported by this manager

Implements IFileFormatLoaderManager.

Definition at line 209 of file bed_load_manager.cpp.

References wxT.

return true if the given file format is supported by this manager

Implements IFileFormatLoaderManager.

Definition at line 216 of file bed_load_manager.cpp.

References CFormatGuess::eBed, and CFormatGuess::eBed15.

void CBedLoadManager::SaveSettings ( ) const [virtual]

Implements IRegSettings.

Definition at line 242 of file bed_load_manager.cpp.

References m_Params, and CBedLoadParams::SaveSettings().

void CBedLoadManager::SetFilenames ( const vector< wxString > &  filenames) [virtual]

initilize the manager with the given filenames

Implements IFileFormatLoaderManager.

Definition at line 193 of file bed_load_manager.cpp.

References filenames, and m_FileNames.

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

Implements IToolWizard.

Definition at line 85 of file bed_load_manager.cpp.

References m_ParentWindow.

virtual void CBedLoadManager::SetPrevPage ( IWizardPage ) [inline, virtual]

Sets a wizard page which should show before the first page of the tool.

Reimplemented from IToolWizard.

Definition at line 94 of file bed_load_manager.hpp.

References m_OptionsPage, and CWizardPage::SetPrevPage().

void CBedLoadManager::SetRegistryPath ( const string path) [virtual]

Implements IRegSettings.

Definition at line 236 of file bed_load_manager.cpp.

References m_Params, m_RegPath, and CBedLoadParams::SetRegistryPath().

void CBedLoadManager::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 79 of file bed_load_manager.cpp.

References m_SrvLocator.

bool CBedLoadManager::ValidateFilenames ( const vector< wxString > &  filenames) [virtual]

checks given filenames and returns true if the manager can handle them, otherwise - shows an error message

Implements IFileFormatLoaderManager.

Definition at line 186 of file bed_load_manager.cpp.


Member Data Documentation

Definition at line 144 of file bed_load_manager.hpp.

Referenced by GetDescriptor(), and GetLabel().

vector<wxString> CBedLoadManager::m_FileNames [protected]

Definition at line 154 of file bed_load_manager.hpp.

Referenced by GetExecuteUnit(), GetFilenames(), and SetFilenames().

Definition at line 156 of file bed_load_manager.hpp.

Referenced by GetOptionsPage(), and SetPrevPage().

Definition at line 152 of file bed_load_manager.hpp.

Referenced by CleanUI(), DoTransition(), and x_GetParamsPanel().

wxWindow* CBedLoadManager::m_ParentWindow [protected]

Definition at line 147 of file bed_load_manager.hpp.

Referenced by SetParentWindow(), and x_GetParamsPanel().

Definition at line 150 of file bed_load_manager.hpp.

Referenced by SetRegistryPath().

Definition at line 146 of file bed_load_manager.hpp.

Referenced by SetServiceLocator().


The documentation for this class was generated from the following files:
Modified on Mon May 04 11:09:26 2015 by modify_doxy.py rev. 426318