NCBI C++ ToolKit
|
Search Toolkit Book for CCmdComposite
#include <gui/objutils/cmd_composite.hpp>
Public Member Functions | |
CCmdComposite (const string &label) | |
void | AddCommand (IEditCommand &command) |
bool | IsEmpty () |
IEditCommand interface implementation | |
virtual void | Execute () |
Do the editing action. More... | |
virtual void | Unexecute () |
Undo (opposite to Execute()) More... | |
virtual string | GetLabel () |
Public Member Functions inherited from CObject | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (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... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. 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 IEditCommand | |
virtual | ~IEditCommand () |
virtual bool | CanMerge (IEditCommand *) |
virtual void | Merge (IEditCommand *) |
virtual | ~IEditCommand () |
virtual void | Do (IScopeTransaction_Impl &)=0 |
virtual void | Undo ()=0 |
Private Types | |
typedef list< CIRef< IEditCommand > > | TCmdList |
Private Attributes | |
string | m_Label |
TCmdList | m_CmdList |
Additional Inherited Members | |
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< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
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 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... | |
Protected Member Functions inherited from CObject | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Definition at line 42 of file cmd_composite.hpp.
|
private |
Definition at line 60 of file cmd_composite.hpp.
Definition at line 46 of file cmd_composite.hpp.
void CCmdComposite::AddCommand | ( | IEditCommand & | command | ) |
Definition at line 36 of file cmd_composite.cpp.
References command, and m_CmdList.
Referenced by add_to_cmd(), CAddStructuredCommentKeyword::add_to_existing_genbank(), CApplyRNAITSDlg::AddFeatures(), AddModToDefline(), AddModVectorToDefline(), CLabelRna::AddNewMrnaCommand(), AddOrgToDefline(), CImportFeatTable::AddSeqAnnotToSeqEntry(), CEditSequence::AdjustFeatureLocations(), CSequenceEditingEventHandler::AdjustForConsensusSpliceSites(), CTruncateCDS::AdjustMolinfo(), CEditSequence::AdjustProtFeatureLocations(), CSplitCDSwithTooManyXs::AdjustSingleCDS(), AdjustSingleFeature(), CFuseJoinsInLocs::apply(), CPackageFeaturesOnParts::apply(), CClearNomenclature::apply(), CFixProductNames::apply(), CAdjustFeatsForIntrons::apply(), CConvertRptUnitRangeToLoc::apply(), CRemAllProtTitles::apply(), CRemProtTitles::apply(), CTrimN::apply(), CGroupExplode::apply(), CExpandGaps::apply(), CExplodeRNAFeats::apply(), CMergeBiosources::apply(), CAddFluComments::Apply(), CRemoveUnnecessaryExceptions::apply(), CReassignFeatureId::apply(), CUniqifyFeatureId::apply(), CConvertSelectedGaps::apply_impl(), CEditSelectedGaps::apply_impl(), CCombineAdjacentGaps::apply_impl(), CRawSeqToDeltaSeqByLoc::apply_impl(), CRmvCddFeatDbxref::apply_to(), CRemoveGenomeProjectsDB::apply_to_seq_and_feat(), CRemoveStructuredComment::apply_to_seq_and_feat(), CAppendModToOrg::apply_to_seq_and_feat(), CModifyStructuredComment::apply_to_seq_and_feat(), CConvertComment::ApplyToComment(), CSetGlobalRefGeneStatus::ApplyToCSeq_entry(), CClearKeywords::ApplyToCSeq_entry(), CRemoveBankitComment::ApplyToCSeq_entry(), CRemoveGenomeProjectsDB::ApplyToCSeq_entry(), CRemoveStructuredComment::ApplyToCSeq_entry(), CRemoveSeqAnnot::ApplyToCSeq_entry(), CApplyIndexerComments::ApplyToCSeq_entry(), CRemoveSeqFromAlignDlg::ApplyToCSeq_entry(), CRemoveFeaturesDlg::ApplyToCSeq_entry(), CConvertComment::ApplyToCSeq_entry(), CAddCitSubForUpdate::ApplyToCSeq_entry(), CModifyStructuredComment::ApplyToCSeq_entry(), CRemoveUnverified::ApplyToCSeq_entry(), CCorrectIntervalOrder::ApplyToCSeq_entry(), CRemoveStructuredCommentKeyword::ApplyToCSeq_entry_genbank(), CAddStructuredCommentKeyword::ApplyToCSeq_entry_genbank(), CMolInfoEditDlg::ApplyToInst(), CMolInfoEditDlg::ApplyToMolInfo(), CReverseAuthorNames::ApplyToPubdesc(), CAssignFeatureId::AssignHighestFeatureId(), BOOST_AUTO_TEST_CASE(), CRawSeqToDeltaSeqByLoc::ByAssemblyGapFeatures_impl(), CClearFeatureId::ClearFeatureIds(), ConvertRawToDeltaByNsCommand_impl(), ConvertRawToDeltaByNsHugeFileCmd_impl(), CMolInfoEditDlg::CreateNewMolInfo(), CCmdFactory::DeleteGeneXRefs(), CRawSeqToDeltaByN::DeltaSeqToRaw(), CRemoveXrefs< T >::FindBioSource(), CAuthorReplacePanel::GetCommand(), CAddLinkageToGaps::GetCommand(), CUnculTaxTool::GetCommandFromValuesTable(), GetDeleteAllFeaturesCommand(), CRemoveXrefs< T >::GetDesc(), CEditObjectSeq_desc::GetEditCommand(), CEditObjectSeq_feat::GetEditCommand(), CBulkCDS::GetUpdateMRNAProductNameCmd(), CmRNACDSLinker::LinkByLabel(), CmRNACDSLinker::LinkByLabelAndLocation(), CmRNACDSLinker::LinkByOverlap(), CmRNACDSLinker::LinkByProduct(), CEditSequence::OnAccept(), CSuspectProductRulesEditor::OnApplyFixes(), CCompareWithBiosample::OnClickOk(), CBioseqEditor::OnDeleteSelection(), CAuthorNamesPanel::OnReplaceAllAuthors(), CAuthorNamesPanel::OnReplaceSameAuthors(), CUpdateMultiSeq_Dlg::OnUpdateAllSequenceClick(), CUpdateMultiSeq_Dlg::OnUpdateThisSequenceClick(), PropagateToTarget(), RemapOtherProtFeats(), CSubPrep_panel::RemoveAllFeatures(), CCmdFactory::RemoveCitations(), RemoveTitlesSeqEntry(), CReorderStructuredComment::reorder_comment_by_rule(), IMacroBioDataIter::RunCommand(), CMacroBioData_FeatIterBase::RunDeleteCommand(), CMacroBioData_BioSourceIter::RunDeleteCommand(), CMacroBioData_PubdescIter::RunDeleteCommand(), CMacroBioData_SeqdescIter::RunDeleteCommand(), CMacroBioData_MolInfoIter::RunDeleteCommand(), CMacroBioData_UserObjectIter::RunDeleteCommand(), CMacroBioData_SeqAlignIter::RunDeleteCommand(), CMacroBioData_SeqIter::RunDeleteCommand(), CMacroBioData_SeqSetIter::RunDeleteCommand(), CMacroBioData_FeatIterBase::RunEditCommand(), CMacroBioData_BioSourceIter::RunEditCommand(), CMacroBioData_PubdescIter::RunEditCommand(), CMacroBioData_SeqdescIter::RunEditCommand(), CMacroBioData_MolInfoIter::RunEditCommand(), CMacroBioData_UserObjectIter::RunEditCommand(), CMacroBioData_SeqAlignIter::RunEditCommand(), CMacroBioData_SeqIter::RunEditCommand(), CMacroBioData_SeqSetIter::RunEditCommand(), CMacroBioData_TSEntryIter::RunEditCommand(), CTableReaderMacro::RunMacro(), CMacroFunction_Autodef::s_AddAutodefOptions(), s_AddCommand(), CMacroFunction_Autodef::s_AutodefBioseqs(), CMacroFunction_Autodef::s_AutodefBioseqsNoTitle(), CMacroFunction_Autodef::s_AutodefSets(), CMacroFunction_Autodef::s_AutodefSetsNoTitle(), CMacroFunction_DeltaSeqToRaw::s_ConvertDeltaToRaw(), CMacroFunction_TrimTerminalNs::TheFunction(), CMacroFunction_UpdateProteinSeqs::TheFunction(), CMacroFunction_RemoveAllFeatures::TheFunction(), CSequenceUpdater::Update(), CRawSeqToDeltaSeqByLoc::UpdateDensegAlignment(), UpdateDensegAlignment(), UpdateOneDefLine(), CMiscSeqTable::x_ApplyMiscSeqTableToSeqEntry(), CMiscSeqTable::x_ApplyRowToEntry(), CAppendModToOrg::x_ApplyToDescriptors(), CApplyGCode::x_ApplyToDescriptors(), CCountryConflict::x_ApplyToDescriptors(), CCountryFixup::x_ApplyToDescriptors(), CLatLonTool::x_ApplyToDescriptors(), IModifyBiosourceQuals::x_ApplyToDescriptors(), IPubDescEditor::x_ApplyToDescriptors(), IRemovePubs::x_ApplyToDescriptors(), CRemoveUnreviewed::x_ApplyToSeq_entry(), CRemoveDescDlg::x_ApplyToSeq_entry(), CCountryFixup::x_ApplyToSeqAndFeat(), IModifyBiosourceQuals::x_ApplyToSeqAndFeat(), IPubDescEditor::x_ApplyToSeqAndFeat(), IRemovePubs::x_ApplyToSeqAndFeat(), IAuthorEditor::x_ApplyToSeqSubmit(), CMRnaForCDS::x_ChkAndMakeMRna(), CCmdConvertToDelayedGenProdSetQuals::x_CreateActionCmd(), CCmdMoveCdsToSetLevel::x_CreateActionCmd(), CBioseqEditor::x_DeleteObject(), CApplyGCode::x_FindBioSource(), CCountryConflict::x_FindBioSource(), CLatLonTool::x_FindBioSource(), CImportFeatTable::x_GatherAdditionalChanges(), CBioseqEditor::x_GetDeleteCommand(), CEditObjectSeq_feat::x_HandleCdsProduct(), CMacroWorker::x_HandleOutput(), CStrainSerotypeInfluenza::x_ParseDescriptors(), and CStrainSerotypeInfluenza::x_ParseEntry().
|
virtual |
Do the editing action.
Implements IEditCommand.
Reimplemented in CMacroCmdComposite.
Definition at line 46 of file cmd_composite.cpp.
References m_CmdList.
Referenced by CConvertSelectedGaps::apply_impl(), CEditSelectedGaps::apply_impl(), CCombineAdjacentGaps::apply_impl(), CRawSeqToDeltaSeqByLoc::apply_impl(), BOOST_AUTO_TEST_CASE(), CRawSeqToDeltaSeqByLoc::ByAssemblyGapFeatures_impl(), CleanupCommand(), CleanupHugeFileCommand(), ConvertRawToDeltaByNsCommand_impl(), ConvertRawToDeltaByNsHugeFileCmd_impl(), CMacroCmdComposite::Execute(), CMacroBioData_FeatIterBase::RunDeleteCommand(), CMacroBioData_BioSourceIter::RunDeleteCommand(), CMacroBioData_PubdescIter::RunDeleteCommand(), and CCmdCleanup::x_CreateActionCmd().
|
inlinevirtual |
bool CCmdComposite::IsEmpty | ( | void | ) |
Definition at line 41 of file cmd_composite.cpp.
References m_CmdList.
Referenced by CCmdMoveCdsToSetLevel::x_CreateActionCmd().
|
virtual |
Undo (opposite to Execute())
Implements IEditCommand.
Reimplemented in CMacroCmdComposite.
Definition at line 54 of file cmd_composite.cpp.
References m_CmdList.
Referenced by CConvertSelectedGaps::apply_impl(), CEditSelectedGaps::apply_impl(), BOOST_AUTO_TEST_CASE(), ConvertRawToDeltaByNsCommand_impl(), ConvertRawToDeltaByNsHugeFileCmd_impl(), and CMacroCmdComposite::Unexecute().
|
private |
Definition at line 62 of file cmd_composite.hpp.
Referenced by AddCommand(), Execute(), IsEmpty(), and Unexecute().
|
private |
Definition at line 61 of file cmd_composite.hpp.
Referenced by GetLabel().