: m_LocalTaxonsLoaded(
false)
56, m_NetTaxonsLoaded(
false)
77ctrl.Append(
wxT(
"none"), (
void*)0);
83vector<void*> itemData;
85items.push_back(
wxT(
"none"));
86itemData.push_back((
void*)0);
89 for(
size_t i= 0;
i<
data.size(); ++
i) {
90 if(
data[
i].m_Id == selectTaxId)
91selectIndex =
static_cast<int>(
i+ 1);
92items.push_back(
data[
i].m_Label);
95ctrl.Append(items, &itemData[0]);
96ctrl.SetSelection(selectIndex);
101 if(!callback)
return;
114 if(!callback)
return;
117it = (*it == callback) ?
m_Callbacks.erase(it) : ++it;
124cb->TaxonsLoaded(
local);
129 classCTaxonDataResult :
public CObject 132CTaxonDataResult() {}
133 virtual~CTaxonDataResult() {}
143CLocalTaxonDataJob(
bool local) : m_Local(
local) {}
144 virtual~CLocalTaxonDataJob() {}
148 virtual string GetDescr()
const{
return "Loading taxon data"; }
149 virtualEJobState
Run();
156 virtual stringx_GetJobName()
const{
return "TaxonDataJob"; }
279 boolreload = loaded;
301m_Result.Reset(
result.GetPointer());
317ids.reserve(
data.size());
318for_each(
data.begin(),
data.end(), [&ids](
int id) {
319if (id != 0) ids.push_back(id);
321}
NCBI_CATCH(
"CBlastServices::GetTaxIdWithWindowMaskerSupport()");
324 if(ids.empty())
returneCompleted;
326 sort(ids.begin(), ids.end(), [](
inti1,
inti2) ->
bool 328if (i2 == 9606) return false;
329if (i1 == 9606) return true;
330if (i2 == 10090) return false;
331if (i1 == 10090) return true;
340 for(
auto i: ids) {
Declares the CBlastServices class.
CAppJobNotification Notification send by CAppJobEventTranslator.
API for Remote Blast Services.
CEvent - generic event implementation TODO TODO - Attachments.
Base class to build jobs with cancel functionality.
TTaxonVector m_LocalTaxons
CAppJobDispatcher::TJobID m_NetJobId
CAppJobDispatcher::TJobID m_LocalJobId
void x_OnJobNotification(CEvent *evt)
vector< STaxonData > TTaxonVector
bool FillControl(ICallback *callback, wxControlWithItems &ctrl, bool local, int selectTaxId)
void x_AddCallback(ICallback *callback)
void x_DoCallbacks(bool local)
void Reset(bool local=true)
void x_JobCanceled(CAppJobDispatcher::TJobID jobId)
void x_JobCompleted(CAppJobDispatcher::TJobID jobId, const TTaxonVector &result)
list< ICallback * > m_Callbacks
void x_DeleteCallback(ICallback *callback)
static CTaxIdHelper & GetInstance()
void x_JobFailed(CAppJobDispatcher::TJobID jobId)
static void x_FillControl(wxControlWithItems &ctrl, const TTaxonVector &data, int selectTaxId)
void Initialize(const vector< int > &tax_ids)
void ResetConnection()
Drop connection to NCBI taxon service.
static CTaxonCache & GetInstance()
string GetLabel(int tax_id)
void GetTaxIds(vector< int > &ids)
static CWinMaskerFileStorage & GetInstance()
access the application-wide singleton
bool IsDownloading() const
objects::CBlast4_get_windowmasked_taxids_reply::Tdata GetTaxIdWithWindowMaskerSupport()
Retrieve a list of NCBI taxonomy IDs for which there exists windowmasker masking data to support an a...
#define NCBI_CATCH(message)
Catch CExceptions as well This macro is deprecated - use *_X or *_XX variant instead of it.
virtual CConstIRef< IAppJobProgress > GetProgress()=0
return progress object, the function shall be synchronized internally.
static CAppJobDispatcher & GetInstance()
CRef< CObject > GetResult() const
returns non-null pointer only if Completed or Running and has temporary results available
virtual CConstIRef< IAppJobError > GetError()=0
Returns IAppJobError object describing internal error that caused the Job to fail.
virtual CRef< CObject > GetResult()=0
Returns the Job Result.
bool DeleteJob(TJobID job_id)
when a Job is deleted the listener is not notified
TJobID StartJob(IAppJob &job, const string &engine_name, IEngineParams *params=NULL)
Starts a Job on the specified engine in "passive mode" - no notifications or progress reports will be...
virtual string GetDescr() const =0
Returns a human readable description of the Job (optional)
#define ON_EVENT(type, id, handler)
virtual EJobState Run()=0
Function that does all the useful work, called by the Engine.
#define END_EVENT_MAP()
Ends definition of Command Map.
#define BEGIN_EVENT_MAP(thisClass, baseClass)
Begins definition of Command Map for CEventHandler-derived class.
TJobState GetState() const
void Reset(void)
Reset reference object.
TObjectType * GetPointerOrNull(void) THROWS_NONE
Get pointer value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
void Run(void)
Enter the main loop.
static const char label[]
constexpr auto sort(_Init &&init)
void SleepMilliSec(unsigned long ml_sec, EInterruptOnSignal onsignal=eRestartOnSignal)
@ eCanceled
Request canceled.
wxString ToWxString(const string &s)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4