NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
CFeatureGraph Class Reference

Search Toolkit Book for CFeatureGraph

CFeatureGraph. More...

#include <gui/widgets/aln_multiple/feature_graph.hpp>

+ Inheritance diagram for CFeatureGraph:
+ Collaboration diagram for CFeatureGraph:

Public Types

typedef CFeatureGraphProperties::TFeatTypeItem TFeatTypeItem
 
typedef CFeatureGraphProperties::TFeatTypeItemSet TFeatTypeItemSet
 
typedef objects::CMappingRanges TMapRanges
 
typedef vector< SMappedFeatLocTMappedFeatLocs
 
typedef CAppJobDispatcher::TJobID TJobID
 
- Public Types inherited from CGraphContainer
enum  ELayoutPolicy { eHorzStack , eVertStack , eWhole }
 
typedef IRenderable TGraph
 
typedef CIRef< IRenderableTGraphRef
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 
- Public Types inherited from CEventHandler
enum  EDispatch { eDispatch_SelfOnly , eDispatch_AllHandlers , eDispatch_FirstHandler , eDispatch_Default = eDispatch_AllHandlers }
 enum controlling dispatching strategies More...
 
enum  EPoolName {
  ePool_Default = 0 , ePool_Parent , ePool_Child , ePool_Sibling ,
  ePool_NextAvailable
}
 Identifiers for standard pools. More...
 
typedef vector< CEventHandler * > TListeners
 
typedef map< int, TListenersTPools
 
typedef list< AutoPtr< SPostRequest > > TPostRequests
 
typedef std::map< CEventHandler *, intTHandlerToCount
 
typedef void(* FOnPostCallback) ()
 

Public Member Functions

 CFeatureGraph (const IAlignRowHandle &row_handle, bool isDataReadSync)
 
void OnAJNotification (CEvent *evt)
 
IRenderable implementation
virtual TVPPoint PreferredSize ()
 
virtual void Layout ()
 
IAlnVecRowGraph implementaion
virtual ~CFeatureGraph ()
 
virtual bool IsCreated () const
 Graph is not considered fully functional until it has been "created" by the call to create function. More...
 
virtual bool Create ()
 
virtual void Destroy ()
 
virtual void Update (double start, double stop)
 Update data according to the input range. More...
 
virtual const IAlnRowGraphPropertiesGetProperties () const
 
virtual void SetProperties (IAlnRowGraphProperties *props)
 
virtual void Render (CGlPane &pane, IAlnSegmentIterator &it)
 
- Public Member Functions inherited from CGraphContainer
 CGraphContainer (ELayoutPolicy policy)
 CGraphContainer. More...
 
virtual ~CGraphContainer ()
 
virtual bool AddGraph (TGraph *graph, bool front=false)
 
virtual bool RemoveGraph (TGraph *graph)
 assumes ownership More...
 
virtual void RemoveAllGraphs ()
 
virtual size_t GetGraphsCount () const
 
virtual TGraphGetGraph (size_t index)
 
virtual const TGraphGetGraph (size_t index) const
 
virtual void Clear ()
 
void SetHost (IGraphContainerHost *host)
 
void OnMouseEvents (wxMouseEvent &event)
 
void SetGraphMaxSize (const TVPPoint &size)
 
virtual void Render (CGlPane &pane)
 
virtual void SetVPRect (const TVPRect &rect)
 
virtual void SetModelRect (const TModelRect &rc)
 
virtual bool NeedTooltip (CGlPane &pane, int vp_x, int vp_y)
 
virtual string GetTooltip ()
 
virtual wxEvtHandler * GetEvtHandler ()
 
virtual void SetPane (CGlPane *pane)
 
- Public Member Functions inherited from CObjectEx
 CObjectEx (void)
 
