CGBDocument Class Reference

Search Toolkit Book for CGBDocument

#include <document.hpp>

Inheritance diagram for CGBDocument:

Inheritance graph
[legend]
Collaboration diagram for CGBDocument:

Collaboration graph
[legend]
List of all members.

Detailed Description

CGBDocument.

Definition at line 95 of file document.hpp.

Public Types

typedef vector< CIRef< IProjectView > > TViews
typedef CProjectViewEvent TEvent
typedef CVisibleRangeEvent TVisibleRangeEvent
typedef objects::CGBProjectHandle::TId TProjectId
enum  ELabelType {
  eType, eContent, eTypeAndContent, eId,
  eProject, eDefault = eTypeAndContent
}
 Retrieve a label for this view. The label has several different. More...

Public Member Functions

 ~CGBDocument ()
virtual void CreateProjectScope ()
IUndoManagerGetUndoManager ()
 unlock updates - decrement the lock counter, flush updates if it is 0

Protected Member Functions

 CGBDocument (CProjectService *srv)
 protect constructors - only friend classes will access them
 CGBDocument (CProjectService *srv, TId id, objects::CGBProject &proj_impl)
 CGBDocument (CProjectService *srv, TId id, objects::CGBProject_ver2 &proj_impl)
 CGBDocument (CProjectService *srv, const string &filename)
virtual void x_AttachView (IProjectView *view)
 Attach a view to the current document.
virtual void x_DetachView (IProjectView *view)
 detach a view from the current document
virtual const TViewsx_GetViews (void) const
 Retrieve the existing views for this class.
virtual TViewsx_GetViews (void)
virtual void x_OnProjectChanged (TEvent::EEventSubtype subtype=TEvent::eNone)
virtual void x_FireViewEvent (IProjectView &view, CViewEvent::EEventType type)
void x_AssignViewIndex (IProjectView *view)
virtual void x_DetachAllViews ()

Private Types

typedef objects::CGBProjectHandle Tparent
typedef map< IProjectView *,
int > 
TViewToIndex
 map of views to indices for views

Private Member Functions

 CGBDocument (const CGBDocument &value)
CGBDocumentoperator= (const CGBDocument &value)

Private Attributes

TViews m_Views
 Views attached to this project.
CProjectServicem_Service
 pointer to the service that manages the document
CMutex m_UpdateMutex
 Update management.
int m_UpdateLockCounter
 guards update lock counter
bool m_StateChanged
 indicates whether state has changed since updates have been blocked
TViewToIndex m_ViewToIndex
CUndoManager m_UndoManager
 undo manager, project data centric

Friends

class CProjectService
class CWorkspaceConstPrx
class CWorkspacePrx
class CProjectConstPrx
class CProjectPrx


Member Typedef Documentation

typedef CProjectViewEvent CGBDocument::TEvent
 

Definition at line 110 of file document.hpp.

typedef objects::CGBProjectHandle CGBDocument::Tparent [private]
 

Definition at line 105 of file document.hpp.

typedef objects::CGBProjectHandle::TId CGBDocument::TProjectId
 

Definition at line 112 of file document.hpp.

typedef vector< CIRef<IProjectView> > CGBDocument::TViews
 

Definition at line 108 of file document.hpp.

typedef map<IProjectView*, int> CGBDocument::TViewToIndex [private]
 

map of views to indices for views

Definition at line 180 of file document.hpp.

typedef CVisibleRangeEvent CGBDocument::TVisibleRangeEvent
 

Definition at line 111 of file document.hpp.


Member Enumeration Documentation

enum CGBDocument::ELabelType
 

Retrieve a label for this view. The label has several different.

Enumerator:
eType 
eContent 
eTypeAndContent 
eId 
eProject 
eDefault 

Definition at line 115 of file document.hpp.


Constructor & Destructor Documentation

CGBDocument::~CGBDocument  ) 
 

Definition at line 120 of file document.cpp.

References LOG_POST.

CGBDocument::CGBDocument CProjectService srv  )  [protected]
 

protect constructors - only friend classes will access them

Definition at line 82 of file document.cpp.

References LOG_POST, and m_Id.

CGBDocument::CGBDocument CProjectService srv,
TId  id,
objects::CGBProject &  proj_impl
[protected]
 

CGBDocument::CGBDocument CProjectService srv,
TId  id,
objects::CGBProject_ver2 &  proj_impl
[protected]
 

CGBDocument::CGBDocument CProjectService srv,
const string &  filename
[protected]
 

Definition at line 111 of file document.cpp.

