62 switch( loc.
Which() ){
152 , m_TotalComparisons(1)
153 , m_CompletedComparisons(0)
180 return string(
"CFeatureRetrievalJob" );
205 seq_id = seq_loc->
GetId();
210 seq_id =
dynamic_cast<const CSeq_id*
>(object);
222 for(
int i = 0; feat_iter && !
IsCanceled(); ++feat_iter ){
231 }
else if( seq_id !=
NULL ){
234 const CSeq_id& part_id = ci.GetSeq_id();
239 range += ci.GetRange();
251 range = ci.GetRange();
282 CScope& scope = map_feat.GetAnnot().GetScope();
314 if( map_feat.IsSetProduct() ){
315 const CSeq_loc& loc = map_feat.GetProduct();
392 .SetExcludeExternal(
true )
422 LOG_POST(
Error <<
"CFeatTableDS::Update(): Failed to start job: " << e.GetMsg() );
436 switch( e.GetErrCode() ) {
444 LOG_POST(
Error <<
"CFeatTableDS::ClearCurrentJob(): " << e.GetMsg() );
475 names.push_back( it->first );
486 x_OnJobNotification( evt );
498 int job_id = notif -> GetJobID();
503 switch( notif -> GetState() ){
596 return wxT(
"string");
627 rv +=
wxT(
" (partial)");
651 : m_Disabled(
false )
652 , m_Label( wxEmptyString ), m_Types(), m_FromLoc( -1 ), m_ToLoc( -1 ), m_InclLoc(
false )
653 , m_LengthLoc( -1 ), m_Product( wxEmptyString ), m_NoProduct(
false )
668 size_t ix = line.Find(
m_Label.Upper() );
669 if( ix == wxNOT_FOUND ){
679 size_t ix =
m_Types.Index( line,
false,
false );
680 if( ix == wxNOT_FOUND ){
723 size_t ix = prod.Find(
m_Product.Upper() );
724 if( ix == wxNOT_FOUND ){
static CRef< CScope > m_Scope
User-defined methods of the data storage class.
size_t GetSize(void) const
CAppJobError Default implementation for IAppJobError - encapsulates a text error message.
IAppJobListener Interface for components that need to be notified about changes in Jobs.
CAppJobNotification Notification send by CAppJobEventTranslator.
CAppJobProgress Default implementation for IAppJobProgress - the class encapsulates a text message an...
CEvent - generic event implementation TODO TODO - Attachments.
CFeatTableDS Data source for Feature Table widget.
virtual int GetNumRows() const
Returns the number of rows in the model.
virtual wxVariant GetValueAt(int row, int col) const
void Update()
reloads data based on current settings
vector< SFeatureRow > m_FeatureRows
CRef< objects::CScope > m_Scope
void OnJobNotification(CEvent *evt)
const objects::CSeq_feat & GetFeature(size_t row) const
const SFeatureRow & GetFeatureRow(size_t row) const
virtual int GetNumColumns() const
Returns the number of columns in the model.
virtual wxString GetColumnName(int aColIx) const
Returns a default name for the column using spreadsheet conventions: A, B, C, ...
void SetSelector(const objects::SAnnotSelector &sel)
sets the DataSource-specific filter
CConstRef< CSerialObject > m_Object
virtual void x_OnJobNotification(CEvent *evt)
void GetTypeNames(vector< string > &names) const
objects::SAnnotSelector m_Selector
void Init(const CSerialObject &obj, objects::CScope &scope, const objects::SAnnotSelector *sel=0)
void x_NotifyObserversNow()
CAppJobDispatcher::TJobID m_ActiveJob
app job notification and control
virtual wxString GetColumnType(int aColIx) const
Tries to extract actual type from row 0 value if it exists.
Alignment-based data source.
virtual CRef< CObject > GetResult()
Returns the Job Result.
size_t m_TotalComparisons
for status reporting
virtual EJobState Run()
Function that does all the useful work, called by the Engine.
CRef< CFeatureRetrievalResult > m_Result
CConstRef< CSerialObject > m_Object
virtual CConstIRef< IAppJobError > GetError()
Returns IAppJobError object describing internal error that caused the Job to fail.
virtual CConstIRef< IAppJobProgress > GetProgress()
return progress object, the function shall be synchronized internally.
virtual string GetDescr() const
Returns a human readable description of the Job (optional)
size_t m_CompletedComparisons
CRef< CAppJobError > m_Error
CFeatureRetrievalJob(const CSerialObject &obj, CScope &scope, SAnnotSelector &sel)
AppJobs for background loading and preparation.
vector< CFeatTableDS::SFeatureRow > m_Features
Base class to build jobs with cancel functionality.
namespace ncbi::objects::
Seq-loc iterator class – iterates all intervals from a seq-loc in the correct order.
Base class for all serializable objects.
virtual wxString GetColumnName(int col_idx) const
Returns a default name for the column using spreadsheet conventions: A, B, C, ...
virtual void x_FireDataChanged()
virtual wxVariant GetValueAtColumn(int col) const =0
static const struct name_t names[]
static wxString s_FeatTableColNames[]
static int s_CountIntervals(const CSeq_loc &loc)
static const int s_FeatTableNumCols
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
static CAppJobDispatcher & GetInstance()
virtual bool IsCanceled() const override
bool DeleteJob(TJobID job_id)
when a Job is deleted the listener is not notified
EJobState
Job states (describe FSM)
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...
#define ON_EVENT(type, id, handler)
#define END_EVENT_MAP()
Ends definition of Command Map.
#define BEGIN_EVENT_MAP(thisClass, baseClass)
Begins definition of Command Map for CEventHandler-derived class.
virtual bool Send(CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
Sends an event synchronously.
void SetNormDone(float done)
@ eEngine_UnknownJob
the job is not registered in the Engine
@ eUnknownJob
Job record lost.
string GetLabel(const CSeq_id &id)
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
@ fFGL_Type
Always include the feature's type.
ENa_strand GetStrand(const CSeq_loc &loc, CScope *scope=0)
Returns eNa_strand_unknown if multiple Bioseqs in loc Returns eNa_strand_other if multiple strands in...
bool IsSameBioseq(const CSeq_id &id1, const CSeq_id &id2, CScope *scope, CScope::EGetBioseqFlag get_flag=CScope::eGetBioseq_All)
Determines if two CSeq_ids represent the same CBioseq.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
CSeq_annot_Handle GetSeq_annotHandle(const CSeq_annot &annot, EMissing action=eMissing_Default)
const CSeq_annot_Handle & GetAnnot(void) const
Get handle to seq-annot for this feature.
bool IsSetProduct(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
const CSeq_loc & GetLocation(void) const
const CSeq_feat & GetOriginalFeature(void) const
Get original feature with unmapped location/product.
const CSeq_loc & GetProduct(void) const
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static const char label[]
ENa_strand
strand of nucleic acid
const Tdata & Get(void) const
Get the member data.
list< CRef< CSeq_loc > > Tdata
E_Choice Which(void) const
Which variant is currently selected.
const Tdata & Get(void) const
Get the member data.
const TPacked_pnt & GetPacked_pnt(void) const
Get the variant data.
const TPoints & GetPoints(void) const
Get the Points member data.
const TMix & GetMix(void) const
Get the variant data.
const TPacked_int & GetPacked_int(void) const
Get the variant data.
@ eNa_strand_both_rev
in reverse orientation
@ eNa_strand_both
in forward orientation
@ e_Empty
to NULL one Seq-id in a collection
@ e_Feat
indirect, through a Seq-feat
unsigned int
A callback function used to compare two keys in a database.
range(_Ty, _Ty) -> range< _Ty >
const struct ncbi::grid::netcache::search::fields::SIZE size
void FillIn(const objects::CMappedFeat &map_feat)
objects::CMappedFeat feat
virtual bool operator()(const IRowModel &aRow) const
wxString ToWxString(const string &s)