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

Go to the SVN repository for this file.

1 /* $Id: GBProject_ver2.cpp 59444 2013-08-26 17:38:09Z rafanovi $
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 the following specifications:
34  * 'gbproj.asn'.
35  */
36 
37 // standard includes
38 #include <ncbi_pch.hpp>
39 
40 // generated includes
44 
45 // generated classes
46 
48 
49 BEGIN_objects_SCOPE // namespace ncbi::objects::
50 
51 
52 // constructor
54 {
55  SetProject_version("ver2");
56 }
57 
58 
59 // destructor
61 {
62 }
63 
64 
65 
66 //void CGBProject_ver2::SetScope(CScope* scope)
67 //{
68 // _ASSERT(m_Scope.GetPointer() == NULL);
69 // m_Scope.Reset(scope);
70 //}
71 //
72 //
73 //CScope* CGBProject_ver2::GetScope()
74 //{
75 // return m_Scope.GetPointer();
76 //}
77 
78 
80 {
81  // first, set the ID to the next available
82  item.SetId(GetCounter());
83  SetCounter(GetCounter() + 1);
84 
85  folder.AddChildItem(item);
86 }
87 
88 
90 {
91  return Tparent::GetData();
92 }
93 
94 
96 {
97  if ( !IsSetData() ||
98  !GetData().IsSetInfo() ||
99  !GetData().GetInfo().IsSetTitle() ) {
100 
102  info.SetTitle("Data");
103  info.SetComment("Default folder for Project Items");
104  info.SetCreateDate(CTime(CTime::eCurrent));
105  }
106  return Tparent::SetData();
107 }
108 
109 
110 /// retrieve the descriptor set for this project
112 {
113  return Tparent::IsSetDescr();
114 }
115 
116 
118 {
119  return Tparent::GetDescr();
120 }
121 
122 
124 {
125  return Tparent::SetDescr();
126 }
127 
128 
130 {
131  Tparent::SetDescr(desc);
132 }
133 
134 
135 /// retrieve the descriptor set for this project
137 {
138  return Tparent::IsSetAnnot();
139 }
140 
141 
143 {
144  return Tparent::GetAnnot();
145 }
146 
147 
149 {
150  return Tparent::SetAnnot();
151 }
152 
153 
155 {
156  return Tparent::IsSetLoaders();
157 }
158 
159 
161 {
162  return Tparent::GetLoaders();
163 }
164 
165 
167 {
168  return Tparent::SetLoaders();
169 }
170 
171 
172 /// retrieve the view descriptor set for this project
174 {
175  return Tparent::IsSetViews();
176 }
177 
178 
180 {
181  return Tparent::GetViews();
182 }
183 
184 
186 {
187  return Tparent::SetViews();
188 }
189 
190 
192 {
194 }
195 
196 
198 {
199  return Tparent::GetView_settings();
200 }
201 
202 
204 {
205  return Tparent::SetView_settings();
206 }
207 
208 
210 {
211  SetDescr().SetCreateDate(date);
212  SetDirtyFlag(true);
213 }
214 
215 
217 {
218  SetDescr().SetModifiedDate(date);
219  SetDirtyFlag(true);
220 }
221 
222 
224 {
225  m_Dirty = dirty;
226 
227  if (m_Dirty) {
228  CTime time;
229  time.SetCurrent();
230  SetDescr().SetModified_date().SetToTime(time);
231  }
232 }
233 
234 
236 {
237  return m_Dirty;
238 }
239 
240 
241 END_objects_SCOPE // namespace ncbi::objects::
242 
244 
245 /* Original file checksum: lines: 57, chars: 1737, CRC32: f0c41394 */
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Definition: Date.hpp:53
bool IsSetDescr() const
retrieve the descriptor set for this project
bool GetDirtyFlag() const
const IGBProject::TViews & GetViews() const
virtual bool IsSetViewSettings() const
view-specific settings.
virtual const TDataLoaders & GetDataLoaders() const
virtual bool IsSetDataLoaders() const
retrieve the data loader descriptor set for this project
void SetDirtyFlag(bool dirty)
const CProjectDescr & GetDescr() const
virtual TDataLoaders & SetDataLoaders()
IGBProject::TViews & SetViews()
void SetModifiedDate(const CDate &date)
SetModifiedDate() will add a descriptor for the update date.
bool IsSetViews() const
retrieve the view descriptor set for this project
const IGBProject::TAnnot & GetAnnot() const
bool IsSetAnnot() const
retrieve the descriptor set for this project
void AddItem(CProjectItem &item, CProjectFolder &folder)
Add an item to the current project.
CProjectDescr & SetDescr()
CProjectFolder & SetData()
const CProjectFolder & GetData() const
retrieve our project's data, in the form of a project folder this may be a contrived entity,...
void SetCreateDate(const CDate &date)
SetCreateDate() will add a descriptor for creation date.
virtual TViewSettings & SetViewSettings()
virtual const TViewSettings & GetViewSettings() const
IGBProject::TAnnot & SetAnnot()
void SetCreateDate(const CTime &time)
SetCreateDate() will add a descriptor for creation date.
void SetModifiedDate(const CTime &time)
SetModifiedDate() will add a descriptor for the update date.
void AddChildItem(CProjectItem &child_item)
CTime –.
Definition: ncbitime.hpp:296
list< CRef< CLoaderDescriptor > > TDataLoaders
Definition: igbproject.hpp:70
list< CRef< CViewDescriptor > > TViews
Definition: igbproject.hpp:69
list< CRef< CUser_object > > TViewSettings
Definition: igbproject.hpp:71
list< CRef< CProjectAnnot > > TAnnot
Definition: igbproject.hpp:68
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
CTime & SetCurrent(void)
Make the time current in the presently active time zone.
Definition: ncbitime.hpp:2302
@ eCurrent
Use current time. See also CCurrentTime.
Definition: ncbitime.hpp:300
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
TView_settings & SetView_settings(void)
Assign a value to View_settings data member.
const TDescr & GetDescr(void) const
Get the Descr member data.
bool IsSetView_settings(void) const
set of view-specific settings Check if a value has been assigned to View_settings data member.
bool IsSetViews(void) const
TCounter GetCounter(void) const
Get the Counter member data.
TLoaders & SetLoaders(void)
Assign a value to Loaders data member.
void SetId(TId value)
Assign a value to Id data member.
bool IsSetAnnot(void) const
arbitrary annotations Check if a value has been assigned to Annot data member.
TViews & SetViews(void)
Assign a value to Views data member.
const TView_settings & GetView_settings(void) const
Get the View_settings member data.
bool IsSetLoaders(void) const
a set of data sources including data loader and data Check if a value has been assigned to Loaders da...
bool IsSetData(void) const
a set of extra analyses perfromed by the user each of these may have descriptors Check if a value has...
bool IsSetDescr(void) const
standard descriptors Check if a value has been assigned to Descr data member.
const TData & GetData(void) const
Get the Data member data.
TData & SetData(void)
Assign a value to Data data member.
TCounter & SetCounter(void)
Assign a value to Counter data member.
TProject_version & SetProject_version(void)
Assign a value to Project_version data member.
void SetInfo(TInfo &value)
Assign a value to Info data member.
const TViews & GetViews(void) const
Get the Views member data.
void SetModified_date(TModified_date &value)
Assign a value to Modified_date data member.
const TLoaders & GetLoaders(void) const
Get the Loaders member data.
TDescr & SetDescr(void)
Assign a value to Descr data member.
const TAnnot & GetAnnot(void) const
Get the Annot member data.
static MDB_envinfo info
Definition: mdb_load.c:37
Modified on Sun Apr 28 04:47:05 2024 by modify_doxy.py rev. 669887