NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CGBProject Class Reference

Represents ASN.1 type GBProject defined in file gui_objects.asn

Search Toolkit Book for CGBProject

#include <gui/objects/GBProject.hpp>

+ Inheritance diagram for CGBProject:
+ Collaboration diagram for CGBProject:

Public Types

typedef CGuard< CGBProjectTGuard
 our RAII-based locking primitive More...
 
- Public Types inherited from CGBProject_Base
enum class  E_memberIndex {
  e__allMandatory = 0 , e_counter , e_descr , e_core ,
  e_extra , e_orig_message , e_history , e_data_plugin ,
  e_plugin_param , e_annot , e_loaders , e_views
}
 
typedef int TCounter
 
typedef CProjectDescr TDescr
 
typedef CProjectItem TCore
 
typedef CProjectFolder TExtra
 
typedef CPluginMessage TOrig_message
 
typedef list< CRef< CProjectHistoryItem > > THistory
 
typedef string TData_plugin
 
typedef string TPlugin_param
 
typedef list< CRef< CProjectAnnot > > TAnnot
 
typedef list< CRef< CLoaderDescriptor > > TLoaders
 
typedef list< CRef< CViewDescriptor > > TViews
 
typedef Tparent::CMemberIndex< E_memberIndex, 12 > TmemberIndex
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 
- Public Types inherited from IGBProject
enum  EProjectVersion { eVersion_Invalid = -1 , eVersion_Unknown = 0 , eVersion1 = 1 , eVersion2 = 2 }
 
typedef CProjectDescr TDescr
 
typedef CProjectFolder TData
 
typedef list< CRef< CProjectAnnot > > TAnnot
 
typedef list< CRef< CViewDescriptor > > TViews
 
typedef list< CRef< CLoaderDescriptor > > TDataLoaders
 
typedef list< CRef< CUser_object > > TViewSettings
 

Public Member Functions

 CGBProject (void)
 
 ~CGBProject (void)
 
Locking interface

Synchronization Policy – this object may be accessed from multiple threads, so synchronization is required.

Please use Lock() / Unlock() methods or CGuard class (preferred) to take ownership of the object. Methods of this class are NOT synchronized internally. When working with multiple objects lock the parent object first.

virtual void Lock ()
 
virtual void Unlock ()
 
IGBProject Implementation
EProjectVersion GetVersion () const
 retrieve this project's version; this is fixed per subclass More...
 
virtual void AddItem (CProjectItem &item, CProjectFolder &folder)
 Add an item to the current project. More...
 
const CProjectFolderGetData () const
 retrieve the folders containing our project items More...
 
CProjectFolderSetData ()
 
bool IsSetDescr () const
 retrieve the descriptor set for this project More...
 
const CProjectDescrGetDescr () const
 
CProjectDescrSetDescr ()
 
bool IsSetAnnot () const
 retrieve the descriptor set for this project More...
 
const IGBProject::TAnnotGetAnnot () const
 
IGBProject::TAnnotSetAnnot ()
 
virtual bool IsSetDataLoaders () const
 retrieve the data loader descriptor set for this project More...
 
virtual const TDataLoadersGetDataLoaders () const
 
virtual TDataLoadersSetDataLoaders ()
 
bool IsSetViews () const
 retrieve the view descriptor set for this project More...
 
const IGBProject::TViewsGetViews () const
 
IGBProject::TViewsSetViews ()
 
virtual bool IsSetViewSettings () const
 view-specific settings. More...
 
virtual const TViewSettingsGetViewSettings () const
 
virtual TViewSettingsSetViewSettings ()
 
virtual void SetScope (CScope *scope)
 scope manipulators More...
 
virtual CScopeGetScope ()
 
void SetCreateDate (const CDate &date)
 SetCreateDate() will add a descriptor for creation date. More...
 
void SetModifiedDate (const CDate &date)
 SetModifiedDate() will add a descriptor for the update date. More...
 
- Public Member Functions inherited from CGBProject_Base
 CGBProject_Base (void)
 