References LOG_POST.

CGBDocument::CGBDocument const CGBDocument value  )  [private]
 


Member Function Documentation

void CGBDocument::CreateProjectScope  )  [virtual]
 

Definition at line 126 of file document.cpp.

References _ASSERT, CObjectManager::GetInstance(), CRef< C, Locker >::GetPointer(), and LOG_POST.

IUndoManager& CGBDocument::GetUndoManager  )  [inline]
 

unlock updates - decrement the lock counter, flush updates if it is 0

Definition at line 135 of file document.hpp.

References m_UndoManager.

CGBDocument& CGBDocument::operator= const CGBDocument value  )  [private]
 

void CGBDocument::x_AssignViewIndex IProjectView view  )  [protected]
 

Definition at line 231 of file document.cpp.

References _ASSERT, IWMClient::GetClientLabel(), ITERATE, and m_ViewToIndex.

Referenced by x_AttachView().

void CGBDocument::x_AttachView IProjectView view  )  [protected, virtual]
 

Attach a view to the current document.

Definition at line 186 of file document.cpp.

References _ASSERT, CEventHandler::AddListener(), CViewEvent::eViewCreated, handler(), m_Views, x_AssignViewIndex(), and x_FireViewEvent().

void CGBDocument::x_DetachAllViews  )  [protected, virtual]
 

Definition at line 260 of file document.cpp.

References map_checker< Container >::clear(), CViewEvent::eViewReleased, m_Views, m_ViewToIndex, NON_CONST_ITERATE, CEventHandler::RemoveListener(), and x_FireViewEvent().

void CGBDocument::x_DetachView IProjectView view  )  [protected, virtual]
 

detach a view from the current document

Definition at line 208 of file document.cpp.

References _ASSERT, map_checker< Container >::erase(), CViewEvent::eViewReleased, handler(), m_Views, m_ViewToIndex, CEventHandler::RemoveListener(), and x_FireViewEvent().

void CGBDocument::x_FireViewEvent IProjectView view,
CViewEvent::EEventType  type
[protected, virtual]
 

Definition at line 308 of file document.cpp.

References CEventHandler::Send().

Referenced by x_AttachView(), x_DetachAllViews(), and x_DetachView().

CGBDocument::TViews & CGBDocument::x_GetViews void   )  [protected, virtual]
 

Definition at line 254 of file document.cpp.

References m_Views.

const CGBDocument::TViews & CGBDocument::x_GetViews void   )  const [protected, virtual]
 

Retrieve the existing views for this class.

Definition at line 248 of file document.cpp.

References m_Views.

virtual void CGBDocument::x_OnProjectChanged TEvent::EEventSubtype  subtype = TEvent::eNone  )  [protected, virtual]
 


Friends And Related Function Documentation

friend class CProjectConstPrx [friend]
 

Definition at line 102 of file document.hpp.

friend class CProjectPrx [friend]
 

Definition at line 103 of file document.hpp.

friend class CProjectService [friend]
 

Definition at line 99 of file document.hpp.

friend class CWorkspaceConstPrx [friend]
 

Definition at line 100 of file document.hpp.

friend class CWorkspacePrx [friend]
 

Definition at line 101 of file document.hpp.


Member Data Documentation

CProjectService* CGBDocument::m_Service [private]
 

pointer to the service that manages the document

Definition at line 170 of file document.hpp.

bool CGBDocument::m_StateChanged [private]
 

indicates whether state has changed since updates have been blocked

Definition at line 177 of file document.hpp.

CUndoManager CGBDocument::m_UndoManager [private]
 

undo manager, project data centric

Definition at line 184 of file document.hpp.

Referenced by GetUndoManager().

int CGBDocument::m_UpdateLockCounter [private]
 

guards update lock counter

Definition at line 174 of file document.hpp.

CMutex CGBDocument::m_UpdateMutex [private]
 

Update management.

Definition at line 173 of file document.hpp.

TViews CGBDocument::m_Views [private]
 

Views attached to this project.

Definition at line 167 of file document.hpp.

Referenced by x_AttachView(), x_DetachAllViews(), x_DetachView(), and x_GetViews().

TViewToIndex CGBDocument::m_ViewToIndex [private]
 

Definition at line 181 of file document.hpp.

Referenced by x_AssignViewIndex(), x_DetachAllViews(), and x_DetachView().


The documentation for this class was generated from the following files:
Generated on Wed Dec 9 07:55:51 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Wed Dec 09 08:19:14 2009 by modify_doxy.py rev. 173732