1 #ifndef GUI_CORE___DOCUMENT__HPP
2 #define GUI_CORE___DOCUMENT__HPP
45 #include <wx/string.h>
82 , m_Subtype( subtype )
84 , m_ProjectId( prj_id )
91 , m_Subtype( subtype )
97 objects::CGBProjectHandle::TId
GetProjectId() {
return m_ProjectId; }
110 :
public objects::CGBProjectHandle
116 friend class CProjectLoadingJob;
119 friend class CSmartProjectTask;
131 typedef vector< CIRef<IProjectView> >
TViews;
150 wxString GetFileName()
const;
151 void SetFileName (
const wxString& filename);
153 virtual void CreateProjectScope();
156 string GetDefaultAssembly()
const;
161 bool IsLoading()
const;
162 void CancelLoading();
165 bool RemoveProjectItem(objects::CProjectItem* item);
166 bool RemoveProjectItems(
const vector<objects::CProjectItem*>& items);
168 void AttachProjectItem(objects::CProjectItem* item);
169 void DetachProjectItem(objects::CProjectItem* item);
171 void AttachProjectItems(
const vector<objects::CProjectItem*>& items);
172 void DetachProjectItems(
const vector<objects::CProjectItem*>& items);
174 void Save(
const wxString& abs_path);
176 void UnloadProject(
bool reset_hist_async =
true);
178 virtual const TViews& GetViews(
void)
const;
180 bool RemoveDataLoader(objects::CLoaderDescriptor& loader);
181 bool AttachDataLoader(objects::CLoaderDescriptor& loader);
182 bool DetachDataLoader(objects::CLoaderDescriptor& loader);
184 void ProjectItemsChanged();
185 void ProjectStateChanged();
195 wxString GetWorkDir()
const;
200 TViews& x_GetViews(
void);
201 void x_RemoveAllViews(
bool reset_hist_async);
211 void x_SaveFile(
const wxString& fname,
ESerialDataFormat fmt,
bool keep_backups);
214 IAppJob* CreateLoadJob(
const wxString& fileName);
219 void AddItems(
const string& folderName,
223 void ReplaceGiSeqIds(
ICanceled* canceled);
230 void x_AttachDataLoaders();
231 void x_AttachProjectItems();
232 void x_ProjectViewsChanged();
233 void x_ProjectUpdateLabel();
235 void x_AddItems(
const string& folderName,
239 void x_DetachDataLoaders();
241 void x_DetachProjectItems();
243 void x_CloseProjectItemViews(objects::CProjectItem& item);
249 static size_t x_GetUndoSize();
268 void x_InitializeAssembly()
const;
269 void x_ClearAssembly()
const;
User-defined methods of the data storage class.
User-defined methods of the data storage class.
CDataLoadingAppJob - a base class for Jobs loading data into projects.
CGBDocument & operator=(const CGBDocument &value)
CIRef< IAppJob > m_LoadJob
TViewToIndex m_ViewToIndex
CGBDocument(const CGBDocument &value)
CGBDocument(CProjectService *srv, TId id, objects::CGBProject_ver2 &proj_impl)
bool x_DetachProjectItems(const vector< objects::CProjectItem * > &items)
CUndoManager & GetUndoManager()
CRef< objects::CLoaderDescriptor > TLoaderRef
CProjectService * m_Service
pointer to the service that manages the document
ELabelType
Retrieve a label for this view. The label has several different.
map< IProjectView *, int > TViewToIndex
map of views to indices for views
vector< TLoaderRef > TLoaders
vector< CIRef< IProjectView > > TViews
bool m_AssemblyInitialized
objects::CGBProjectHandle Tparent
TViews m_Views
Views attached to this project.
CRef< CUndoManager > m_UndoManager
undo manager, project data centric
string m_AssemblyAccession
list< CRef< CJobAdapter > > m_JobAdapters
CProjectService - a service providing API for operations with Workspaces and Projects.
CProjectTreePanel - a window that represents Project View.
CProjectViewBase - default implementation of IProjectView, the base class for CProjectView and CProje...
objects::CGBProjectHandle::TId GetProjectId()
CProjectViewEvent(IProjectView &view, CViewEvent::EEventType type, EEventSubtype subtype=eNone)
CIRef< IProjectView > GetProjectView()
EEventSubtype GetSubtype() const
CIRef< IProjectView > m_View
objects::CGBProjectHandle::TId m_ProjectId
CProjectViewEvent(objects::CGBProjectHandle::TId prj_id, EEventSubtype subtype=eNone)
CProjectSelectOptions - describes how new Project Items shall be added to a workspace.
Interface for testing cancellation request in a long lasting operation.
IDataLoaderProvider - an interface representing a Data Source.
class IProjectView defines the abstract interface for views observing projects.
virtual void OnJobResult(CObject *result, CJobAdapter &adapter)=0
virtual void OnJobFailed(const string &errMsg, CJobAdapter &adapter)=0
ESerialDataFormat
Data file format.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
#define NCBI_GUICORE_EXPORT
static string LoadFile(CNcbiIstream &str)
const GenericPointer< typename T::ValueType > T2 value