NCBI C++ ToolKit
layout_track_proxy.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_SEQ_GRAPHIC___LAYOUT_TRACK_PROXY__HPP
2 #define GUI_WIDGETS_SEQ_GRAPHIC___LAYOUT_TRACK_PROXY__HPP
3 
4 /* $Id: layout_track_proxy.hpp 46256 2021-02-25 19:36:40Z shkeda $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Author: Liangshou Wu, Dmitry Rudnev, Victor Joukov
30  *
31  */
32 
33  /**
34  * File Description:
35  */
36 
37 #include <corelib/ncbiobj.hpp>
38 #include <gui/gui.hpp>
40 #include <set>
41 
43 
44 ///////////////////////////////////////////////////////////////////////////////
45 /// CTempTrackProxy data structure for storing information about tracks
46 /// status and the layout of the tracks (both position and hierarchy).
47 /// The stored status includes track order and a flag indicating
48 /// weather a track is shown. For a given track type, there might be
49 /// more than one data track get created after loading the data. So,
50 /// the track status for those data source dependent temporary tracks
51 /// will also be stored.
52 
53 class CTempTrackProxy : public CObjectEx
54 {
55 public:
56 
57  typedef list< CRef<CTempTrackProxy> > TTrackProxies;
58  typedef vector<string> TSubTracks;
59  static const string kAnonTrackName;
60 
62 
63  CTempTrackProxy(int order, const string& name, bool shown,
64  const string& key = NcbiEmptyString, const string& sub_key = NcbiEmptyString)
65  : m_Order(order)
66  , m_Name(name)
67  , m_Shown(shown)
68  , m_Key(key)
69  , m_Subkey(sub_key)
70  {}
71 
72  /// copy constructor.
73  CTempTrackProxy(const CTempTrackProxy& param);
74 
75  /// assignment operator.
77 
78  /// check if this is a temporary track.
79  virtual bool IsTempTrack() const { return true; }
80  virtual CRef<CTempTrackProxy> Clone() const;
81 
82  void SetOrder(int order);
83  int GetOrder() const;
84 
85  const string& GetName() const { return m_Name; }
86  void SetName(const string& name) { m_Name = name; }
87 
88  const string& GetId() const;
89  void SetId(const string& id);
90 
91  const string& GetDisplayName() const;
92  void SetDisplayName(const string& name);
93 
94  void SetShown(bool shown);
95  bool GetShown() const;
96 
97  const string& GetHelp() const;
98  void SetHelp(const string& help);
99 
100  void SetExpanded(bool f);
101  bool GetExpanded() const;
102 
103  /// Associated any track already?.
104  void SetTrack(CLayoutTrack* track);
105  bool TrackNotSet() const;
106  const CLayoutTrack* GetTrack() const;
108 
109  void SetTrackProfile(const string& profile);
110  const string& GetTrackProfile() const;
111 
112  void SetSource(const string& src);
113  const string& GetSource() const;
114 
115  void SetCategory(const string& cat);
116  const string& GetCategory() const;
117 
118  void SetSubcategory(const string& scat);
119  const string& GetSubcategory() const;
120 
121  void SetSettingGroup(const string& name);
122  const string& GetSettingGroup() const;
123 
124  void SetRemoteData(const string& remote_data);
125  const string& GetRemoteData() const;
126 
127  void SetRemoteId(const string& remote_id);
128  const string& GetRemoteId() const;
129 
130  void SetSeqDataKey(const string& seq_data_key);
131  const string& GetSeqDataKey() const;
132 
133  void SetUseGroupDefault(bool flag);
134  bool GetUseGroupDefault() const;
135 
136  const string& GetFilter() const;
137  void SetFilter(const string& filter);
138 
139  const string& GetSortBy() const;
140  void SetSortBy(const string& sort_by);
141 
142  void SetRealized(bool f) { m_Realized = f; }
143  bool IsRealized() const { return m_Realized; }
144 
145  void SetEmpty(bool f) { m_Empty = f; }
146  bool IsEmpty() const { return m_Empty; }
147 
148  const TTrackProxies& GetChildren() const { return m_Children; }
150 
151  void SetVisitedRange(const TSeqRange& range);
152  const TSeqRange& GetVisitedRange() const;
153 
154  /// add a new template track params.
155  /// The order will be initialized based on maximal track order used
156  /// @return the newly added track params.
157  CRef<CTempTrackProxy> AddTempTrack(const string& name, const string& title);
158 
159  /// add a new template track params with a filter set
161  const string& name, const string& filter, const string& title);
162 
163  /// Get track params for child temporary track.
164  /// @return an existing track params or newly created if not available
165  CConstRef<CTempTrackProxy> GetChildTempTrack(const string& name) const;
166 
167  /// @return an existing track params or newly created if not available
168  CRef<CTempTrackProxy> GetChildTempTrack(const string& name);
169 
170  /// compare operator used by sorting algorithms.
171  bool operator<(const CTempTrackProxy& item) const;
172 
173  void SetComments(const string& comment_str);
174  const string& GetComments() const;
175 
176  void SetHighlights(const string& hl_str);
177  const string& GetHighlights() const;
178 
179  void SetHighlightsColor(const string& hl_str);
180  const string& GetHighlightsColor() const;
181 
182  void SetShowTitle(bool flag);
183  bool GetShowTitle() const;
184 
185  const TTrackErrorStatus& GetErrorStatus() const;
186  void SetErrorStatus(const TTrackErrorStatus& ErrorStatus);
187 
188  void SetIsPrivate(bool flag);
189  bool GetIsPrivate() const;
190 
191  void SetStoredScale(const string& stored_scale);
192  const string& GetStoredScale() const;
193 
194  void SetUId(const string& uid);
195  const string& GetUId() const;
196 
197  void SetBatch(const string& batch);
198  const string& GetBatch() const;
199 
200  void SetExtraInfo(const string& sExtraInfo);
201  const string& GetExtraInfo() const;
202 
203  void SetRemotePath(const string& remote_path);
204  const string& GetRemotePath() const;
205 
206  const TSubTracks& GetSubTracks() const;
208 
209  enum EAction
210  {
213  eHide
214  };
215 
216  void SetAction(EAction action) { m_Action = action; }
217  EAction GetAction() const { return m_Action; }
218 
219  void SetTimeStamp(time_t timeStamp) { m_TimeStamp = timeStamp; }
220  time_t GetTimeStamp() const { return m_TimeStamp; }
221 
222  const string& GetKey() const { return m_Key; }
223  void SetKey(const string& key) { m_Key = key; }
224 
225  const string& GetSubkey() const { return m_Subkey; }
226  void SetSubkey(const string& sub_key) { m_Subkey = sub_key; }
227 
228  typedef vector<string> TAnnots;
229  const TAnnots& GetAnnots() const { return m_Annots; }
230  void SetAnnots(const TAnnots& annots) { m_Annots = annots; }
231 
232  bool IsNA() const;
233  /// check for an extended NA (named annotation#number, as used in e.g. SNP2)
234  bool IsExtendedNA() const;
235 
236  void SetNAdata(CAnnotMetaData& na);
237  const CAnnotMetaData* GetNAdata() const { return m_NAdata.GetPointerOrNull(); }
238 
239  void SetBigDataIndex(const string& big_data_index);
240  const string& GetBigDataIndex() const;
241 
242  void SetHubId(const string& hub_id);
243  const string& GetHubId() const;
244 
245  void SetOptions2Hide(const set<string>& options2hide);
246  const set<string>& GetOptions2Hide() const;
247 
248  void SetOptions2Show(const set<string>& options2show);
249  const set<string>& GetOptions2Show() const;
250 
251 
252  void UpdateNA_ChildVisibility(CTempTrackProxy& child) const;
253 
254  /// if isMergeWithExisting is true, then load should skip all registry tracks that have keys as in the already
255  /// existing proxies
256  static void LoadFromRegistry(TTrackProxies& proxies, const string& path, bool isMergeWithExisting = false);
257  static void SaveToRegistry(const TTrackProxies& proxies, const string& path);
258 
259  /// convert a string with a list of subtracks to a list of subtracks
260  static void ParseSubtracks(const string& subtracks_str, TSubTracks& subtracks);
261 
262 private:
263  /// track order for vertical ordering in its parent scope.
264  /// Initially, the track order is -1 for a newly created track params
265  /// before associating it with a real track.
266  int m_Order = -1;
267 
268  /// track name, may serve as track title.
269  string m_Name;
270 
271  /// unique track identifier.
272  string m_Id;
273 
274  /// track display name.
275  /// If empty, use track name
276  string m_DispName;
277 
278  /// track profile (setting style or list of settings).
279  string m_Profile;
280 
281  /// data source.
282  /// For most of cases, data source is the same as track name.
283  /// If that is the case, m_Source may be empty. m_Source will be
284  /// used when a track need data source info which is different
285  /// from m_Name.
286  string m_Source;
287 
288  /// track category.
289  string m_Category;
290 
291  /// track sub-category.
293 
294  /// setting group name.
295  /// A group name defining a set of similar tracks
296  /// that have the same properties and potentially can
297  /// share the same set of settings
299 
300  /// flag indicating if group default setting applies.
301  /// default: false
302  bool m_UseGroupDefault = false;
303 
304  /// track-specific filter
305  string m_Filter;
306 
307  /// track-specific sortby
308  string m_SortBy;
309 
310  /// settings for children tracks.
311  /// Each created track may correspond to one data source,
312  /// or data type (feature type/subtype). For example, the gene model
313  /// may have gene model track created based on NCBI gene model,
314  /// ENSEMBL gene model, other RNAs and Exons.
315  /// optional, only for group-type track
317 
318  /// the delegated layout track object.
320 
321  /// track on/off state.
322  bool m_Shown = true;
323 
324  /// track help string
325  string m_Help;
326 
327  /// track expanded/collapsed.
328  bool m_Expanded = true;
329 
330  /// Has this been connected to any real track before.
331  /// A tempory track proxy may be created for a potential track
332  /// that may not exist. This flag is for indicating if we
333  /// need to save the proxy.
334  bool m_Realized = true;
335 
336  /// The track proxy is empty.
337  /// It can be removed and will be removed.
338  bool m_Empty = false;
339 
340  /// The sequence range visited so far.
342 
343  string m_Comments;
344  string m_Highlights;
345  /// Color to use for highlighting
347 
348  bool m_ShowTitle = true;
350  bool m_isPrivate = false;
352 
353  string m_UId; // User-defined track id
355 
356  string m_Key; ///< may be used for creating a track
357  string m_Subkey; ///< may be used for creating DataSource
358  TAnnots m_Annots; ///< can be 'Unnamed', 'Named', or annot names
359 
361  time_t m_TimeStamp = -1;
363  string m_Batch; ///< AlignDb batch
364 
365  string m_RemotePath; ///< Track remote path
366 
367  string m_sExtraInfo; ///< extra information potentially needed to create the track
368  string m_RemoteData;
369  string m_RemoteId;
370  string m_SeqDataKey;
371  string m_BigDataIndex; ///< The location of a remote data file containing the index
372  string m_HubId;
375 };
376 
377 
378 ///////////////////////////////////////////////////////////////////////////////
379 /// CTrackProxy data structure contains information about the position of
380 /// a track in its parent scope, and information about intializing the layout
381 /// track and its associated data source.
382 
384 {
385 public:
386  /// help functor for less comparison.
388  {
389  static bool s_CompareCRefs (const CRef<CTempTrackProxy>& t1,
390  const CRef<CTempTrackProxy>& t2)
391  {
392  return t1->GetOrder() < t2->GetOrder();
393  }
394 
396  const CRef<CTempTrackProxy>& t2)
397  {
398  return s_CompareCRefs(t1, t2);
399  }
400 
402  const CRef<CTrackProxy>& t2)
403  {
404  return t1->GetOrder() < t2->GetOrder();
405  }
406  };
407 
409 
410  CTrackProxy(int order, const string& name, bool shown,
411  const string& key, const string& sub_key)
412  : CTempTrackProxy(order, name, shown, key, sub_key), m_ContShown(false)
413  {}
414 
415  CTrackProxy(const CTrackProxy& param);
416 
417  CTrackProxy& operator=(const CTrackProxy& param);
418 
419  virtual bool IsTempTrack() const { return false; }
420  virtual CRef<CTempTrackProxy> Clone() const;
421 
422  /// @name accessors.
423  /// @{
424  const string& GetOriginalKey() const { return m_OriginalKey; }
425  const string& GetDB() const { return m_DB; }
426  const string& GetDataKey() const { return m_DataKey; }
427  bool GetContShown() const { return m_ContShown; }
428 
429  /// @}
430 
431  /// @name mutators.
432  /// @{
433  void SetOriginalKey(const string& key) { m_OriginalKey = key; }
434  void SetDB(const string& db) { m_DB = db; }
435  void SetDataKey(const string& key) { m_DataKey = key; }
436  void SetContShown(bool contShown) { m_ContShown = contShown; }
437  /// @}
438 
439 private:
440  string m_OriginalKey; // if the key was set in URL parameters, it's duplicated here
441  string m_DB; ///< data source DB name
442  string m_DataKey; ///< user-data net storage key (SViewer only)
443  bool m_ContShown = false;
444 };
445 
446 
447 ///////////////////////////////////////////////////////////////////////////////
448 /// CTempTrackProxy class implementation
449 
450 inline
452 {
453  m_Order = order;
454  if (m_Track) m_Track->SetOrder(order);
455 }
456 
457 inline
459 {
460  if (m_Track && m_Track->GetOrder() != m_Order) {
461  LOG_POST(Error << m_Track->GetFullTitle() << ": inconsistent ids!");
462  }
463  return m_Track ? m_Track->GetOrder() : m_Order;
464 }
465 
466 inline
467 void CTempTrackProxy::SetId(const string& id)
468 {
469  m_Id = id;
470  if (m_Track) m_Track->SetId(id);
471 }
472 
473 inline
474 const string& CTempTrackProxy::GetId() const
475 { return m_Id; }
476 
477 inline
478 const string& CTempTrackProxy::GetDisplayName() const
479 { return m_DispName; }
480 
481 inline
482 void CTempTrackProxy::SetDisplayName(const string& name)
483 { m_DispName = name; }
484 
485 inline
487 { m_Shown = shown; }
488 
489 inline
491 { return m_Track ? m_Track->IsOn() : m_Shown; }
492 
493 inline
494 const string& CTempTrackProxy::GetHelp() const
495 {
496  return m_Help;
497 }
498 
499 inline
500 void CTempTrackProxy::SetHelp(const string& help)
501 {
502  m_Help = help;
503 }
504 
505 inline
507 { m_Expanded = f; }
508 
509 inline
511 { return m_Track ? m_Track->IsExpanded() : m_Expanded; }
512 
513 inline
515 {
516  m_Track.Reset(track);
517  if (track) {
519  m_Track->SetId(m_Id);
524  m_Realized = true;
525  }
526 }
527 
528 inline
530 { return m_Track.GetPointer(); }
531 
532 inline
534 { return m_Track; }
535 
536 inline
538 { return m_Track.IsNull(); }
539 
540 inline
541 void CTempTrackProxy::SetTrackProfile(const string& profile)
542 { m_Profile = profile; }
543 
544 inline
545 const string& CTempTrackProxy::GetTrackProfile() const
546 { return m_Track ? m_Track->GetProfile() : m_Profile; }
547 
548 inline
550 { return m_Order < item.GetOrder(); }
551 
552 inline
553 void CTempTrackProxy::SetSource(const string& src)
554 { m_Source = src; }
555 
556 inline
557 const string& CTempTrackProxy::GetSource() const
558 { return m_Source; }
559 
560 inline
561 void CTempTrackProxy::SetCategory(const string& cat)
562 { m_Category = cat; }
563 
564 inline
565 const string& CTempTrackProxy::GetCategory() const
566 { return m_Category; }
567 
568 inline
569 void CTempTrackProxy::SetSubcategory(const string& scat)
570 { m_Subcategory = scat; }
571 
572 inline
573 const string& CTempTrackProxy::GetSubcategory() const
574 { return m_Subcategory; }
575 
576 inline
577 void CTempTrackProxy::SetSettingGroup(const string& name)
578 { m_SettingGroup = name; }
579 
580 inline
581 const string& CTempTrackProxy::GetSettingGroup() const
582 { return m_SettingGroup; }
583 
584 inline
586 { m_UseGroupDefault = flag; }
587 
588 inline
590 { return m_UseGroupDefault; }
591 
592 inline
593 const string& CTempTrackProxy::GetFilter() const
594 { return m_Filter; }
595 
596 inline
597 void CTempTrackProxy::SetFilter(const string& filter)
598 { m_Filter = filter; }
599 
600 inline
601 const string& CTempTrackProxy::GetSortBy() const
602 { return m_SortBy; }
603 
604 inline
605 void CTempTrackProxy::SetSortBy(const string& sort_by)
606 { m_SortBy = sort_by; }
607 
608 inline
610 { m_VisitedRange = range; }
611 
612 inline
614 { return m_VisitedRange; }
615 
616 inline
617 void CTempTrackProxy::SetComments(const string& comment_str)
618 { m_Comments = comment_str; }
619 
620 inline
621 const string& CTempTrackProxy::GetComments() const
622 { return m_Comments; }
623 
624 inline
625 void CTempTrackProxy::SetHighlights(const string& hl_str)
626 { m_Highlights = hl_str; }
627 
628 inline
629 const string& CTempTrackProxy::GetHighlights() const
630 { return m_Highlights; }
631 
632 inline
633 void CTempTrackProxy::SetHighlightsColor(const string& hl_str)
634 {
635  m_HighlightsColor = hl_str;
636 }
637 
638 inline
640 {
641  return m_HighlightsColor;
642 }
643 
644 inline
646 { m_ShowTitle = flag; }
647 
648 inline
650 { return m_ShowTitle; }
651 
652 inline
654 {
655  m_ErrorStatus = ErrorStatus;
656  if (m_Track) m_Track->SetErrorStatus(ErrorStatus);
657 }
658 
659 inline
661 {
662  return m_ErrorStatus;
663 }
664 
665 inline
667 { m_isPrivate = flag; }
668 
669 inline
671 { return m_isPrivate; }
672 
673 inline
674 void CTempTrackProxy::SetRemoteData(const string& remote_data)
675 { m_RemoteData = remote_data; }
676 
677 inline
678 const string& CTempTrackProxy::GetRemoteData() const
679 { return m_RemoteData; }
680 
681 inline
682 void CTempTrackProxy::SetRemoteId(const string& remote_id)
683 {
684  m_RemoteId = remote_id;
685 }
686 
687 inline
688 const string& CTempTrackProxy::GetRemoteId() const
689 {
690  return m_RemoteId;
691 }
692 
693 
694 inline
695 void CTempTrackProxy::SetSeqDataKey(const string& seq_data_key)
696 { m_SeqDataKey = seq_data_key; }
697 
698 inline
699 const string& CTempTrackProxy::GetSeqDataKey() const
700 { return m_SeqDataKey; }
701 
702 inline
703 void CTempTrackProxy::SetBatch(const string& batch)
704 { m_Batch = batch; }
705 
706 inline
707 const string& CTempTrackProxy::GetBatch() const
708 { return m_Batch; }
709 
710 inline
711 void CTempTrackProxy::SetExtraInfo(const string& sExtraInfo)
712 { m_sExtraInfo = sExtraInfo; }
713 
714 inline
715 const string& CTempTrackProxy::GetExtraInfo() const
716 { return m_sExtraInfo; }
717 
718 inline
719 void CTempTrackProxy::SetRemotePath(const string& remote_path)
720 {
721  m_RemotePath = remote_path;
722 }
723 
724 inline
725 const string& CTempTrackProxy::GetRemotePath() const
726 {
727  return m_RemotePath;
728 }
729 
730 inline
731 void CTempTrackProxy::SetStoredScale(const string& stored_scale)
732 { m_StoredScale = stored_scale; }
733 
734 inline
735 const string& CTempTrackProxy::GetStoredScale() const
736 { return m_StoredScale; }
737 
738 inline
739 void CTempTrackProxy::SetUId(const string& uid)
740 {
741  m_UId = uid;
742 }
743 
744 inline
745 const string& CTempTrackProxy::GetUId() const
746 {
747  return m_UId;
748 }
749 
750 inline
752 {
753  return m_SubTracks;
754 }
755 
756 inline
758 {
759  return m_SubTracks;
760 }
761 
762 inline
763 void CTempTrackProxy::SetBigDataIndex(const string& big_data_index)
764 {
765  m_BigDataIndex = big_data_index;
766 }
767 
768 inline
769 const string& CTempTrackProxy::GetBigDataIndex() const
770 {
771  return m_BigDataIndex;
772 }
773 
774 inline
775 void CTempTrackProxy::SetHubId(const string& hub_id)
776 {
777  m_HubId = hub_id;
778 }
779 
780 inline
781 const string& CTempTrackProxy::GetHubId() const
782 {
783  return m_HubId;
784 }
785 
786 inline
788 {
789  m_Options2Hide = options2hide;
790 }
791 
792 inline
794 {
795  return m_Options2Hide;
796 }
797 
798 inline
800 {
801  m_Options2Show = options2show;
802 }
803 
804 inline
806 {
807  return m_Options2Show;
808 }
809 
810 
812 
813 #endif // GUI_WIDGETS_SEQ_GRAPHIC___LAYOUT_TRACK_PROXY__HPP
Data structure for holding meta information for an annotaion.
Definition: annot_info.hpp:85
CConstRef –.
Definition: ncbiobj.hpp:1266
File Description:
void SetErrorStatus(const TTrackErrorStatus &ErrorStatus)
void SetId(const string &id)
void SetShow(bool shown)
set the flag only.
bool IsExpanded() const
int GetOrder() const
const string & GetProfile() const
void SetProfile(const string &preset_style)
CLayoutTrack inline method implmentation.
bool IsOn() const
void SetExpanded(bool f)
virtual string GetFullTitle() const
get a more meaningful title.
void SetOrder(int order)
CObjectEx –.
Definition: ncbiobj.hpp:2531
File Description:
const TTrackErrorStatus & GetErrorStatus() const
void UpdateNA_ChildVisibility(CTempTrackProxy &child) const
const string & GetSeqDataKey() const
void SetHubId(const string &hub_id)
string m_Batch
AlignDb batch.
string m_Filter
track-specific filter
void SetShown(bool shown)
void SetRemoteId(const string &remote_id)
void SetRemoteData(const string &remote_data)
const string & GetSubkey() const
string m_SortBy
track-specific sortby
const string & GetHelp() const
TSeqRange m_VisitedRange
The sequence range visited so far.
void SetName(const string &name)
void SetCategory(const string &cat)
const string & GetUId() const
const string & GetCategory() const
set< string > m_Options2Hide
vector< string > TAnnots
bool m_Expanded
track expanded/collapsed.
CRef< CLayoutTrack > m_Track
the delegated layout track object.
bool m_Shown
track on/off state.
const string & GetDisplayName() const
void SetExpanded(bool f)
virtual CRef< CTempTrackProxy > Clone() const
virtual bool IsTempTrack() const
check if this is a temporary track.
const string & GetBatch() const
const string & GetRemoteId() const
const TSeqRange & GetVisitedRange() const
const string & GetSortBy() const
string m_BigDataIndex
The location of a remote data file containing the index.
TTrackProxies m_Children
settings for children tracks.
string m_HighlightsColor
Color to use for highlighting.
list< CRef< CTempTrackProxy > > TTrackProxies
bool GetShowTitle() const
void SetTrack(CLayoutTrack *track)
Associated any track already?.
CRef< CAnnotMetaData > m_NAdata
CTempTrackProxy(int order, const string &name, bool shown, const string &key=NcbiEmptyString, const string &sub_key=NcbiEmptyString)
bool operator<(const CTempTrackProxy &item) const
compare operator used by sorting algorithms.
void SetSource(const string &src)
void SetFilter(const string &filter)
const string & GetBigDataIndex() const
CConstRef< CTempTrackProxy > GetChildTempTrack(const string &name) const
Get track params for child temporary track.
void SetHighlights(const string &hl_str)
void SetId(const string &id)
const string & GetKey() const
void SetNAdata(CAnnotMetaData &na)
void SetHelp(const string &help)
void SetComments(const string &comment_str)
void SetUId(const string &uid)
vector< string > TSubTracks
string m_DispName
track display name.
int m_Order
track order for vertical ordering in its parent scope.
const string & GetHighlightsColor() const
void SetHighlightsColor(const string &hl_str)
static void LoadFromRegistry(TTrackProxies &proxies, const string &path, bool isMergeWithExisting=false)
if isMergeWithExisting is true, then load should skip all registry tracks that have keys as in the al...
const string & GetHighlights() const
void SetTrackProfile(const string &profile)
bool m_UseGroupDefault
flag indicating if group default setting applies.
string m_Help
track help string
bool GetUseGroupDefault() const
const TAnnots & GetAnnots() const
string m_Category
track category.
void SetKey(const string &key)
static const string kAnonTrackName
CTempTrackProxy class implementation.
time_t GetTimeStamp() const
void SetSettingGroup(const string &name)
const set< string > & GetOptions2Hide() const
EAction GetAction() const
void SetSubcategory(const string &scat)
const string & GetExtraInfo() const
static void SaveToRegistry(const TTrackProxies &proxies, const string &path)
void SetBigDataIndex(const string &big_data_index)
set< string > m_Options2Show
bool IsExtendedNA() const
check for an extended NA (named annotation::number, as used in e.g. SNP2)
void SetBatch(const string &batch)
const string & GetId() const
string m_Name
track name, may serve as track title.
string m_Profile
track profile (setting style or list of settings).
string m_Key
may be used for creating a track
const string & GetTrackProfile() const
void SetSortBy(const string &sort_by)
const TTrackProxies & GetChildren() const
TTrackErrorStatus m_ErrorStatus
bool TrackNotSet() const
static void ParseSubtracks(const string &subtracks_str, TSubTracks &subtracks)
convert a string with a list of subtracks to a list of subtracks
void SetIsPrivate(bool flag)
void SetOptions2Show(const set< string > &options2show)
CTempTrackProxy & operator=(const CTempTrackProxy &param)
assignment operator.
bool GetIsPrivate() const
void SetOrder(int order)
CTempTrackProxy class implementation.
string m_Subcategory
track sub-category.
TSubTracks & SetSubTracks()
void SetRemotePath(const string &remote_path)
void SetSeqDataKey(const string &seq_data_key)
const string & GetStoredScale() const
void SetRealized(bool f)
bool m_Empty
The track proxy is empty.
const string & GetRemotePath() const
const set< string > & GetOptions2Show() const
void SetTimeStamp(time_t timeStamp)
void SetAnnots(const TAnnots &annots)
const string & GetName() const
bool m_Realized
Has this been connected to any real track before.
void SetDisplayName(const string &name)
const string & GetHubId() const
TTrackProxies & GetChildren()
void SetOptions2Hide(const set< string > &options2hide)
const string & GetComments() const
const CLayoutTrack * GetTrack() const
string m_Source
data source.
const CAnnotMetaData * GetNAdata() const
string m_Id
unique track identifier.
void SetAction(EAction action)
const TSubTracks & GetSubTracks() const
const string & GetSource() const
string m_sExtraInfo
extra information potentially needed to create the track
const string & GetSettingGroup() const
void SetUseGroupDefault(bool flag)
string m_SettingGroup
setting group name.
void SetShowTitle(bool flag)
void SetExtraInfo(const string &sExtraInfo)
string m_RemotePath
Track remote path.
const string & GetSubcategory() const
CRef< CTempTrackProxy > AddTempTrack(const string &name, const string &title)
add a new template track params.
string m_Subkey
may be used for creating DataSource
void SetErrorStatus(const TTrackErrorStatus &ErrorStatus)
void SetStoredScale(const string &stored_scale)
TAnnots m_Annots
can be 'Unnamed', 'Named', or annot names
void SetVisitedRange(const TSeqRange &range)
const string & GetFilter() const
void SetSubkey(const string &sub_key)
const string & GetRemoteData() const
bool GetExpanded() const
CTrackProxy data structure contains information about the position of a track in its parent scope,...
virtual CRef< CTempTrackProxy > Clone() const
virtual bool IsTempTrack() const
check if this is a temporary track.
const string & GetOriginalKey() const
void SetDataKey(const string &key)
void SetOriginalKey(const string &key)
string m_DataKey
user-data net storage key (SViewer only)
CTrackProxy & operator=(const CTrackProxy &param)
CTrackProxy(int order, const string &name, bool shown, const string &key, const string &sub_key)
const string & GetDB() const
string m_DB
data source DB name
void SetContShown(bool contShown)
bool GetContShown() const
const string & GetDataKey() const
void SetDB(const string &db)
#define false
Definition: bool.h:36
static FILE * f
Definition: readconf.c:23
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
Definition: ncbidiag.hpp:226
void Error(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1197
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
Definition: ncbiobj.hpp:735
TObjectType * GetPointerOrNull(void) THROWS_NONE
Get pointer value.
Definition: ncbiobj.hpp:986
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NcbiEmptyString
Definition: ncbistr.hpp:122
range(_Ty, _Ty) -> range< _Ty >
const struct ncbi::grid::netcache::search::fields::KEY key
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
static void help(void)
Definition: pcre2grep.c:1212
help functor for less comparison.
bool operator()(const CRef< CTempTrackProxy > &t1, const CRef< CTempTrackProxy > &t2)
static bool s_CompareCRefs(const CRef< CTempTrackProxy > &t1, const CRef< CTempTrackProxy > &t2)
Modified on Fri Sep 20 14:57:25 2024 by modify_doxy.py rev. 669887