virtual ~CGBProject_Base (void)
 
 DECLARE_INTERNAL_TYPE_INFO ()
 
bool IsSetCounter (void) const
 next counter for project items Check if a value has been assigned to Counter data member. More...
 
bool CanGetCounter (void) const
 Check if it is safe to call GetCounter method. More...
 
void ResetCounter (void)
 Reset Counter data member. More...
 
void SetDefaultCounter (void)
 Assign default value to Counter data member. More...
 
TCounter GetCounter (void) const
 Get the Counter member data. More...
 
void SetCounter (TCounter value)
 Assign a value to Counter data member. More...
 
TCounterSetCounter (void)
 Assign a value to Counter data member. More...
 
bool IsSetDescr (void) const
 standard descriptors Check if a value has been assigned to Descr data member. More...
 
bool CanGetDescr (void) const
 Check if it is safe to call GetDescr method. More...
 
void ResetDescr (void)
 Reset Descr data member. More...
 
const TDescrGetDescr (void) const
 Get the Descr member data. More...
 
void SetDescr (TDescr &value)
 Assign a value to Descr data member. More...
 
TDescrSetDescr (void)
 Assign a value to Descr data member. More...
 
bool IsSetCore (void) const
 the core item we wrap Check if a value has been assigned to Core data member. More...
 
bool CanGetCore (void) const
 Check if it is safe to call GetCore method. More...
 
void ResetCore (void)
 Reset Core data member. More...
 
const TCoreGetCore (void) const
 Get the Core member data. More...
 
void SetCore (TCore &value)
 Assign a value to Core data member. More...
 
TCoreSetCore (void)
 Assign a value to Core data member. More...
 
bool IsSetExtra (void) const
 a set of extra analyses perfromed by the user each of these may have descriptors Check if a value has been assigned to Extra data member. More...
 
bool CanGetExtra (void) const
 Check if it is safe to call GetExtra method. More...
 
void ResetExtra (void)
 Reset Extra data member. More...
 
const TExtraGetExtra (void) const
 Get the Extra member data. More...
 
void SetExtra (TExtra &value)
 Assign a value to Extra data member. More...
 
TExtraSetExtra (void)
 Assign a value to Extra data member. More...
 
bool IsSetOrig_message (void) const
 a copy of the original plugin message used to generate this project Check if a value has been assigned to Orig_message data member. More...
 
bool CanGetOrig_message (void) const
 Check if it is safe to call GetOrig_message method. More...
 
void ResetOrig_message (void)
 Reset Orig_message data member. More...
 
const TOrig_messageGetOrig_message (void) const
 Get the Orig_message member data. More...
 
void SetOrig_message (TOrig_message &value)
 Assign a value to Orig_message data member. More...
 
TOrig_messageSetOrig_message (void)
 Assign a value to Orig_message data member. More...
 
bool IsSetHistory (void) const
 history of things done to this object Check if a value has been assigned to History data member. More...
 
bool CanGetHistory (void) const
 Check if it is safe to call GetHistory method. More...
 
void ResetHistory (void)
 Reset History data member. More...
 
const THistoryGetHistory (void) const
 Get the History member data. More...
 
THistorySetHistory (void)
 Assign a value to History data member. More...
 
bool IsSetData_plugin (void) const
 name of the plugin that can handle External Data for the project Check if a value has been assigned to Data_plugin data member. More...
 
bool CanGetData_plugin (void) const
 Check if it is safe to call GetData_plugin method. More...
 
void ResetData_plugin (void)
 Reset Data_plugin data member. More...
 
const TData_pluginGetData_plugin (void) const
 Get the Data_plugin member data. More...
 
void SetData_plugin (const TData_plugin &value)
 Assign a value to Data_plugin data member. More...
 
void SetData_plugin (TData_plugin &&value)
 
TData_pluginSetData_plugin (void)
 Assign a value to Data_plugin data member. More...
 
bool IsSetPlugin_param (void) const
 optional parameter for the data-plugin Check if a value has been assigned to Plugin_param data member. More...
 
