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

Go to the SVN repository for this file.

1 /* $Id: ProjectItem.hpp 63646 2014-07-16 17:36:55Z 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  */
27 
28 /// @file ProjectItem.hpp
29 /// User-defined methods of the data storage class.
30 ///
31 /// This file was originally generated by application DATATOOL
32 /// using the following specifications:
33 /// 'gbproj.asn'.
34 ///
35 /// New methods or data members can be added to it if needed.
36 /// See also: ProjectItem_.hpp
37 
38 
39 #ifndef OBJECTS_GBPROJ_PROJECTITEM_HPP
40 #define OBJECTS_GBPROJ_PROJECTITEM_HPP
41 
42 
43 // generated includes
44 #include <corelib/ncbitime.hpp>
46 
47 #include <set>
48 
49 // generated classes
50 
52 
53 BEGIN_objects_SCOPE // namespace ncbi::objects::
54 
55 class CDate;
56 class CProjectFolder;
57 
58 /////////////////////////////////////////////////////////////////////////////
60 {
62 public:
63  // constructor
64  CProjectItem(void);
65  // destructor
66  ~CProjectItem(void);
67 
68 
69  /// SetCreateDate() will add a descriptor for creation date, and insure
70  /// that only one such descriptor exists
71  void SetCreateDate(const CTime& time);
72  void SetCreateDate(const CDate& date);
73 
74  /// SetModifiedDate() will add a descriptor for the update date, and insure
75  /// that only one such descriptor exists
76  void SetModifiedDate(const CTime& time);
77  void SetModifiedDate(const CDate& date);
78 
79  /// wrapper for setting the object pointed to by this item
80  void SetObject(CSerialObject& object);
81 
82  /// retrieve the object pointed to as a CObject*
83  const CSerialObject* GetObject() const;
84 
85  /// enabled flag
86  bool IsEnabled(void) const;
87 
90  const CProjectFolder* GetParentFolder() const { return 0; }
91 
92  void SetUserObject(CObject* object);
93  CObject* GetUserObject();
94 
95  bool HasTag(const string& tag) const { return (m_Tags.find(tag) != m_Tags.end()); }
96  void AddTag(const string& tag) { m_Tags.insert(tag); }
97  void RemoveTag(const string& tag) { m_Tags.erase(tag); }
98 
99 private:
100  // Prohibit copy constructor and assignment operator
103 
104 protected:
107 };
108 
109 /////////////////// CProjectItem inline methods
110 
111 /////////////////// end of CProjectItem inline methods
112 
113 END_objects_SCOPE // namespace ncbi::objects::
114 
116 
117 
118 #endif // OBJECTS_GBPROJ_PROJECTITEM_HPP
119 /* Original file checksum: lines: 86, chars: 2448, CRC32: f0ac93d */
Data storage class.
Definition: Date.hpp:53
CObject –.
Definition: ncbiobj.hpp:180
CProjectItem_Base –.
CProjectItem & operator=(const CProjectItem &value)
CProjectFolder * GetParentFolder()
Definition: ProjectItem.hpp:89
void RemoveTag(const string &tag)
Definition: ProjectItem.hpp:97
set< string > m_Tags
CRef< CObject > m_UserObject
CProjectItem_Base Tparent
Definition: ProjectItem.hpp:61
bool HasTag(const string &tag) const
Definition: ProjectItem.hpp:95
void AddTag(const string &tag)
Definition: ProjectItem.hpp:96
const CProjectFolder * GetParentFolder() const
Definition: ProjectItem.hpp:90
CProjectItem(const CProjectItem &value)
void SetParentFolder(CProjectFolder *)
Definition: ProjectItem.hpp:88
Base class for all serializable objects.
Definition: serialbase.hpp:150
CTime –.
Definition: ncbitime.hpp:296
#define NCBI_GBPROJ_EXPORT
Definition: gbproj_export.h:69
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
const char * tag
Defines: CTimeFormat - storage class for time format.
Modified on Fri Sep 20 14:57:45 2024 by modify_doxy.py rev. 669887