NCBI C++ ToolKit
PluginRequest_.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 PluginRequest_.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_PLUGINREQUEST_BASE_HPP
42 #define GUI_OBJECTS_PLUGINREQUEST_BASE_HPP
43 
44 // extra headers
45 #include <gui/gui_export.h>
46 
47 // standard includes
48 #include <serial/serialbase.hpp>
50 
51 #ifndef BEGIN_objects_SCOPE
52 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
53 # define END_objects_SCOPE END_SCOPE(objects)
54 #endif
55 BEGIN_objects_SCOPE // namespace ncbi::objects::
56 
57 
58 // forward declarations
59 class CPluginCommand;
60 
61 
62 // generated classes
63 
64 
65 /** @addtogroup dataspec_NCBI_Plugin
66  *
67  * @{
68  */
69 
70 /////////////////////////////////////////////////////////////////////////////
71 ///-
72 ///- PluginRequest defines the commands we can issue to a plugin
73 ///-
74 ///
75 /// CPluginRequest_Base --
76 ///
77 
79 {
81 public:
82  // constructor
83  CPluginRequest_Base(void);
84  // destructor
85  virtual ~CPluginRequest_Base(void);
86 
87  // type info
89 
90  // types
92 
93  // member index
94  enum class E_memberIndex {
95  e__allMandatory = 0,
96  e_command
97  };
99 
100  // getters
101  // setters
102 
103  /// Check if a value has been assigned to Command data member.
104  ///
105  /// Data member Command is mandatory;
106  /// its type is defined as 'typedef CPluginCommand TCommand'
107  /// @return
108  /// - true, if a value has been assigned.
109  /// - false, otherwise.
110  bool IsSetCommand(void) const;
111 
112  /// Check if it is safe to call GetCommand method.
113  ///
114  /// @return
115  /// - true, if the data member is getatable.
116  /// - false, otherwise.
117  bool CanGetCommand(void) const;
118 
119  /// Reset Command data member.
120  void ResetCommand(void);
121 
122  /// Get the Command member data.
123  ///
124  /// @return
125  /// Reference to the member data.
126  const TCommand& GetCommand(void) const;
127 
128  /// Assign a value to Command data member.
129  ///
130  /// @param value
131  /// Reference to value.
132  void SetCommand(TCommand& value);
133 
134  /// Assign a value to Command data member.
135  ///
136  /// @return
137  /// Reference to the data value.
138  TCommand& SetCommand(void);
139 
140  /// Reset the whole object
141  virtual void Reset(void);
142 
143 
144 private:
145  // Prohibit copy constructor and assignment operator
148 
149  // data
150  Uint4 m_set_State[1];
152 };
153 
154 /* @} */
155 
156 
157 
158 
159 
160 ///////////////////////////////////////////////////////////
161 ///////////////////// inline methods //////////////////////
162 ///////////////////////////////////////////////////////////
163 inline
165 {
166  return m_Command.NotEmpty();
167 }
168 
169 inline
171 {
172  return true;
173 }
174 
175 inline
177 {
178  if ( !m_Command ) {
179  const_cast<CPluginRequest_Base*>(this)->ResetCommand();
180  }
181  return (*m_Command);
182 }
183 
184 inline
186 {
187  if ( !m_Command ) {
188  ResetCommand();
189  }
190  return (*m_Command);
191 }
192 
193 ///////////////////////////////////////////////////////////
194 ////////////////// end of inline methods //////////////////
195 ///////////////////////////////////////////////////////////
196 
197 
198 
199 
200 
201 END_objects_SCOPE // namespace ncbi::objects::
202 
204 
205 
206 #endif // GUI_OBJECTS_PLUGINREQUEST_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
char value[7]
Definition: config.c:431
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
void ResetCommand(void)
Reset Command data member.
CPluginRequest_Base & operator=(const CPluginRequest_Base &)
bool IsSetCommand(void) const
Check if a value has been assigned to Command data member.
CPluginRequest_Base(const CPluginRequest_Base &)
bool CanGetCommand(void) const
Check if it is safe to call GetCommand method.
CSerialObject Tparent
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
TCommand & SetCommand(void)
Assign a value to Command data member.
const TCommand & GetCommand(void) const
Get the Command member data.
CPluginCommand TCommand
CRef< TCommand > m_Command
Defines to provide correct exporting from DLLs in Windows.
Modified on Thu Nov 30 04:57:31 2023 by modify_doxy.py rev. 669887