1 #ifndef OBJECTS_GBPROJ__IGBPROJECT_HPP 2 #define OBJECTS_GBPROJ__IGBPROJECT_HPP 3 4 /* $Id: igbproject.hpp 410943 2013-08-22 20:54:31Z rafanovi $ 5 * =========================================================================== 6 * 7 * PUBLIC DOMAIN NOTICE 8 * National Center for Biotechnology Information 9 * 10 * This software/database is a "United States Government Work" under the 11 * terms of the United States Copyright Act. It was written as part of 12 * the author's official duties as a United States Government employee and 13 * thus cannot be copyrighted. This software/database is freely available 14 * to the public for use. The National Library of Medicine and the U.S. 15 * Government have not placed any restriction on its use or reproduction. 16 * 17 * Although all reasonable efforts have been taken to ensure the accuracy 18 * and reliability of the software and data, the NLM and the U.S. 19 * Government do not and cannot warrant the performance or results that 20 * may be obtained by using this software or data. The NLM and the U.S. 21 * Government disclaim all warranties, express or implied, including 22 * warranties of performance, merchantability or fitness for any particular 23 * purpose. 24 * 25 * Please cite the author in any work or product based on this material. 26 * 27 * =========================================================================== 28 * 29 * Authors: Mike DiCuccio, Vladimir Tereshkov, Liangshou Wu 30 * 31 * File Description: 32 * 33 */ 34 35 #include <corelib/ncbitime.hpp> 36 37 BEGIN_NCBI_SCOPE 38 BEGIN_SCOPE(objects) 39 40 41 class CProjectDescr; 42 class CProjectAnnot; 43 class CProjectFolder; 44 class CProjectItem; 45 class CProjectHistoryItem; 46 class CDate; 47 class CViewDescriptor; 48 class CLoaderDescriptor; 49 class CUser_object; 50 51 //class CScope; 52 53 54 /////////////////////////////////////////////////////////////////////////////// 55 /// IGBProject - abstract interface for a project used by CGBProjectHandle. 56 class IGBProject 57 { 58 public: 59 enum EProjectVersion { 60 eVersion_Invalid = -1, 61 eVersion_Unknown = 0, 62 eVersion1 = 1, 63 eVersion2 = 2 64 }; 65 66 typedef CProjectDescr TDescr; 67 typedef CProjectFolder TData; 68 typedef list< CRef< CProjectAnnot > > TAnnot; 69 typedef list< CRef< CViewDescriptor > > TViews; 70 typedef list< CRef< CLoaderDescriptor > > TDataLoaders; 71 typedef list< CRef< CUser_object > > TViewSettings; 72 73 ~IGBProject()74 virtual ~IGBProject() {} 75 76 /// retrieve this project's version; this is fixed per subclass 77 virtual EProjectVersion GetVersion() const = 0; 78 79 /// Add an item to the current project 80 virtual void AddItem(CProjectItem& item, CProjectFolder& folder) = 0; 81 82 /// retrieve our project's data, in the form of a project folder 83 /// this may be a contrived entity, and it is up to a project to determine 84 /// what parts belong where 85 virtual const CProjectFolder& GetData() const = 0; 86 virtual CProjectFolder& SetData() = 0; 87 88 /// retrieve our project's descriptor set 89 virtual bool IsSetDescr() const = 0; 90 virtual const CProjectDescr& GetDescr() const = 0; 91 virtual CProjectDescr& SetDescr() = 0; 92 93 /// retrieve a set of annotations for this project 94 virtual bool IsSetAnnot() const = 0; 95 virtual const TAnnot& GetAnnot() const = 0; 96 virtual TAnnot& SetAnnot() = 0; 97 98 /// SetCreateDate() will add a descriptor for creation date 99 virtual void SetCreateDate(const CDate& date) = 0; 100 101 /// SetModifiedDate() will add a descriptor for the update date 102 virtual void SetModifiedDate(const CDate& date) = 0; 103 104 /// data loader info. 105 virtual bool IsSetDataLoaders() const = 0; 106 virtual const TDataLoaders& GetDataLoaders() const = 0; 107 virtual TDataLoaders& SetDataLoaders() = 0; 108 109 /// view info 110 virtual bool IsSetViews() const = 0; 111 virtual const TViews& GetViews() const = 0; 112 virtual TViews& SetViews() = 0; 113 114 /// view-specific settings. 115 virtual bool IsSetViewSettings() const = 0; 116 virtual const TViewSettings& GetViewSettings() const = 0; 117 virtual TViewSettings& SetViewSettings() = 0; 118 }; 119 120 121 END_SCOPE(objects) 122 END_NCBI_SCOPE 123 124 #endif // OBJECTS_GBPROJ__IGBPROJECT_HPP 125