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

Go to the SVN repository for this file.

1 /* $Id$
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  */
27 
28 /// @file PluginInfo_.hpp
29 /// Data storage class.
30 ///
31 /// This file was generated by application DATATOOL
32 /// using the following specifications:
33 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/gui/objects/gui_objects.asn">gui_objects.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/gui/objects/gui_objects.def">gui_objects.def</a>
36 ///
37 /// ATTENTION:
38 /// Don't edit or commit this file into CVS as this file will
39 /// be overridden (by DATATOOL) without warning!
40 
41 #ifndef GUI_OBJECTS_PLUGININFO_BASE_HPP
42 #define GUI_OBJECTS_PLUGININFO_BASE_HPP
43 
44 // extra headers
45 #include <gui/gui_export.h>
46 
47 // standard includes
48 #include <serial/serialbase.hpp>
49 
50 // generated includes
51 #include <list>
52 #include <string>
53 
55 
56 #ifndef BEGIN_objects_SCOPE
57 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
58 # define END_objects_SCOPE END_SCOPE(objects)
59 #endif
60 BEGIN_objects_SCOPE // namespace ncbi::objects::
61 
62 
63 // forward declarations
64 class CPluginCommand;
65 class CPluginIconInfo;
66 class CPluginUserType;
67 
68 
69 // generated classes
70 
71 
72 /** @addtogroup dataspec_NCBI_Plugin
73  *
74  * @{
75  */
76 
77 /////////////////////////////////////////////////////////////////////////////
78 ///
79 /// CPluginInfo_Base --
80 ///
81 
83 {
85 public:
86  // constructor
87  CPluginInfo_Base(void);
88  // destructor
89  virtual ~CPluginInfo_Base(void);
90 
91  // type info
93 
94  /// if 'foreground-only' is true, then this plugin will run entirely
95  /// in the foreground (main) thread. This is a requirement of any
96  /// plugin that services a GUI directly, as GUI components must be
97  /// manipulated only in the foreground thread on some platforms
98  enum EAffinity {
99  eAffinity_foreground = 0,
100  eAffinity_background = 1,
101  eAffinity_background_restartable = 2
102  };
103 
104  /// Access to EAffinity's attributes (values, names) as defined in spec
105  static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(EAffinity)(void);
106 
107  // types
108  typedef int TVer_major;
109  typedef int TVer_minor;
110  typedef int TVer_revision;
111  typedef string TVer_build_date;
112  typedef string TClass_name;
113  typedef string TMenu_item;
114  typedef string TTooltip;
115  typedef string THelp_file;
116  typedef bool TAutorun;
120  typedef list< CRef< CPluginUserType > > TApplicable_user_types;
121 
122  // member index
123  enum class E_memberIndex {
124  e__allMandatory = 0,
125  e_ver_major,
126  e_ver_minor,
127  e_ver_revision,
128  e_ver_build_date,
129  e_class_name,
130  e_menu_item,
131  e_tooltip,
132  e_help_file,
133  e_autorun,
134  e_affinity,
135  e_command,
136  e_icon_info,
137  e_applicable_user_types
138  };
140 
141  // getters
142  // setters
143 
144  /// major version number
145  /// Check if a value has been assigned to Ver_major data member.
146  ///
147  /// Data member Ver_major is mandatory;
148  /// its type is defined as 'typedef int TVer_major'
149  /// @return
150  /// - true, if a value has been assigned.
151  /// - false, otherwise.
152  bool IsSetVer_major(void) const;
153 
154  /// Check if it is safe to call GetVer_major method.
155  ///
156  /// @return
157  /// - true, if the data member is getatable.
158  /// - false, otherwise.
159  bool CanGetVer_major(void) const;
160 
161  /// Reset Ver_major data member.
162  void ResetVer_major(void);
163 
164  /// Get the Ver_major member data.
165  ///
166  /// @return
167  /// Copy of the member data.
168  TVer_major GetVer_major(void) const;
169 
170  /// Assign a value to Ver_major data member.
171  ///
172  /// @param value
173  /// Value to assign
174  void SetVer_major(TVer_major value);
175 
176  /// Assign a value to Ver_major data member.
177  ///
178  /// @return
179  /// Reference to the data value.
180  TVer_major& SetVer_major(void);
181 
182  /// minor version number
183  /// Check if a value has been assigned to Ver_minor data member.
184  ///
185  /// Data member Ver_minor is mandatory;
186  /// its type is defined as 'typedef int TVer_minor'
187  /// @return
188  /// - true, if a value has been assigned.
189  /// - false, otherwise.
190  bool IsSetVer_minor(void) const;
191 
192  /// Check if it is safe to call GetVer_minor method.
193  ///
194  /// @return
195  /// - true, if the data member is getatable.
196  /// - false, otherwise.
197  bool CanGetVer_minor(void) const;
198 
199  /// Reset Ver_minor data member.
200  void ResetVer_minor(void);
201 
202  /// Get the Ver_minor member data.
203  ///
204  /// @return
205  /// Copy of the member data.
206  TVer_minor GetVer_minor(void) const;
207 
208  /// Assign a value to Ver_minor data member.
209  ///
210  /// @param value
211  /// Value to assign
212  void SetVer_minor(TVer_minor value);
213 
214  /// Assign a value to Ver_minor data member.
215  ///
216  /// @return
217  /// Reference to the data value.
218  TVer_minor& SetVer_minor(void);
219 
220  /// plugin-specific revision number
221  /// Check if a value has been assigned to Ver_revision data member.
222  ///
223  /// Data member Ver_revision is mandatory;
224  /// its type is defined as 'typedef int TVer_revision'
225  /// @return
226  /// - true, if a value has been assigned.
227  /// - false, otherwise.
228  bool IsSetVer_revision(void) const;
229 
230  /// Check if it is safe to call GetVer_revision method.
231  ///
232  /// @return
233  /// - true, if the data member is getatable.
234  /// - false, otherwise.
235  bool CanGetVer_revision(void) const;
236 
237  /// Reset Ver_revision data member.
238  void ResetVer_revision(void);
239 
240  /// Get the Ver_revision member data.
241  ///
242  /// @return
243  /// Copy of the member data.
244  TVer_revision GetVer_revision(void) const;
245 
246  /// Assign a value to Ver_revision data member.
247  ///
248  /// @param value
249  /// Value to assign
250  void SetVer_revision(TVer_revision value);
251 
252  /// Assign a value to Ver_revision data member.
253  ///
254  /// @return
255  /// Reference to the data value.
256  TVer_revision& SetVer_revision(void);
257 
258  /// date of build
259  /// Check if a value has been assigned to Ver_build_date data member.
260  ///
261  /// Data member Ver_build_date is mandatory;
262  /// its type is defined as 'typedef string TVer_build_date'
263  /// @return
264  /// - true, if a value has been assigned.
265  /// - false, otherwise.
266  bool IsSetVer_build_date(void) const;
267 
268  /// Check if it is safe to call GetVer_build_date method.
269  ///
270  /// @return
271  /// - true, if the data member is getatable.
272  /// - false, otherwise.
273  bool CanGetVer_build_date(void) const;
274 
275  /// Reset Ver_build_date data member.
276  void ResetVer_build_date(void);
277 
278  /// Get the Ver_build_date member data.
279  ///
280  /// @return
281  /// Reference to the member data.
282  const TVer_build_date& GetVer_build_date(void) const;
283 
284  /// Assign a value to Ver_build_date data member.
285  ///
286  /// @param value
287  /// Value to assign
288  void SetVer_build_date(const TVer_build_date& value);
289  void SetVer_build_date(TVer_build_date&& value);
290 
291  /// Assign a value to Ver_build_date data member.
292  ///
293  /// @return
294  /// Reference to the data value.
295  TVer_build_date& SetVer_build_date(void);
296 
297  /// text tag uniquely identifying
298  /// this plugin
299  /// Check if a value has been assigned to Class_name data member.
300  ///
301  /// Data member Class_name is mandatory;
302  /// its type is defined as 'typedef string TClass_name'
303  /// @return
304  /// - true, if a value has been assigned.
305  /// - false, otherwise.
306  bool IsSetClass_name(void) const;
307 
308  /// Check if it is safe to call GetClass_name method.
309  ///
310  /// @return
311  /// - true, if the data member is getatable.
312  /// - false, otherwise.
313  bool CanGetClass_name(void) const;
314 
315  /// Reset Class_name data member.
316  void ResetClass_name(void);
317 
318  /// Get the Class_name member data.
319  ///
320  /// @return
321  /// Reference to the member data.
322  const TClass_name& GetClass_name(void) const;
323 
324  /// Assign a value to Class_name data member.
325  ///
326  /// @param value
327  /// Value to assign
328  void SetClass_name(const TClass_name& value);
329  void SetClass_name(TClass_name&& value);
330 
331  /// Assign a value to Class_name data member.
332  ///
333  /// @return
334  /// Reference to the data value.
335  TClass_name& SetClass_name(void);
336 
337  /// menu item that will be shown
338  /// in a GUI
339  /// Check if a value has been assigned to Menu_item data member.
340  ///
341  /// Data member Menu_item is optional;
342  /// its type is defined as 'typedef string TMenu_item'
343  /// @return
344  /// - true, if a value has been assigned.
345  /// - false, otherwise.
346  bool IsSetMenu_item(void) const;
347 
348  /// Check if it is safe to call GetMenu_item method.
349  ///
350  /// @return
351  /// - true, if the data member is getatable.
352  /// - false, otherwise.
353  bool CanGetMenu_item(void) const;
354 
355  /// Reset Menu_item data member.
356  void ResetMenu_item(void);
357 
358  /// Get the Menu_item member data.
359  ///
360  /// @return
361  /// Reference to the member data.
362  const TMenu_item& GetMenu_item(void) const;
363 
364  /// Assign a value to Menu_item data member.
365  ///
366  /// @param value
367  /// Value to assign
368  void SetMenu_item(const TMenu_item& value);
369  void SetMenu_item(TMenu_item&& value);
370 
371  /// Assign a value to Menu_item data member.
372  ///
373  /// @return
374  /// Reference to the data value.
375  TMenu_item& SetMenu_item(void);
376 
377  /// text for mouse-overs and status
378  /// bars
379  /// Check if a value has been assigned to Tooltip data member.
380  ///
381  /// Data member Tooltip is optional;
382  /// its type is defined as 'typedef string TTooltip'
383  /// @return
384  /// - true, if a value has been assigned.
385  /// - false, otherwise.
386  bool IsSetTooltip(void) const;
387 
388  /// Check if it is safe to call GetTooltip method.
389  ///
390  /// @return
391  /// - true, if the data member is getatable.
392  /// - false, otherwise.
393  bool CanGetTooltip(void) const;
394 
395  /// Reset Tooltip data member.
396  void ResetTooltip(void);
397 
398  /// Get the Tooltip member data.
399  ///
400  /// @return
401  /// Reference to the member data.
402  const TTooltip& GetTooltip(void) const;
403 
404  /// Assign a value to Tooltip data member.
405  ///
406  /// @param value
407  /// Value to assign
408  void SetTooltip(const TTooltip& value);
409  void SetTooltip(TTooltip&& value);
410 
411  /// Assign a value to Tooltip data member.
412  ///
413  /// @return
414  /// Reference to the data value.
415  TTooltip& SetTooltip(void);
416 
417  /// location of the help file
418  /// associated with this plugin
419  /// Check if a value has been assigned to Help_file data member.
420  ///
421  /// Data member Help_file is optional;
422  /// its type is defined as 'typedef string THelp_file'
423  /// @return
424  /// - true, if a value has been assigned.
425  /// - false, otherwise.
426  bool IsSetHelp_file(void) const;
427 
428  /// Check if it is safe to call GetHelp_file method.
429  ///
430  /// @return
431  /// - true, if the data member is getatable.
432  /// - false, otherwise.
433  bool CanGetHelp_file(void) const;
434 
435  /// Reset Help_file data member.
436  void ResetHelp_file(void);
437 
438  /// Get the Help_file member data.
439  ///
440  /// @return
441  /// Reference to the member data.
442  const THelp_file& GetHelp_file(void) const;
443 
444  /// Assign a value to Help_file data member.
445  ///
446  /// @param value
447  /// Value to assign
448  void SetHelp_file(const THelp_file& value);
449  void SetHelp_file(THelp_file&& value);
450 
451  /// Assign a value to Help_file data member.
452  ///
453  /// @return
454  /// Reference to the data value.
455  THelp_file& SetHelp_file(void);
456 
457  /// if 'autorun' is true, we launch this
458  /// plugin command at application startup
459  /// Check if a value has been assigned to Autorun data member.
460  ///
461  /// Data member Autorun is optional with default false;
462  /// its type is defined as 'typedef bool TAutorun'
463  /// @return
464  /// - true, if a value has been assigned.
465  /// - false, otherwise.
466  bool IsSetAutorun(void) const;
467 
468  /// Check if it is safe to call GetAutorun method.
469  ///
470  /// @return
471  /// - true, if the data member is getatable.
472  /// - false, otherwise.
473  bool CanGetAutorun(void) const;
474 
475  /// Reset Autorun data member.
476  void ResetAutorun(void);
477 
478  /// Assign default value to Autorun data member.
479  void SetDefaultAutorun(void);
480 
481  /// Get the Autorun member data.
482  ///
483  /// @return
484  /// Copy of the member data.
485  TAutorun GetAutorun(void) const;
486 
487  /// Assign a value to Autorun data member.
488  ///
489  /// @param value
490  /// Value to assign
491  void SetAutorun(TAutorun value);
492 
493  /// Assign a value to Autorun data member.
494  ///
495  /// @return
496  /// Reference to the data value.
497  TAutorun& SetAutorun(void);
498 
499  /// Check if a value has been assigned to Affinity data member.
500  ///
501  /// Data member Affinity is optional with default eAffinity_background;
502  /// its type is defined as 'typedef EAffinity TAffinity'
503  /// @return
504  /// - true, if a value has been assigned.
505  /// - false, otherwise.
506  bool IsSetAffinity(void) const;
507 
508  /// Check if it is safe to call GetAffinity method.
509  ///
510  /// @return
511  /// - true, if the data member is getatable.
512  /// - false, otherwise.
513  bool CanGetAffinity(void) const;
514 
515  /// Reset Affinity data member.
516  void ResetAffinity(void);
517 
518  /// Assign default value to Affinity data member.
519  void SetDefaultAffinity(void);
520 
521  /// Get the Affinity member data.
522  ///
523  /// @return
524  /// Copy of the member data.
525  TAffinity GetAffinity(void) const;
526 
527  /// Assign a value to Affinity data member.
528  ///
529  /// @param value
530  /// Value to assign
531  void SetAffinity(TAffinity value);
532 
533  /// Assign a value to Affinity data member.
534  ///
535  /// @return
536  /// Reference to the data value.
537  TAffinity& SetAffinity(void);
538 
539  /// the command and requirements
540  /// for this plugin
541  /// Check if a value has been assigned to Command data member.
542  ///
543  /// Data member Command is mandatory;
544  /// its type is defined as 'typedef CPluginCommand TCommand'
545  /// @return
546  /// - true, if a value has been assigned.
547  /// - false, otherwise.
548  bool IsSetCommand(void) const;
549 
550  /// Check if it is safe to call GetCommand method.
551  ///
552  /// @return
553  /// - true, if the data member is getatable.
554  /// - false, otherwise.
555  bool CanGetCommand(void) const;
556 
557  /// Reset Command data member.
558  void ResetCommand(void);
559 
560  /// Get the Command member data.
561  ///
562  /// @return
563  /// Reference to the member data.
564  const TCommand& GetCommand(void) const;
565 
566  /// Assign a value to Command data member.
567  ///
568  /// @param value
569  /// Reference to value.
570  void SetCommand(TCommand& value);
571 
572  /// Assign a value to Command data member.
573  ///
574  /// @return
575  /// Reference to the data value.
576  TCommand& SetCommand(void);
577 
578  /// optional information about an icon suitable for this plugin
579  /// this is managed as a named resource, with separate registration
580  /// of the resource binding the name to an image
581  /// Check if a value has been assigned to Icon_info data member.
582  ///
583  /// Data member Icon_info is optional;
584  /// its type is defined as 'typedef CPluginIconInfo TIcon_info'
585  /// @return
586  /// - true, if a value has been assigned.
587  /// - false, otherwise.
588  bool IsSetIcon_info(void) const;
589 
590  /// Check if it is safe to call GetIcon_info method.
591  ///
592  /// @return
593  /// - true, if the data member is getatable.
594  /// - false, otherwise.
595  bool CanGetIcon_info(void) const;
596 
597  /// Reset Icon_info data member.
598  void ResetIcon_info(void);
599 
600  /// Get the Icon_info member data.
601  ///
602  /// @return
603  /// Reference to the member data.
604  const TIcon_info& GetIcon_info(void) const;
605 
606  /// Assign a value to Icon_info data member.
607  ///
608  /// @param value
609  /// Reference to value.
610  void SetIcon_info(TIcon_info& value);
611 
612  /// Assign a value to Icon_info data member.
613  ///
614  /// @return
615  /// Reference to the data value.
616  TIcon_info& SetIcon_info(void);
617 
618  /// here is the set of user types to which this plugin subscribes
619  /// any object of these types will work for this plugin
620  /// Check if a value has been assigned to Applicable_user_types data member.
621  ///
622  /// Data member Applicable_user_types is optional;
623  /// its type is defined as 'typedef list< CRef< CPluginUserType > > TApplicable_user_types'
624  /// @return
625  /// - true, if a value has been assigned.
626  /// - false, otherwise.
627  bool IsSetApplicable_user_types(void) const;
628 
629  /// Check if it is safe to call GetApplicable_user_types method.
630  ///
631  /// @return
632  /// - true, if the data member is getatable.
633  /// - false, otherwise.
634  bool CanGetApplicable_user_types(void) const;
635 
636  /// Reset Applicable_user_types data member.
637  void ResetApplicable_user_types(void);
638 
639  /// Get the Applicable_user_types member data.
640  ///
641  /// @return
642  /// Reference to the member data.
643  const TApplicable_user_types& GetApplicable_user_types(void) const;
644 
645  /// Assign a value to Applicable_user_types data member.
646  ///
647  /// @return
648  /// Reference to the data value.
649  TApplicable_user_types& SetApplicable_user_types(void);
650 
651  /// Reset the whole object
652  virtual void Reset(void);
653 
654 
655 private:
656  // Prohibit copy constructor and assignment operator
659 
660  // data
661  Uint4 m_set_State[1];
666  string m_Class_name;
667  string m_Menu_item;
668  string m_Tooltip;
669  string m_Help_file;
670  bool m_Autorun;
674  list< CRef< CPluginUserType > > m_Applicable_user_types;
675 };
676 
677 /* @} */
678 
679 
680 
681 
682 
683 ///////////////////////////////////////////////////////////
684 ///////////////////// inline methods //////////////////////
685 ///////////////////////////////////////////////////////////
686 inline
688 {
689  return ((m_set_State[0] & 0x3) != 0);
690 }
691 
692 inline
694 {
695  return IsSetVer_major();
696 }
697 
698 inline
700 {
701  m_Ver_major = 0;
702  m_set_State[0] &= ~0x3;
703 }
704 
705 inline
707 {
708  if (!CanGetVer_major()) {
709  ThrowUnassigned(0);
710  }
711  return m_Ver_major;
712 }
713 
714 inline
716 {
717  m_Ver_major = value;
718  m_set_State[0] |= 0x3;
719 }
720 
721 inline
723 {
724 #ifdef _DEBUG
725  if (!IsSetVer_major()) {
726  memset(&m_Ver_major,UnassignedByte(),sizeof(m_Ver_major));
727  }
728 #endif
729  m_set_State[0] |= 0x1;
730  return m_Ver_major;
731 }
732 
733 inline
735 {
736  return ((m_set_State[0] & 0xc) != 0);
737 }
738 
739 inline
741 {
742  return IsSetVer_minor();
743 }
744 
745 inline
747 {
748  m_Ver_minor = 0;
749  m_set_State[0] &= ~0xc;
750 }
751 
752 inline
754 {
755  if (!CanGetVer_minor()) {
756  ThrowUnassigned(1);
757  }
758  return m_Ver_minor;
759 }
760 
761 inline
763 {
764  m_Ver_minor = value;
765  m_set_State[0] |= 0xc;
766 }
767 
768 inline
770 {
771 #ifdef _DEBUG
772  if (!IsSetVer_minor()) {
773  memset(&m_Ver_minor,UnassignedByte(),sizeof(m_Ver_minor));
774  }
775 #endif
776  m_set_State[0] |= 0x4;
777  return m_Ver_minor;
778 }
779 
780 inline
782 {
783  return ((m_set_State[0] & 0x30) != 0);
784 }
785 
786 inline
788 {
789  return IsSetVer_revision();
790 }
791 
792 inline
794 {
795  m_Ver_revision = 0;
796  m_set_State[0] &= ~0x30;
797 }
798 
799 inline
801 {
802  if (!CanGetVer_revision()) {
803  ThrowUnassigned(2);
804  }
805  return m_Ver_revision;
806 }
807 
808 inline
810 {
812  m_set_State[0] |= 0x30;
813 }
814 
815 inline
817 {
818 #ifdef _DEBUG
819  if (!IsSetVer_revision()) {
820  memset(&m_Ver_revision,UnassignedByte(),sizeof(m_Ver_revision));
821  }
822 #endif
823  m_set_State[0] |= 0x10;
824  return m_Ver_revision;
825 }
826 
827 inline
829 {
830  return ((m_set_State[0] & 0xc0) != 0);
831 }
832 
833 inline
835 {
836  return IsSetVer_build_date();
837 }
838 
839 inline
841 {
842  if (!CanGetVer_build_date()) {
843  ThrowUnassigned(3);
844  }
845  return m_Ver_build_date;
846 }
847 
848 inline
850 {
852  m_set_State[0] |= 0xc0;
853 }
854 
855 inline
857 {
858  m_Ver_build_date = std::forward<CPluginInfo_Base::TVer_build_date>(value);
859  m_set_State[0] |= 0xc0;
860 }
861 
862 inline
864 {
865 #ifdef _DEBUG
866  if (!IsSetVer_build_date()) {
868  }
869 #endif
870  m_set_State[0] |= 0x40;
871  return m_Ver_build_date;
872 }
873 
874 inline
876 {
877  return ((m_set_State[0] & 0x300) != 0);
878 }
879 
880 inline
882 {
883  return IsSetClass_name();
884 }
885 
886 inline
888 {
889  if (!CanGetClass_name()) {
890  ThrowUnassigned(4);
891  }
892  return m_Class_name;
893 }
894 
895 inline
897 {
899  m_set_State[0] |= 0x300;
900 }
901 
902 inline
904 {
905  m_Class_name = std::forward<CPluginInfo_Base::TClass_name>(value);
906  m_set_State[0] |= 0x300;
907 }
908 
909 inline
911 {
912 #ifdef _DEBUG
913  if (!IsSetClass_name()) {
915  }
916 #endif
917  m_set_State[0] |= 0x100;
918  return m_Class_name;
919 }
920 
921 inline
923 {
924  return ((m_set_State[0] & 0xc00) != 0);
925 }
926 
927 inline
929 {
930  return IsSetMenu_item();
931 }
932 
933 inline
935 {
936  if (!CanGetMenu_item()) {
937  ThrowUnassigned(5);
938  }
939  return m_Menu_item;
940 }
941 
942 inline
944 {
945  m_Menu_item = value;
946  m_set_State[0] |= 0xc00;
947 }
948 
949 inline
951 {
952  m_Menu_item = std::forward<CPluginInfo_Base::TMenu_item>(value);
953  m_set_State[0] |= 0xc00;
954 }
955 
956 inline
958 {
959 #ifdef _DEBUG
960  if (!IsSetMenu_item()) {
962  }
963 #endif
964  m_set_State[0] |= 0x400;
965  return m_Menu_item;
966 }
967 
968 inline
970 {
971  return ((m_set_State[0] & 0x3000) != 0);
972 }
973 
974 inline
976 {
977  return IsSetTooltip();
978 }
979 
980 inline
982 {
983  if (!CanGetTooltip()) {
984  ThrowUnassigned(6);
985  }
986  return m_Tooltip;
987 }
988 
989 inline
991 {
992  m_Tooltip = value;
993  m_set_State[0] |= 0x3000;
994 }
995 
996 inline
998 {
999  m_Tooltip = std::forward<CPluginInfo_Base::TTooltip>(value);
1000  m_set_State[0] |= 0x3000;
1001 }
1002 
1003 inline
1005 {
1006 #ifdef _DEBUG
1007  if (!IsSetTooltip()) {
1009  }
1010 #endif
1011  m_set_State[0] |= 0x1000;
1012  return m_Tooltip;
1013 }
1014 
1015 inline
1017 {
1018  return ((m_set_State[0] & 0xc000) != 0);
1019 }
1020 
1021 inline
1023 {
1024  return IsSetHelp_file();
1025 }
1026 
1027 inline
1029 {
1030  if (!CanGetHelp_file()) {
1031  ThrowUnassigned(7);
1032  }
1033  return m_Help_file;
1034 }
1035 
1036 inline
1038 {
1039  m_Help_file = value;
1040  m_set_State[0] |= 0xc000;
1041 }
1042 
1043 inline
1045 {
1046  m_Help_file = std::forward<CPluginInfo_Base::THelp_file>(value);
1047  m_set_State[0] |= 0xc000;
1048 }
1049 
1050 inline
1052 {
1053 #ifdef _DEBUG
1054  if (!IsSetHelp_file()) {
1056  }
1057 #endif
1058  m_set_State[0] |= 0x4000;
1059  return m_Help_file;
1060 }
1061 
1062 inline
1064 {
1065  return ((m_set_State[0] & 0x30000) != 0);
1066 }
1067 
1068 inline
1070 {
1071  return true;
1072 }
1073 
1074 inline
1076 {
1077  m_Autorun = false;
1078  m_set_State[0] &= ~0x30000;
1079 }
1080 
1081 inline
1083 {
1084  ResetAutorun();
1085 }
1086 
1087 inline
1089 {
1090  return m_Autorun;
1091 }
1092 
1093 inline
1095 {
1096  m_Autorun = value;
1097  m_set_State[0] |= 0x30000;
1098 }
1099 
1100 inline
1102 {
1103 #ifdef _DEBUG
1104  if (!IsSetAutorun()) {
1105  memset(&m_Autorun,UnassignedByte(),sizeof(m_Autorun));
1106  }
1107 #endif
1108  m_set_State[0] |= 0x10000;
1109  return m_Autorun;
1110 }
1111 
1112 inline
1114 {
1115  return ((m_set_State[0] & 0xc0000) != 0);
1116 }
1117 
1118 inline
1120 {
1121  return true;
1122 }
1123 
1124 inline
1126 {
1128  m_set_State[0] &= ~0xc0000;
1129 }
1130 
1131 inline
1133 {
1134  ResetAffinity();
1135 }
1136 
1137 inline
1139 {
1140  return m_Affinity;
1141 }
1142 
1143 inline
1145 {
1146  m_Affinity = value;
1147  m_set_State[0] |= 0xc0000;
1148 }
1149 
1150 inline
1152 {
1153 #ifdef _DEBUG
1154  if (!IsSetAffinity()) {
1155  memset(&m_Affinity,UnassignedByte(),sizeof(m_Affinity));
1156  }
1157 #endif
1158  m_set_State[0] |= 0x40000;
1159  return m_Affinity;
1160 }
1161 
1162 inline
1164 {
1165  return m_Command.NotEmpty();
1166 }
1167 
1168 inline
1170 {
1171  return true;
1172 }
1173 
1174 inline
1176 {
1177  if ( !m_Command ) {
1178  const_cast<CPluginInfo_Base*>(this)->ResetCommand();
1179  }
1180  return (*m_Command);
1181 }
1182 
1183 inline
1185 {
1186  if ( !m_Command ) {
1187  ResetCommand();
1188  }
1189  return (*m_Command);
1190 }
1191 
1192 inline
1194 {
1195  return m_Icon_info.NotEmpty();
1196 }
1197 
1198 inline
1200 {
1201  return IsSetIcon_info();
1202 }
1203 
1204 inline
1206 {
1207  if (!CanGetIcon_info()) {
1208  ThrowUnassigned(11);
1209  }
1210  return (*m_Icon_info);
1211 }
1212 
1213 inline
1215 {
1216  return ((m_set_State[0] & 0x3000000) != 0);
1217 }
1218 
1219 inline
1221 {
1222  return true;
1223 }
1224 
1225 inline
1227 {
1228  return m_Applicable_user_types;
1229 }
1230 
1231 inline
1233 {
1234  m_set_State[0] |= 0x1000000;
1235  return m_Applicable_user_types;
1236 }
1237 
1238 ///////////////////////////////////////////////////////////
1239 ////////////////// end of inline methods //////////////////
1240 ///////////////////////////////////////////////////////////
1241 
1242 
1243 
1244 
1245 
1246 END_objects_SCOPE // namespace ncbi::objects::
1247 
1249 
1250 
1251 #endif // GUI_OBJECTS_PLUGININFO_BASE_HPP
CPluginInfo_Base –.
Definition: PluginInfo_.hpp:83
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
static char UnassignedByte(void)
Definition: serialbase.hpp:181
void ThrowUnassigned(TMemberIndex index) const
#define ENUM_METHOD_NAME(EnumName)
Definition: serialbase.hpp:994
static string UnassignedString(void)
Definition: serialbase.hpp:175
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
#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 NCBI_GUIOBJECTS_EXPORT
Definition: gui_export.h:511
THelp_file & SetHelp_file(void)
Assign a value to Help_file data member.
void SetDefaultAffinity(void)
Assign default value to Affinity data member.
CRef< TIcon_info > m_Icon_info
CSerialObject Tparent
Definition: PluginInfo_.hpp:84
TApplicable_user_types & SetApplicable_user_types(void)
Assign a value to Applicable_user_types data member.
bool IsSetVer_major(void) const
major version number Check if a value has been assigned to Ver_major data member.
void ResetVer_major(void)
Reset Ver_major data member.
EAffinity m_Affinity
bool IsSetVer_minor(void) const
minor version number Check if a value has been assigned to Ver_minor data member.
const TClass_name & GetClass_name(void) const
Get the Class_name member data.
TVer_revision GetVer_revision(void) const
Get the Ver_revision member data.
bool CanGetVer_build_date(void) const
Check if it is safe to call GetVer_build_date method.
bool CanGetTooltip(void) const
Check if it is safe to call GetTooltip method.
const TIcon_info & GetIcon_info(void) const
Get the Icon_info member data.
bool IsSetVer_revision(void) const
plugin-specific revision number Check if a value has been assigned to Ver_revision data member.
bool IsSetTooltip(void) const
text for mouse-overs and status bars Check if a value has been assigned to Tooltip data member.
TVer_minor GetVer_minor(void) const
Get the Ver_minor member data.
TMenu_item & SetMenu_item(void)
Assign a value to Menu_item data member.
bool CanGetAffinity(void) const
Check if it is safe to call GetAffinity method.
TVer_revision & SetVer_revision(void)
Assign a value to Ver_revision data member.
void ResetVer_minor(void)
Reset Ver_minor data member.
bool CanGetApplicable_user_types(void) const
Check if it is safe to call GetApplicable_user_types method.
void SetDefaultAutorun(void)
Assign default value to Autorun data member.
void ResetAutorun(void)
Reset Autorun data member.
bool IsSetApplicable_user_types(void) const
here is the set of user types to which this plugin subscribes any object of these types will work for...
bool IsSetAffinity(void) const
Check if a value has been assigned to Affinity data member.
TAutorun GetAutorun(void) const
Get the Autorun member data.
CPluginInfo_Base(const CPluginInfo_Base &)
EAffinity
if 'foreground-only' is true, then this plugin will run entirely in the foreground (main) thread.
Definition: PluginInfo_.hpp:98
bool CanGetVer_revision(void) const
Check if it is safe to call GetVer_revision method.
void ResetCommand(void)
Reset Command data member.
Definition: PluginInfo_.cpp:93
CPluginCommand TCommand
bool CanGetIcon_info(void) const
Check if it is safe to call GetIcon_info method.
const TVer_build_date & GetVer_build_date(void) const
Get the Ver_build_date member data.
const TMenu_item & GetMenu_item(void) const
Get the Menu_item member data.
bool IsSetCommand(void) const
the command and requirements for this plugin Check if a value has been assigned to Command data membe...
TVer_major GetVer_major(void) const
Get the Ver_major member data.
bool IsSetIcon_info(void) const
optional information about an icon suitable for this plugin this is managed as a named resource,...
list< CRef< CPluginUserType > > TApplicable_user_types
CPluginIconInfo TIcon_info
bool IsSetClass_name(void) const
text tag uniquely identifying this plugin Check if a value has been assigned to Class_name data membe...
TClass_name & SetClass_name(void)
Assign a value to Class_name data member.
TCommand & SetCommand(void)
Assign a value to Command data member.
bool CanGetClass_name(void) const
Check if it is safe to call GetClass_name method.
bool IsSetVer_build_date(void) const
date of build Check if a value has been assigned to Ver_build_date data member.
Tparent::CMemberIndex< E_memberIndex, 14 > TmemberIndex
const TApplicable_user_types & GetApplicable_user_types(void) const
Get the Applicable_user_types member data.
bool CanGetVer_major(void) const
Check if it is safe to call GetVer_major method.
TTooltip & SetTooltip(void)
Assign a value to Tooltip data member.
bool CanGetHelp_file(void) const
Check if it is safe to call GetHelp_file method.
bool IsSetMenu_item(void) const
menu item that will be shown in a GUI Check if a value has been assigned to Menu_item data member.
Uint4 m_set_State[1]
TAutorun & SetAutorun(void)
Assign a value to Autorun data member.
CPluginInfo_Base & operator=(const CPluginInfo_Base &)
void ResetAffinity(void)
Reset Affinity data member.
EAffinity TAffinity
TVer_minor & SetVer_minor(void)
Assign a value to Ver_minor data member.
const TCommand & GetCommand(void) const
Get the Command member data.
const TTooltip & GetTooltip(void) const
Get the Tooltip member data.
CRef< TCommand > m_Command
const THelp_file & GetHelp_file(void) const
Get the Help_file member data.
list< CRef< CPluginUserType > > m_Applicable_user_types
bool CanGetMenu_item(void) const
Check if it is safe to call GetMenu_item method.
bool CanGetCommand(void) const
Check if it is safe to call GetCommand method.
bool IsSetHelp_file(void) const
location of the help file associated with this plugin Check if a value has been assigned to Help_file...
TAffinity GetAffinity(void) const
Get the Affinity member data.
bool IsSetAutorun(void) const
if 'autorun' is true, we launch this plugin command at application startup Check if a value has been ...
void ResetVer_revision(void)
Reset Ver_revision data member.
bool CanGetAutorun(void) const
Check if it is safe to call GetAutorun method.
TAffinity & SetAffinity(void)
Assign a value to Affinity data member.
bool CanGetVer_minor(void) const
Check if it is safe to call GetVer_minor method.
TVer_major & SetVer_major(void)
Assign a value to Ver_major data member.
TVer_build_date & SetVer_build_date(void)
Assign a value to Ver_build_date data member.
Defines to provide correct exporting from DLLs in Windows.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Sat Jun 08 14:24:04 2024 by modify_doxy.py rev. 669887