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

Go to the SVN repository for this file.

1 #ifndef OBJECTS_GBPROJ__IGBPROJECT_HPP
2 #define OBJECTS_GBPROJ__IGBPROJECT_HPP
3 
4 /* $Id: igbproject.hpp 59444 2013-08-26 17:38:09Z 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 
39 
40 
41 class CProjectDescr;
42 class CProjectAnnot;
43 class CProjectFolder;
44 class CProjectItem;
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.
57 {
58 public:
62  eVersion1 = 1,
63  eVersion2 = 2
64  };
65 
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 
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;
118 };
119 
120 
123 
124 #endif // OBJECTS_GBPROJ__IGBPROJECT_HPP
Definition: Date.hpp:53
CLoaderDescriptor –.
CProjectAnnot –.
CProjectHistoryItem –.
CViewDescriptor –.
IGBProject - abstract interface for a project used by CGBProjectHandle.
Definition: igbproject.hpp:57
virtual bool IsSetAnnot() const =0
retrieve a set of annotations for this project
virtual void SetModifiedDate(const CDate &date)=0
SetModifiedDate() will add a descriptor for the update date.
list< CRef< CLoaderDescriptor > > TDataLoaders
Definition: igbproject.hpp:70
virtual const CProjectDescr & GetDescr() const =0
virtual void AddItem(CProjectItem &item, CProjectFolder &folder)=0
Add an item to the current project.
virtual TDataLoaders & SetDataLoaders()=0
virtual TAnnot & SetAnnot()=0
virtual bool IsSetDataLoaders() const =0
data loader info.
virtual const TViews & GetViews() const =0
virtual TViews & SetViews()=0
virtual bool IsSetDescr() const =0
retrieve our project's descriptor set
virtual CProjectDescr & SetDescr()=0
virtual const TViewSettings & GetViewSettings() const =0
virtual const TAnnot & GetAnnot() const =0
virtual const TDataLoaders & GetDataLoaders() const =0
CProjectDescr TDescr
Definition: igbproject.hpp:66
@ eVersion_Invalid
Definition: igbproject.hpp:60
@ eVersion_Unknown
Definition: igbproject.hpp:61
virtual CProjectFolder & SetData()=0
virtual void SetCreateDate(const CDate &date)=0
SetCreateDate() will add a descriptor for creation date.
virtual TViewSettings & SetViewSettings()=0
list< CRef< CViewDescriptor > > TViews
Definition: igbproject.hpp:69
virtual bool IsSetViewSettings() const =0
view-specific settings.
virtual ~IGBProject()
Definition: igbproject.hpp:74
CProjectFolder TData
Definition: igbproject.hpp:67
virtual bool IsSetViews() const =0
view info
virtual EProjectVersion GetVersion() const =0
retrieve this project's version; this is fixed per subclass
list< CRef< CUser_object > > TViewSettings
Definition: igbproject.hpp:71
virtual const CProjectFolder & GetData() const =0
retrieve our project's data, in the form of a project folder this may be a contrived entity,...
list< CRef< CProjectAnnot > > TAnnot
Definition: igbproject.hpp:68
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
Defines: CTimeFormat - storage class for time format.
Modified on Fri Sep 20 14:57:34 2024 by modify_doxy.py rev. 669887