virtual ~CObjectEx (void)
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (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...
 
- Public Member Functions inherited from CDebugDumpable
 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
 
- Public Member Functions inherited from CWeakObject
 CWeakObject (void)
 
virtual ~CWeakObject (void)
 
CPtrToObjectProxyGetPtrProxy (void) const
 Get pointer to proxy object containing pointer to this object. More...
 
- Public Member Functions inherited from IGlEventHandler
virtual ~IGlEventHandler ()
 
- Public Member Functions inherited from CRenderableImpl
 CRenderableImpl ()
 CRenderableImpl. More...
 
virtual ~CRenderableImpl ()
 
virtual TVPRect GetVPRect () const
 
virtual TModelRect GetModelRect () const
 
virtual bool IsVisible ()
 
virtual void SetVisible (bool set)
 
virtual void SetOrder (int order)
 
virtual int GetOrder () const
 
- Public Member Functions inherited from IRenderable
virtual ~IRenderable (void)
 
- Public Member Functions inherited from CEventHandler
 CEventHandler ()
 CEventHandler. More...
 
virtual ~CEventHandler ()
 
virtual void AddListener (CEventHandler *listener, int pool_name=ePool_Default)
 Add a listener. More...
 
virtual void RemoveListener (CEventHandler *listener)
 Remove a listener. More...
 
virtual void RemoveAllListeners (void)
 
virtual bool HasListener (CEventHandler *listener, int pool_name=ePool_Default) const
 returns "true" if the given listener belongs to the specified pool More...
 
virtual const TListenersGetListeners (int pool_name=ePool_Default) const
 returns a set of listeners fro the specified pool More...
 
virtual bool OnEvent (CEvent *evt)
 Processes en event. Returns "true" if event has been processed. More...
 
virtual bool Dispatch (CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Dispatches an event to the listeners (but does not handle it). More...
 
virtual bool Send (CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Sends an event synchronously. More...
 
virtual bool Send (CEvent *evt, int pool_name)
 
void Post (CRef< CEvent > evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Handles an event asynchronously (process and/or dispatch). More...
 
- Public Member Functions inherited from IAlnVecRowGraph
virtual ~IAlnVecRowGraph ()
 

Protected Types

typedef set< objects::CSeqFeatData::ESubtype > TSubtypeSet
 
typedef map< TJobID, CRef< CFeatureLoadingJob > > TJobMap
 
- Protected Types inherited from CGraphContainer
typedef vector< TGraphRefTGraphs
 

Protected Member Functions

 DECLARE_EVENT_MAP ()
 
void x_RenderStatusText (CGlPane &pane)
 
CRef< TMapRangesx_CreateMapRanges ()
 
void x_StartJob (const TFeatTypeItemSet &feat_set, const TSubtypeSet &filter, bool positive, CRange< TSeqPos > &total_range, TMapRanges &map_ranges, const string &descr, bool separate_types, bool link_genes, int order)
 
bool x_StartJob (objects::SAnnotSelector &sel, CRange< TSeqPos > &total_range, TMapRanges &map_ranges, const string &descr, bool separate_types, bool link_genes, int order)
 
bool x_CancelJob (TJobID job_id)
 
void x_CancelJobs ()
 Cancel all active jobs. More...
 
void x_OnJobCompleted (CAppJobNotification &notify)
 
void x_OnJobFailed (CAppJobNotification &notify)
 
void x_Create (double start, double stop)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 
- Protected Member Functions inherited from CWeakObject
void CleanWeakRefs (void) const
 Method cleaning all CWeakRefs referencing at this moment to the object After calling to this method all existing CWeakRefs referencing to the object will return NULL, so it effectively will be equal to deleting the object. More...
 
- Protected Member Functions inherited from CEventHandler
virtual const SEvtMapGetEventMap () const
 
void x_DeclareDead ()
 Removes itself unavailable for async event delivery. More...
 
void x_AddListenerToPool (CEventHandler *listener, int pool_name)
 

Protected Attributes

const IAlignRowHandlem_RowHandle
 
bool m_Created
 
TJobMap m_Jobs
 
string m_StatusText
 
CGlTextureFont m_Font
 
CFeatureGraphProperties m_Properties
 
- Protected Attributes inherited from CGraphContainer
wxEvtHandler * m_Handler
 
IGraphContainerHostm_Host
 
ELayoutPolicy m_LayoutPolicy
 
TGraphs m_Graphs
 
TGraphm_TooltipGraph
 
CGlPanem_Pane
 
TVPPoint m_GraphMaxSize
 
- Protected Attributes inherited from CRenderableImpl
TVPRect m_VPRect
 
TModelRect m_ModelRect
 
bool m_Visible
 
int m_Order = 0
 
- Protected Attributes inherited from CEventHandler
TPools m_Pools
 

Private Attributes

bool m_isDataReadSync
 
bool m_Updated
 
TGraphs m_PendingGraphs
 Candidate graphs waiting for replacing the current ones. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from CObject
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 Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Member Functions inherited from CEventHandler
static bool HandlePostRequest ()
 
static void ClearPostQueue ()
 erases all events from the queue More...
 
static void DestroyPostQueue ()
 
- Static Public Attributes inherited from CObject
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...
 
- Static Protected Attributes inherited from CEventHandler
static const SEvtMap sm_EvtMap
 

Detailed Description

CFeatureGraph.

Definition at line 174 of file feature_graph.hpp.

Member Typedef Documentation

◆ TFeatTypeItem

Definition at line 179 of file feature_graph.hpp.

◆ TFeatTypeItemSet

Definition at line 180 of file feature_graph.hpp.

◆ TJobID

Definition at line 183 of file feature_graph.hpp.

◆ TJobMap

Definition at line 246 of file feature_graph.hpp.

◆ TMappedFeatLocs

Definition at line 182 of file feature_graph.hpp.

◆ TMapRanges

typedef objects::CMappingRanges CFeatureGraph::TMapRanges

Definition at line 181 of file feature_graph.hpp.

◆ TSubtypeSet

typedef set<objects::CSeqFeatData::ESubtype> CFeatureGraph::TSubtypeSet
protected

Definition at line 213 of file feature_graph.hpp.

Constructor & Destructor Documentation

◆ CFeatureGraph()

CFeatureGraph::CFeatureGraph ( const IAlignRowHandle row_handle,
bool  isDataReadSync 
)

◆ ~CFeatureGraph()

CFeatureGraph::~CFeatureGraph ( )
virtual

Definition at line 252 of file feature_graph.cpp.

References Destroy().

Member Function Documentation

◆ Create()

bool CFeatureGraph::Create ( void  )
virtual

◆ DECLARE_EVENT_MAP()

CFeatureGraph::DECLARE_EVENT_MAP ( )
protected

◆ Destroy()

void CFeatureGraph::Destroy ( void  )
virtual

Implements IAlnVecRowGraph.

Definition at line 325 of file feature_graph.cpp.

References m_Created, CGraphContainer::RemoveAllGraphs(), and x_CancelJobs().

Referenced by ~CFeatureGraph().

◆ GetProperties()

const IAlnRowGraphProperties * CFeatureGraph::GetProperties ( void  ) const
virtual

Implements IAlnVecRowGraph.

Definition at line 349 of file feature_graph.cpp.

References NULL.

◆ IsCreated()

bool CFeatureGraph::IsCreated ( ) const
virtual

Graph is not considered fully functional until it has been "created" by the call to create function.

Only "Created" graph can be rendered. Creating may include loading data and building internal data structures.

Implements IAlnVecRowGraph.

Definition at line 258 of file feature_graph.cpp.

References m_Created.

◆ Layout()

void CFeatureGraph::Layout ( )
virtual

◆ OnAJNotification()

void CFeatureGraph::OnAJNotification ( CEvent evt)

◆ PreferredSize()

virtual TVPPoint CFeatureGraph::PreferredSize ( )
virtual

Reimplemented from CGraphContainer.

◆ Render()

void CFeatureGraph::Render ( CGlPane pane,
IAlnSegmentIterator it 
)
virtual

Implements IAlnVecRowGraph.

Definition at line 366 of file feature_graph.cpp.

References CGraphContainer::Render(), and x_RenderStatusText().

◆ SetProperties()

void CFeatureGraph::SetProperties ( IAlnRowGraphProperties props)
virtual

Implements IAlnVecRowGraph.

Definition at line 355 of file feature_graph.cpp.

References _ASSERT, and m_Properties.

◆ Update()

void CFeatureGraph::Update ( double  start,
double  stop 
)
virtual

Update data according to the input range.

Parameters
rangethe current visible range

Implements IAlnVecRowGraph.

Definition at line 334 of file feature_graph.cpp.

References CGlRect< T >::Left(), m_isDataReadSync, CRenderableImpl::m_ModelRect, m_Updated, CGlRect< T >::Right(), x_CancelJobs(), and x_Create().

◆ x_CancelJob()

bool CFeatureGraph::x_CancelJob ( TJobID  job_id)
protected

◆ x_CancelJobs()

void CFeatureGraph::x_CancelJobs ( )
protected

◆ x_Create()

void CFeatureGraph::x_Create ( double  start,
double  stop 
)
protected

◆ x_CreateMapRanges()

CRef< CMappingRanges > CFeatureGraph::x_CreateMapRanges ( )
protected

◆ x_OnJobCompleted()

void CFeatureGraph::x_OnJobCompleted ( CAppJobNotification notify)
protected

◆ x_OnJobFailed()

void CFeatureGraph::x_OnJobFailed ( CAppJobNotification notify)
protected

◆ x_RenderStatusText()

void CFeatureGraph::x_RenderStatusText ( CGlPane pane)
protected

◆ x_StartJob() [1/2]

void CFeatureGraph::x_StartJob ( const TFeatTypeItemSet feat_set,
const TSubtypeSet filter,
bool  positive,
CRange< TSeqPos > &  total_range,
TMapRanges map_ranges,
const string descr,
bool  separate_types,
bool  link_genes,
int  order 
)
protected

◆ x_StartJob() [2/2]

bool CFeatureGraph::x_StartJob ( objects::SAnnotSelector &  sel,
CRange< TSeqPos > &  total_range,
TMapRanges map_ranges,
const string descr,
bool  separate_types,
bool  link_genes,
int  order 
)
protected

Member Data Documentation

◆ m_Created

bool CFeatureGraph::m_Created
protected

Definition at line 249 of file feature_graph.hpp.

Referenced by Create(), Destroy(), and IsCreated().

◆ m_Font

CGlTextureFont CFeatureGraph::m_Font
protected

Definition at line 253 of file feature_graph.hpp.

Referenced by x_RenderStatusText().

◆ m_isDataReadSync

bool CFeatureGraph::m_isDataReadSync
private

Definition at line 258 of file feature_graph.hpp.

Referenced by Update(), and x_Create().

◆ m_Jobs

TJobMap CFeatureGraph::m_Jobs
protected

Definition at line 250 of file feature_graph.hpp.

Referenced by OnAJNotification(), x_CancelJob(), and x_CancelJobs().

◆ m_PendingGraphs

TGraphs CFeatureGraph::m_PendingGraphs
private

Candidate graphs waiting for replacing the current ones.

Definition at line 262 of file feature_graph.hpp.

Referenced by OnAJNotification(), x_CancelJobs(), x_Create(), and x_OnJobCompleted().

◆ m_Properties

CFeatureGraphProperties CFeatureGraph::m_Properties
protected

Definition at line 255 of file feature_graph.hpp.

Referenced by CFeatureGraph(), SetProperties(), and x_Create().

◆ m_RowHandle

const IAlignRowHandle& CFeatureGraph::m_RowHandle
protected

Definition at line 248 of file feature_graph.hpp.

Referenced by x_Create(), and x_CreateMapRanges().

◆ m_StatusText

string CFeatureGraph::m_StatusText
protected

Definition at line 252 of file feature_graph.hpp.

Referenced by OnAJNotification(), x_Create(), and x_RenderStatusText().

◆ m_Updated

bool CFeatureGraph::m_Updated
private

Definition at line 259 of file feature_graph.hpp.

Referenced by Update().


The documentation for this class was generated from the following files:
Modified on Tue May 07 08:14:55 2024 by modify_doxy.py rev. 669887