1 /* $Id: ProjectItem.hpp 440743 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> 45 #include <objects/gbproj/ProjectItem_.hpp> 46 47 #include <set> 48 49 // generated classes 50 51 BEGIN_NCBI_SCOPE 52 53 BEGIN_objects_SCOPE // namespace ncbi::objects:: 54 55 class CDate; 56 class CProjectFolder; 57 58 ///////////////////////////////////////////////////////////////////////////// 59 class NCBI_GBPROJ_EXPORT CProjectItem : public CProjectItem_Base 60 { 61 typedef CProjectItem_Base Tparent; 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 SetParentFolder(CProjectFolder *)88 void SetParentFolder(CProjectFolder*) {} GetParentFolder()89 CProjectFolder* GetParentFolder() { return 0; } GetParentFolder() const90 const CProjectFolder* GetParentFolder() const { return 0; } 91 92 void SetUserObject(CObject* object); 93 CObject* GetUserObject(); 94 HasTag(const string & tag) const95 bool HasTag(const string& tag) const { return (m_Tags.find(tag) != m_Tags.end()); } AddTag(const string & tag)96 void AddTag(const string& tag) { m_Tags.insert(tag); } RemoveTag(const string & tag)97 void RemoveTag(const string& tag) { m_Tags.erase(tag); } 98 99 private: 100 // Prohibit copy constructor and assignment operator 101 CProjectItem(const CProjectItem& value); 102 CProjectItem& operator=(const CProjectItem& value); 103 104 protected: 105 CRef<CObject> m_UserObject; 106 set<string> m_Tags; 107 }; 108 109 /////////////////// CProjectItem inline methods 110 111 /////////////////// end of CProjectItem inline methods 112 113 END_objects_SCOPE // namespace ncbi::objects:: 114 115 END_NCBI_SCOPE 116 117 118 #endif // OBJECTS_GBPROJ_PROJECTITEM_HPP 119 /* Original file checksum: lines: 86, chars: 2448, CRC32: f0ac93d */ 120