NCBI C++ ToolKit
|
Search Toolkit Book for CGCAssemblyLoadManager
CGCAssemblyLoadManager - Load Manager that loads genome collection assembly. More...
#include <gui/core/ui_gcassembly_load_manager.hpp>
Public Member Functions | |
CGCAssemblyLoadManager () | |
CGCAssemblyLoadManager. More... | |
IUIToolManager interface implementation | |
virtual void | SetServiceLocator (IServiceLocator *srv_locator) |
Sets / unsets Service Locator. More... | |
virtual void | SetParentWindow (wxWindow *parent) |
virtual const IUIObject & | GetDescriptor () const |
Returns the object describing this tool (UI meta data). More... | |
virtual void | InitUI () |
Initializes the Manager before using it in UI. More... | |
virtual void | CleanUI () |
CleanUI() is called after the host finished using the manager. More... | |
virtual wxPanel * | GetCurrentPanel () |
Return the panel corresponding to the current state of Tool Manager. More... | |
virtual bool | CanDo (EAction action) |
Indicates whether given transition is possible in the current state. More... | |
virtual bool | IsFinalState () |
True if Tool Manager has reached its final state, i.e. More... | |
virtual bool | IsCompletedState () |
Manager goes into "Complete" state when "Finish" button is pressed and all input data is gatherred and validated. More... | |
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. More... | |
virtual IAppTask * | GetTask () |
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. More... | |
IRegSettings interface implementation | |
virtual void | SetRegistryPath (const string &path) |
virtual void | LoadSettings () |
virtual void | SaveSettings () const |
![]() | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (const CObject &src) THROWS_NONE |
Assignment operator. More... | |
bool | CanBeDeleted (void) const THROWS_NONE |
Check if object can be deleted. More... | |
bool | IsAllocatedInPool (void) const THROWS_NONE |
Check if object is allocated in memory pool (not system heap) More... | |
bool | Referenced (void) const THROWS_NONE |
Check if object is referenced. More... | |
bool | ReferencedOnlyOnce (void) const THROWS_NONE |
Check if object is referenced only once. More... | |
void | AddReference (void) const |
Add reference to object. More... | |
void | RemoveReference (void) const |
Remove reference to object. More... | |
void | ReleaseReference (void) const |
Remove reference without deleting object. More... | |
virtual void | DoNotDeleteThisObject (void) |
Mark this object as not allocated in heap – do not delete this object. More... | |
virtual void | DoDeleteThisObject (void) |
Mark this object as allocated in heap – object can be deleted. More... | |
void * | operator new (size_t size) |
Define new operator for memory allocation. More... | |
void * | operator new[] (size_t size) |
Define new[] operator for 'array' memory allocation. More... | |
void | operator delete (void *ptr) |
Define delete operator for memory deallocation. More... | |
void | operator delete[] (void *ptr) |
Define delete[] operator for memory deallocation. More... | |
void * | operator new (size_t size, void *place) |
Define new operator. More... | |
void | operator delete (void *ptr, void *place) |
Define delete operator. More... | |
void * | operator new (size_t size, CObjectMemoryPool *place) |
Define new operator using memory pool. More... | |
void | operator delete (void *ptr, CObjectMemoryPool *place) |
Define delete operator. More... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. More... | |
![]() | |
CDebugDumpable (void) | |
virtual | ~CDebugDumpable (void) |
void | DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const |
void | DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const |
void | DumpToConsole (void) const |
![]() | |
virtual wxPanel * | GetMaxPanel () |
Return the panel that occupies max size on display, to calculate dialog window size. More... | |
virtual IUIToolManager * | GetAlternateToolManager () |
If a transition fails, it may make sense to switch to a different tool manger When a tool manager identifies a more appropriate manager for a task, it returns it here, otherwise NULL. More... | |
virtual IExecuteUnit * | GetExecuteUnit () |
virtual IWizardPage * | GetFirstPage () |
Returns first options page (if any) of the tool to be shown in wizard dialog. More... | |
virtual IWizardPage * | GetOptionsPage () |
Returns page for tool options (long wizard path via "Options" button) More... | |
virtual void | SetPrevPage (IWizardPage *) |
Sets a wizard page which should show before the first page of the tool. More... | |
virtual void | SetNextPage (IWizardPage *) |
Sets a wizard page which should show after the last page of the tool. More... | |
virtual void | RestoreDefaults () |
Restores the default options for the current panel. More... | |
virtual void | ResetState () |
virtual bool | UsesSingleOMScope () |
virtual | ~IUIToolManager () |
![]() | |
virtual | ~IRegSettings () |
Protected Types | |
enum | EState { eInvalid = -1 , eSearchAssembly , eSelectProject , eCompleted } |
Private Attributes | |
CUIObject | m_Descriptor |
IServiceLocator * | m_SrvLocator |
wxWindow * | m_ParentWindow |
EState | m_State |
string | m_RegPath |
vector< string > | m_AssmAccs |
SProjectSelectorParams | m_ProjectParams |
CAssemblyListPanel * | m_AssmPanel |
CProjectSelectorPanel * | m_PrjPanel |
Additional Inherited Members | |
![]() | |
enum | EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern } |
Control filling of newly allocated memory. More... | |
typedef CObjectCounterLocker | TLockerType |
Default locker type for CRef. More... | |
typedef atomic< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
![]() | |
enum | EAction { eBack = 0 , eNext , eSkip } |
![]() | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (void) |
Define method to throw null pointer exception. More... | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (const type_info &type) |
static EAllocFillMode | GetAllocFillMode (void) |
static void | SetAllocFillMode (EAllocFillMode mode) |
static void | SetAllocFillMode (const string &value) |
Set mode from configuration parameter value. More... | |
![]() | |
static void | EnableDebugDump (bool on) |
![]() | |
static const TCount | eCounterBitsCanBeDeleted = 1 << 0 |
Define possible object states. More... | |
static const TCount | eCounterBitsInPlainHeap = 1 << 1 |
Heap signature was found. More... | |
static const TCount | eCounterBitsPlaceMask |
Mask for 'in heap' state flags. More... | |
static const int | eCounterStep = 1 << 2 |
Skip over the "in heap" bits. More... | |
static const TCount | eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2) |
Minimal value for valid objects (reference counter is zero) Must be a single bit value. More... | |
static const TCount | eCounterStateMask |
Valid object, and object in heap. More... | |
![]() | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
CGCAssemblyLoadManager - Load Manager that loads genome collection assembly.
Definition at line 52 of file ui_gcassembly_load_manager.hpp.
|
protected |
Enumerator | |
---|---|
eInvalid | |
eSearchAssembly | |
eSelectProject | |
eCompleted |
Definition at line 83 of file ui_gcassembly_load_manager.hpp.
CGCAssemblyLoadManager::CGCAssemblyLoadManager | ( | ) |
Definition at line 60 of file ui_gcassembly_load_manager.cpp.
References m_Descriptor, SProjectSelectorParams::m_EnableDecideLater, m_ProjectParams, and CUIObject::SetLogEvent().
Indicates whether given transition is possible in the current state.
Implements IUIToolManager.
Definition at line 132 of file ui_gcassembly_load_manager.cpp.
References _ASSERT, IUIToolManager::eBack, eCompleted, IUIToolManager::eNext, eSearchAssembly, eSelectProject, and m_State.
|
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 97 of file ui_gcassembly_load_manager.cpp.
References eInvalid, m_AssmAccs, m_AssmPanel, m_PrjPanel, m_State, and NULL.
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 163 of file ui_gcassembly_load_manager.cpp.
References _ASSERT, IUIToolManager::eBack, eCompleted, IUIToolManager::eNext, eSearchAssembly, eSelectProject, CAssemblyListPanel::GetSelectedAssemblies(), CAssemblyListPanel::IsInputValid(), m_AssmAccs, m_AssmPanel, m_PrjPanel, m_State, CAssemblyListPanel::SaveSettings(), and CProjectSelectorPanel::TransferDataFromWindow().
|
virtual |
Return the panel corresponding to the current state of Tool Manager.
Implements IUIToolManager.
Definition at line 107 of file ui_gcassembly_load_manager.cpp.
References eSearchAssembly, eSelectProject, IServiceLocator::GetServiceByType(), kAssmListTag, CAssemblyListPanel::LoadSettings(), m_AssmPanel, m_ParentWindow, m_PrjPanel, m_ProjectParams, m_RegPath, m_SrvLocator, m_State, NULL, CProjectSelectorPanel::SetParams(), CProjectSelectorPanel::SetProjectService(), CAssemblyListPanel::SetRegistryPath(), and CProjectSelectorPanel::TransferDataToWindow().
Returns the object describing this tool (UI meta data).
Implements IUIToolManager.
Definition at line 85 of file ui_gcassembly_load_manager.cpp.
References m_Descriptor.
|
virtual |
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 201 of file ui_gcassembly_load_manager.cpp.
References CProjectSelectorPanel::GetParams(), IServiceLocator::GetServiceByType(), m_AssmAccs, SProjectSelectorParams::m_CreateFolder, SProjectSelectorParams::m_FolderName, m_PrjPanel, m_ProjectParams, m_SrvLocator, and SProjectSelectorParams::ToLoadingOptions().
|
virtual |
Initializes the Manager before using it in UI.
This function shall reset Internal state of the tool.
Implements IUIToolManager.
Definition at line 91 of file ui_gcassembly_load_manager.cpp.
References eSearchAssembly, and m_State.
|
virtual |
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 157 of file ui_gcassembly_load_manager.cpp.
References eCompleted, and m_State.
|
virtual |
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 151 of file ui_gcassembly_load_manager.cpp.
References eSelectProject, and m_State.
|
virtual |
Implements IRegSettings.
Definition at line 237 of file ui_gcassembly_load_manager.cpp.
References CGuiRegistry::GetInstance(), CGuiRegistry::GetReadView(), kProjectParamsTag, CAssemblyListPanel::LoadSettings(), SProjectSelectorParams::LoadSettings(), m_AssmPanel, m_ProjectParams, and m_RegPath.
|
virtual |
Implements IRegSettings.
Definition at line 224 of file ui_gcassembly_load_manager.cpp.
References CGuiRegistry::GetInstance(), CGuiRegistry::GetWriteView(), kProjectParamsTag, m_AssmPanel, m_ProjectParams, m_RegPath, CAssemblyListPanel::SaveSettings(), and SProjectSelectorParams::SaveSettings().
|
virtual |
Implements IUIToolManager.
Definition at line 79 of file ui_gcassembly_load_manager.cpp.
References m_ParentWindow.
Implements IRegSettings.
Definition at line 218 of file ui_gcassembly_load_manager.cpp.
References m_RegPath.
|
virtual |
Sets / unsets Service Locator.
Tool Manager can use the locator to obtain the services necessary services.
Implements IUIToolManager.
Definition at line 73 of file ui_gcassembly_load_manager.cpp.
References m_SrvLocator.
|
private |
Definition at line 98 of file ui_gcassembly_load_manager.hpp.
Referenced by CleanUI(), DoTransition(), and GetTask().
|
private |
Definition at line 102 of file ui_gcassembly_load_manager.hpp.
Referenced by CleanUI(), DoTransition(), GetCurrentPanel(), LoadSettings(), and SaveSettings().
|
private |
Definition at line 91 of file ui_gcassembly_load_manager.hpp.
Referenced by CGCAssemblyLoadManager(), and GetDescriptor().
|
private |
Definition at line 94 of file ui_gcassembly_load_manager.hpp.
Referenced by GetCurrentPanel(), and SetParentWindow().
|
private |
Definition at line 103 of file ui_gcassembly_load_manager.hpp.
Referenced by CleanUI(), DoTransition(), GetCurrentPanel(), and GetTask().
|
private |
Definition at line 100 of file ui_gcassembly_load_manager.hpp.
Referenced by CGCAssemblyLoadManager(), GetCurrentPanel(), GetTask(), LoadSettings(), and SaveSettings().
|
private |
Definition at line 97 of file ui_gcassembly_load_manager.hpp.
Referenced by GetCurrentPanel(), LoadSettings(), SaveSettings(), and SetRegistryPath().
|
private |
Definition at line 93 of file ui_gcassembly_load_manager.hpp.
Referenced by GetCurrentPanel(), GetTask(), and SetServiceLocator().
|
private |
Definition at line 95 of file ui_gcassembly_load_manager.hpp.
Referenced by CanDo(), CleanUI(), DoTransition(), GetCurrentPanel(), InitUI(), IsCompletedState(), and IsFinalState().