1 #ifndef GUI_WIDGETS_SEQ_GRAPHIC___SEQGRAPHIC_JOB__HPP
2 #define GUI_WIDGETS_SEQ_GRAPHIC___SEQGRAPHIC_JOB__HPP
65 void SetToken(TJobToken token);
69 virtual EJobState
Run();
124 const string& desc,
const string& annot_name)
129 , m_AnnotName(annot_name)
142 CSGAnnotJob (
const string& desc, objects::CBioseq_Handle handle,
145 void SetGraphLevel(
int level);
146 int GetGraphLevel()
const;
148 objects::CScope&
GetScope(
void)
const;
155 const objects::SAnnotSelector& sel,
TModelUnit window,
bool fixed_scale,
const TAxisLimits& y_limits);
157 template <
typename TGraphType>
159 const objects::CMappedGraph& gr,
160 const TGraphType& graph,
161 double& g_max,
double& g_min,
165 const objects::CMappedGraph& gr,
171 string x_GetGraphName(
const objects::CMappedGraph& gr)
const;
198 bool x_PercentileButNotMax(
const objects::CMappedGraph& gr)
const;
Base class to build jobs with cancel functionality.
objects::SAnnotSelector m_Sel
our annotation selector
objects::CScope & GetScope(void) const
CSGAnnotJob inline methods.
void x_AddGraphToMap(CDensityMap< float > &the_map, const objects::CMappedGraph &gr, const TGraphType &graph, double &g_max, double &g_min, bool fixed_scale)
int m_GraphLevel
coverate graph level
int GetGraphLevel() const
TSeqRange m_Range
target range
void SetGraphLevel(int level)
objects::CBioseq_Handle m_Handle
target sequence
list< CRef< CSeqGlyph > > TObjects
CSeqGraphicJob – the base class of seqgraphic job for handling the job status such as reporting the p...
virtual ~CSeqGraphicJob()
string m_Desc
Job description or name.
CFastMutex m_Mutex
mutex for guarding state access
int m_TaskTotal
Total amount of task for a job.
map< string, string > TAnnotNameTitleMap
List of annotations with the corresponding titles.
int m_TaskCompleted
The amount of task finished.
void SetToken(TJobToken token)
CSeqGraphicJob inline methods.
TJobToken m_Token
Job token recognizable by job listener.
CRef< CAppJobError > m_Error
virtual EJobState x_Execute()=0
method truly doing the job.
Task clients implement this callback interface.
unsigned int TSeqPos
Type for sequence locations and lengths.
virtual void SetTaskName(const string &name)=0
virtual void SetTaskCompleted(int completed)=0
set total finished task number.
virtual void SetTaskTotal(int total)=0
virtual bool StopRequested() const =0
virtual void AddTaskCompleted(int delta)=0
set to add newly finished task number.
virtual CConstIRef< IAppJobProgress > GetProgress()=0
return progress object, the function shall be synchronized internally.
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.
EJobState
Job states (describe FSM)
virtual string GetDescr() const =0
Returns a human readable description of the Job (optional)
virtual EJobState Run()=0
Function that does all the useful work, called by the Engine.
#define numeric_limits
Pre-declaration of the "numeric_limits<>" template Forcibly overrides (using preprocessor) the origin...
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
#define NCBI_GUIWIDGETS_SEQGRAPHIC_EXPORT
range(_Ty, _Ty) -> range< _Ty >
Int4 delta(size_t dimension_, const Int4 *score_)
CHistogramGlyph::TMap m_Map
SGraphObject(TSeqPos start, TSeqPos stop, float window, CHistogramGlyph::TMap::accum_functor *func, const string &desc, const string &annot_name)
TEMPLATE binary functor base struct.