bool CanGetPlugin_param (void) const
 Check if it is safe to call GetPlugin_param method. More...
 
void ResetPlugin_param (void)
 Reset Plugin_param data member. More...
 
const TPlugin_paramGetPlugin_param (void) const
 Get the Plugin_param member data. More...
 
void SetPlugin_param (const TPlugin_param &value)
 Assign a value to Plugin_param data member. More...
 
void SetPlugin_param (TPlugin_param &&value)
 
TPlugin_paramSetPlugin_param (void)
 Assign a value to Plugin_param data member. More...
 
bool IsSetAnnot (void) const
 arbitrary annotations Check if a value has been assigned to Annot data member. More...
 
bool CanGetAnnot (void) const
 Check if it is safe to call GetAnnot method. More...
 
void ResetAnnot (void)
 Reset Annot data member. More...
 
const TAnnotGetAnnot (void) const
 Get the Annot member data. More...
 
TAnnotSetAnnot (void)
 Assign a value to Annot data member. More...
 
bool IsSetLoaders (void) const
 a set of data sources including data loader and data Check if a value has been assigned to Loaders data member. More...
 
bool CanGetLoaders (void) const
 Check if it is safe to call GetLoaders method. More...
 
void ResetLoaders (void)
 Reset Loaders data member. More...
 
const TLoadersGetLoaders (void) const
 Get the Loaders member data. More...
 
TLoadersSetLoaders (void)
 Assign a value to Loaders data member. More...
 
bool IsSetViews (void) const
 
bool CanGetViews (void) const
 Check if it is safe to call GetViews method. More...
 
void ResetViews (void)
 Reset Views data member. More...
 
const TViewsGetViews (void) const
 Get the Views member data. More...
 
TViewsSetViews (void)
 Assign a value to Views data member. More...
 
virtual void Reset (void)
 Reset the whole object. More...
 
- Public Member Functions inherited from CSerialObject
 CSerialObject (void)
 
virtual ~CSerialObject (void)
 
virtual const CTypeInfoGetThisTypeInfo (void) const =0
 
virtual void Assign (const CSerialObject &source, ESerialRecursionMode how=eRecursive)
 Set object to copy of another one. More...
 
