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

Go to the SVN repository for this file.

1 /* $Id: PluginObject.hpp 30280 2014-04-23 20:28:26Z katargir $
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 #ifndef GUI_PLUGIN_PLUGINOBJECT_HPP
38 #define GUI_PLUGIN_PLUGINOBJECT_HPP
39 
40 
41 // generated includes
43 
44 // generated classes
45 
47 
48 
49 BEGIN_objects_SCOPE /// namespace ncbi::objects::
50 
52  : public CPluginObject_Base, public CSerialUserOp
53 {
55 public:
56  /// constructor
57  CPluginObject(void);
58  /// destructor
59  ~CPluginObject(void);
60 
61  /// overloaded Reset() - allows us to clear our derived types
62  void Reset(void);
63 
64  /// PostRead() - provides ability to set derived type
65  void PostRead();
66 
67  /// access the project for this object
68  const CGBProjectHandle* GetProject(void) const;
69 
70  /// access the object for this object
71  const CObject* GetObject(void) const;
72 
73  /// find out if this object is empty
74  bool IsEmpty(void) const;
75 
76  void SetProject(const CGBProjectHandle* doc);
77  void SetObject(const string& type);
78  void SetObject(const CTypeInfo* info = NULL);
79  void SetObject(const CObject& obj, const CGBProjectHandle* scope = NULL, const CDataHandle * dh = NULL);
80 
81 
82 protected:
83  /// From CSerialUserOp
84  virtual void UserOp_Assign(const CSerialUserOp& source);
85  virtual bool UserOp_Equals(const CSerialUserOp& object) const;
86 
87  /// we must hold CConstRef<>s of our object to make sure they don't
88  /// fall out of scope
91 
92 private:
93  /// Prohibit copy constructor and assignment operator
96 
97 };
98 
99 
100 
101 /////////////////// CPluginObject inline methods
102 
103 // constructor
104 inline
106 {
107 }
108 
109 
110 inline
112 {
113  return m_Object.GetPointer();
114 }
115 
116 
117 inline
119 {
120  return m_Project.GetPointer();
121 }
122 
123 
124 inline
125 bool CPluginObject::IsEmpty(void) const
126 {
127  return ( !m_Project && !m_Object );
128 }
129 
130 
131 /////////////////// end of CPluginObject inline methods
132 
133 
134 END_objects_SCOPE /// namespace ncbi::objects::
135 
137 
138 NCBISER_HAVE_POST_READ(ncbi::objects::CPluginObject)
139 
140 #endif /// GUI_PLUGIN_PLUGINOBJECT_HPP
141 /* Original file checksum: lines: 93, chars: 2452, CRC32: c82dc3f1 */
Data storage class.
CObject –.
Definition: ncbiobj.hpp:180
namespace ncbi::objects::
CPluginObject_Base Tparent
CConstRef< CObject > m_Object
CPluginObject(const CPluginObject &value)
Prohibit copy constructor and assignment operator.
CPluginObject & operator=(const CPluginObject &value)
bool IsEmpty(void) const
find out if this object is empty
CConstRef< CGBProjectHandle > m_Project
we must hold CConstRef<>s of our object to make sure they don't fall out of scope
const CGBProjectHandle * GetProject(void) const
access the project for this object
CPluginObject(void)
constructor
const CObject * GetObject(void) const
access the object for this object
Base class for user-defined serializable classes to allow for objects assignment and comparison.
Definition: serialbase.hpp:319
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
Definition: typeinfo.hpp:76
#define NULL
Definition: ncbistd.hpp:225
virtual bool UserOp_Equals(const CSerialUserOp &object) const =0
Will be called after comparing the datatool-generated members.
virtual void UserOp_Assign(const CSerialUserOp &source)=0
Will be called after copying the datatool-generated members.
#define NCBISER_HAVE_POST_READ(Class)
Definition: serialbase.hpp:943
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:1684
#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
virtual void Reset(void)
Reset the whole object.
static MDB_envinfo info
Definition: mdb_load.c:37
CProject * GetProject(wxTreeCtrl &treeCtrl, const CItem &item)
Definition: pt_utils.cpp:77
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
const CharType(& source)[N]
Definition: pointer.h:1149
Definition: type.c:6
Modified on Mon Jun 17 05:06:04 2024 by modify_doxy.py rev. 669887