NCBI C++ ToolKit
PluginInfo.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: PluginInfo.cpp 14666 2007-07-09 13:40:22Z dicuccio $
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  * Author: .......
27  *
28  * File Description:
29  * .......
30  *
31  * Remark:
32  * This code was originally generated by application DATATOOL
33  * using specifications from the data definition file
34  * 'plugin.asn'.
35  */
36 
37 // standard includes
38 
39 // generated includes
40 #include <ncbi_pch.hpp>
41 
44 
45 // generated classes
46 
48 
49 BEGIN_objects_SCOPE // namespace ncbi::objects::
50 
51 // destructor
53 {
54 }
55 
56 
57 // set the standard plugin boilerplate fields
58 void CPluginInfo::SetInfo(int major, int minor, int rev,
59  const string& build_date,
60  const string& class_name,
61  const string& menu_item,
62  const string& tooltip,
63  const string& help_file)
64 {
65  // required items
66  SetVer_major (major);
67  SetVer_minor (minor);
68  SetVer_revision (rev);
69  SetVer_build_date(build_date);
70  SetClass_name (class_name);
71 
72  // optional items
73  if ( !menu_item.empty() ) {
74  SetMenu_item(menu_item);
75  }
76 
77  if ( !tooltip.empty() ) {
78  SetTooltip(tooltip);
79  }
80 
81  if ( !help_file.empty() ) {
82  SetHelp_file(help_file);
83  }
84 }
85 
86 
87 void CPluginInfo::SetInfo(int major, int minor, int rev,
88  const string& build_date,
89  const string& class_name,
90  const string& menu_item,
91  const string& tooltip,
92  const string& help_file,
93  const string& icon_alias,
94  const string& icon_local_path)
95 
96 {
97  SetInfo(major, minor, rev, build_date, class_name, menu_item, tooltip, help_file);
98  SetIcon_info().SetAlias(icon_alias);
99  SetIcon_info().SetPath(icon_local_path);
100 }
101 
102 
104 {
106  algo.SetCommand(cmd);
107  return algo;
108 }
109 
110 
112 {
113  CPluginCommand& view = SetCommand();
114  view.SetCommand(cmd);
115 
116  /// force all view-related commands to run in the foreground by default
118 
119  return view;
120 }
121 
122 
124 {
125  CPluginCommand& data = SetCommand();
126  data.SetCommand(cmd);
127  return data;
128 }
129 
130 
131 void CPluginInfo::AddApplicableUserType(const string& type, const string& subtype)
132 {
134  ref->SetType(type);
135  ref->SetSubtype(subtype);
136  SetApplicable_user_types().push_back(ref);
137 }
138 
139 
140 END_objects_SCOPE // namespace ncbi::objects::
141 
143 
144 /* Original file checksum: lines: 64, chars: 1880, CRC32: 17968bbc */
User-defined methods of the data storage class.
void SetInfo(int major, int minor, int rev, const string &build_date, const string &class_name, const string &menu_item, const string &tooltip, const string &help_file)
Definition: PluginInfo.cpp:58
~CPluginInfo(void)
Definition: PluginInfo.cpp:52
CPluginCommand & SetViewCommand(CPluginCommand::TCommand cmd)
Definition: PluginInfo.cpp:111
CPluginCommand & SetAlgoCommand(CPluginCommand::TCommand cmd)
Definition: PluginInfo.cpp:103
void AddApplicableUserType(const string &type, const string &subtype=kEmptyStr)
Definition: PluginInfo.cpp:131
CPluginCommand & SetDataCommand(CPluginCommand::TCommand cmd)
Definition: PluginInfo.cpp:123
CRef –.
Definition: ncbiobj.hpp:618
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
THelp_file & SetHelp_file(void)
Assign a value to Help_file data member.
TApplicable_user_types & SetApplicable_user_types(void)
Assign a value to Applicable_user_types data member.
TIcon_info & SetIcon_info(void)
Assign a value to Icon_info data member.
TMenu_item & SetMenu_item(void)
Assign a value to Menu_item data member.
TVer_revision & SetVer_revision(void)
Assign a value to Ver_revision data member.
void SetPath(const TPath &value)
Assign a value to Path data member.
TClass_name & SetClass_name(void)
Assign a value to Class_name data member.
TCommand & SetCommand(void)
Assign a value to Command data member.
TTooltip & SetTooltip(void)
Assign a value to Tooltip data member.
void SetCommand(TCommand value)
Assign a value to Command data member.
void SetAlias(const TAlias &value)
Assign a value to Alias data member.
TVer_minor & SetVer_minor(void)
Assign a value to Ver_minor data member.
TAffinity & SetAffinity(void)
Assign a value to Affinity data member.
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.
ESERV_Algo algo
Definition: type.c:6
Modified on Sat Dec 02 09:23:39 2023 by modify_doxy.py rev. 669887