virtual bool Equals (const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
 Check if both objects contain the same values. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
void ThrowUnassigned (TMemberIndex index) const
 
void ThrowUnassigned (TMemberIndex index, const char *file_name, int file_line) const
 
bool HasNamespaceName (void) const
 Check if object data type has namespace name. More...
 
const stringGetNamespaceName (void) const
 Get namespace name. More...
 
bool HasNamespacePrefix (void) const
 Check if data type has namespace prefix. More...
 
const stringGetNamespacePrefix (void) const
 Get namespace prefix. More...
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 
- Public Member Functions inherited from IGBProject
virtual ~IGBProject ()
 

Protected Member Functions

CProjectFolderx_GetContainingFolder (CProjectFolder &root, CProjectItem &item)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Private Types

typedef CGBProject_Base Tparent
 

Private Member Functions

 CGBProject (const CGBProject &value)
 
CGBProjectoperator= (const CGBProject &value)
 

Private Attributes

CMutex m_Mutex
 mutex for controlling access to the current workspace More...
 
CRef< CProjectFolderm_Folders
 mutable project folder this is for compliance with the IGBProject interface More...
 
CRef< CScopem_Scope
 
TViewSettings m_View_settings
 fake var.should never be used More...
 

Additional Inherited Members

- Static Public Member Functions inherited from CSerialObject
static void SetVerifyDataThread (ESerialVerifyData verify)
 
static void SetVerifyDataGlobal (ESerialVerifyData verify)
 
static string UnassignedString (void)
 
static CStringUTF8 UnassignedStringUTF8 (void)
 
static char UnassignedByte (void)
 
- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Attributes inherited from CSerialObject
static const char * ms_UnassignedStr = "<*unassigned*>"
 
static const char ms_UnassignedByte = char(0xcd)
 
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 

Detailed Description

Definition at line 65 of file GBProject.hpp.

Member Typedef Documentation

◆ TGuard

our RAII-based locking primitive

Definition at line 72 of file GBProject.hpp.

◆ Tparent

Definition at line 69 of file GBProject.hpp.

Constructor & Destructor Documentation

◆ CGBProject() [1/2]

CGBProject::CGBProject ( void  )

◆ ~CGBProject()

CGBProject::~CGBProject ( void  )

Definition at line 155 of file GBProject.cpp.

◆ CGBProject() [2/2]

CGBProject::CGBProject ( const CGBProject value)
private

Member Function Documentation

◆ AddItem()

void CGBProject::AddItem ( CProjectItem item,
CProjectFolder folder 
)
virtual

Add an item to the current project.

Implements IGBProject.

Definition at line 303 of file GBProject.cpp.

References CProjectFolder::AddChildItem(), CGBProject_Base::GetCounter(), CGBProject_Base::SetCounter(), and CProjectItem_Base::SetId().

◆ GetAnnot()

const IGBProject::TAnnot & CGBProject::GetAnnot ( void  ) const
virtual

Implements IGBProject.

Definition at line 253 of file GBProject.cpp.

References CGBProject_Base::GetAnnot().

◆ GetData()

const CProjectFolder & CGBProject::GetData ( void  ) const
virtual

◆ GetDataLoaders()

const CGBProject::TDataLoaders & CGBProject::GetDataLoaders ( ) const
virtual

Implements IGBProject.

Definition at line 271 of file GBProject.cpp.

References CGBProject_Base::GetLoaders().

◆ GetDescr()

const CProjectDescr & CGBProject::GetDescr ( void  ) const
virtual

Implements IGBProject.

Definition at line 234 of file GBProject.cpp.

References CGBProject_Base::GetDescr().

Referenced by CGBProjectLabelHandler::GetLabel().

◆ GetScope()

CScope * CGBProject::GetScope ( void  )
virtual

Definition at line 179 of file GBProject.cpp.

References CRef< C, Locker >::GetPointer(), and m_Scope.

◆ GetVersion()

IGBProject::EProjectVersion CGBProject::GetVersion ( ) const
inlinevirtual

retrieve this project's version; this is fixed per subclass

Implements IGBProject.

Definition at line 157 of file GBProject.hpp.

References IGBProject::eVersion1.

◆ GetViews()

const IGBProject::TViews & CGBProject::GetViews ( void  ) const
virtual

Implements IGBProject.

Definition at line 290 of file GBProject.cpp.

References CGBProject_Base::GetViews().

◆ GetViewSettings()

virtual const TViewSettings& CGBProject::GetViewSettings ( ) const
inlinevirtual

Implements IGBProject.

Definition at line 118 of file GBProject.hpp.

References _ASSERT, and m_View_settings.

◆ IsSetAnnot()

bool CGBProject::IsSetAnnot ( void  ) const
virtual

retrieve the descriptor set for this project

Implements IGBProject.

Definition at line 247 of file GBProject.cpp.

References CGBProject_Base::IsSetAnnot().

◆ IsSetDataLoaders()

bool CGBProject::IsSetDataLoaders ( ) const
virtual

retrieve the data loader descriptor set for this project

Implements IGBProject.

Definition at line 265 of file GBProject.cpp.

References CGBProject_Base::IsSetLoaders().

◆ IsSetDescr()

bool CGBProject::IsSetDescr ( void  ) const
virtual

retrieve the descriptor set for this project

Implements IGBProject.

Definition at line 228 of file GBProject.cpp.

References CGBProject_Base::IsSetDescr().

Referenced by CGBProjectLabelHandler::GetLabel().

◆ IsSetViews()

bool CGBProject::IsSetViews ( void  ) const
virtual

retrieve the view descriptor set for this project

retrieve the descriptor set for this project

Implements IGBProject.

Definition at line 284 of file GBProject.cpp.

References CGBProject_Base::IsSetViews().

◆ IsSetViewSettings()

virtual bool CGBProject::IsSetViewSettings ( ) const
inlinevirtual

view-specific settings.

Implements IGBProject.

Definition at line 117 of file GBProject.hpp.

References _ASSERT.

◆ Lock()

void CGBProject::Lock ( void  )
virtual

Definition at line 160 of file GBProject.cpp.

References CMutex::Lock(), and m_Mutex.

◆ operator=()

CGBProject& CGBProject::operator= ( const CGBProject value)
private

◆ SetAnnot()

IGBProject::TAnnot & CGBProject::SetAnnot ( void  )
virtual

Implements IGBProject.

Definition at line 259 of file GBProject.cpp.

References CGBProject_Base::SetAnnot().

◆ SetCreateDate()

void CGBProject::SetCreateDate ( const CDate date)
virtual

SetCreateDate() will add a descriptor for creation date.

Implements IGBProject.

Definition at line 348 of file GBProject.cpp.

References CProjectDescr_Base::SetCreate_date(), and SetDescr().

◆ SetData()

CProjectFolder & CGBProject::SetData ( void  )
virtual

Implements IGBProject.

Definition at line 219 of file GBProject.cpp.

References GetData(), and m_Folders.

◆ SetDataLoaders()

CGBProject::TDataLoaders & CGBProject::SetDataLoaders ( )
virtual

Implements IGBProject.

Definition at line 277 of file GBProject.cpp.

References CGBProject_Base::SetLoaders().

◆ SetDescr()

CProjectDescr & CGBProject::SetDescr ( void  )
virtual

Implements IGBProject.

Definition at line 240 of file GBProject.cpp.

References CGBProject_Base::SetDescr().

Referenced by CGBProject(), SetCreateDate(), and SetModifiedDate().

◆ SetModifiedDate()

void CGBProject::SetModifiedDate ( const CDate date)
virtual

SetModifiedDate() will add a descriptor for the update date.

Implements IGBProject.

Definition at line 354 of file GBProject.cpp.

References SetDescr(), and CProjectDescr_Base::SetModified_date().

◆ SetScope()

void CGBProject::SetScope ( CScope scope)
virtual

scope manipulators

Definition at line 172 of file GBProject.cpp.

References _ASSERT, CRef< C, Locker >::GetPointer(), m_Scope, NULL, and CRef< C, Locker >::Reset().

◆ SetViews()

IGBProject::TViews & CGBProject::SetViews ( void  )
virtual

Implements IGBProject.

Definition at line 296 of file GBProject.cpp.

References CGBProject_Base::SetViews().

◆ SetViewSettings()

virtual TViewSettings& CGBProject::SetViewSettings ( )
inlinevirtual

Implements IGBProject.

Definition at line 119 of file GBProject.hpp.

References _ASSERT, and m_View_settings.

◆ Unlock()

void CGBProject::Unlock ( void  )
virtual

Definition at line 166 of file GBProject.cpp.

References m_Mutex, and CMutex::Unlock().

◆ x_GetContainingFolder()

CProjectFolder * CGBProject::x_GetContainingFolder ( CProjectFolder root,
CProjectItem item 
)
protected

Member Data Documentation

◆ m_Folders

CRef<CProjectFolder> CGBProject::m_Folders
mutableprivate

mutable project folder this is for compliance with the IGBProject interface

Definition at line 146 of file GBProject.hpp.

Referenced by GetData(), and SetData().

◆ m_Mutex

CMutex CGBProject::m_Mutex
private

mutex for controlling access to the current workspace

Definition at line 142 of file GBProject.hpp.

Referenced by Lock(), and Unlock().

◆ m_Scope

CRef<CScope> CGBProject::m_Scope
private

Definition at line 149 of file GBProject.hpp.

Referenced by GetScope(), and SetScope().

◆ m_View_settings

TViewSettings CGBProject::m_View_settings
private

fake var.should never be used

Definition at line 150 of file GBProject.hpp.

Referenced by GetViewSettings(), and SetViewSettings().


The documentation for this class was generated from the following files:
Modified on Wed Apr 24 14:18:00 2024 by modify_doxy.py rev. 669887