CConstRef< C, Locker > Class Template Reference
[Smart Pointers with Reference Counting]

Search Toolkit Book for CConstRef

#include <ncbiobj.hpp>

Inheritance diagram for CConstRef< C, Locker >:

Inheritance graph
[legend]
Collaboration diagram for CConstRef< C, Locker >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class C, class Locker = CObjectCounterLocker>
class CConstRef< C, Locker >

CConstRef --.

Define a template class that stores a pointer to an object and defines methods for constant referencing of object.

Definition at line 1131 of file ncbiobj.hpp.

Public Types

typedef C element_type
 Define alias element_type.
typedef const element_type TObjectType
 Define alias TObjectType.
typedef Locker locker_type
 Define alias for locking type.
typedef CConstRef< C, Locker > TThisType
 Alias for this template type.

Public Member Functions

 CConstRef (void) THROWS_NONE
 Constructor for null pointer.
 CConstRef (ENull) THROWS_NONE
 Constructor for ENull pointer.
 CConstRef (TObjectType *ptr)
 Constructor for explicit type conversion from pointer to object.
 CConstRef (TObjectType *ptr, const locker_type &locker_value)
 Constructor for explicit type conversion from pointer to object.
 CConstRef (const TThisType &ref)
 Constructor from an existing CConstRef object,.
 CConstRef (const CRef< C, Locker > &ref)
 Constructor from an existing CRef object,.
 ~CConstRef (void)
 Destructor.
const locker_typeGetLocker (void) const
 Get reference to locker object.
bool operator! (void) const THROWS_NONE
 Check if CConstRef is empty -- not pointing to any object, which means having a null value.
bool Empty (void) const THROWS_NONE
 Check if CConstRef is empty -- not pointing to any object which means having a null value.
bool NotEmpty (void) const THROWS_NONE
 Check if CConstRef is not empty -- pointing to an object and has a non-null value.
bool IsNull (void) const THROWS_NONE
 Check if pointer is null -- same effect as Empty().
bool NotNull (void) const THROWS_NONE
 Check if pointer is not null -- same effect as NotEmpty().
void Swap (TThisType &ref)
 Swaps the pointer with another reference.
void Reset (void)
 Reset reference object.
void Reset (TObjectType *newPtr)
 Reset reference object to new pointer.
TObjectTypeReleaseOrNull (void)
 Release a reference to the object and return a pointer to the object.
TObjectTypeRelease (void)
 Release a reference to the object and return a pointer to the object.
void AtomicResetFrom (const CConstRef &ref)
 Reset reference object to new pointer.
void AtomicReleaseTo (CConstRef &ref)
 Release referenced object to another CConstRef<> object.
TThisTypeoperator= (const TThisType &ref)
 Assignment operator for const references.
TThisTypeoperator= (const CRef< C, Locker > &ref)
 Assignment operator for assigning a reference to a const reference.
TThisTypeoperator= (TObjectType *ptr)
 Assignment operator for const references with right hand side set to a pointer.
TThisTypeoperator= (ENull)
 Assignment operator with right hand side set to ENull.
TObjectTypeGetNonNullPointer (void) const
 Get pointer value and throw a null pointer exception if pointer is null.
TObjectTypeGetPointerOrNull (void) const THROWS_NONE
 Get pointer value.
TObjectTypeGetPointer (void) const THROWS_NONE
 Get pointer,.
TObjectTypeGetObject (void) const
 Get object.
TObjectTypeoperator * (void) const
 Dereference operator returning object.
TObjectTypeoperator-> (void) const
 Reference operator.
 operator TObjectType * (void) const
 Dereference operator returning pointer.

Static Public Member Functions

static void ThrowNullPointerException (void)

Private Member Functions

TObjectTypeAtomicSwap (TObjectType *ptr)
void operator- (TObjectType *) const
void operator- (int) const
void operator+ (int) const

Private Attributes

pair_base_member< locker_type,
TObjectType * > 
m_Data
 Pointer to object.


Member Typedef Documentation

template<class C, class Locker = CObjectCounterLocker>
typedef C CConstRef< C, Locker >::element_type
 

Define alias element_type.

Definition at line 1133 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
typedef Locker CConstRef< C, Locker >::locker_type
 

Define alias for locking type.

Reimplemented in CConstIRef< Interface, Locker >, CConstIRef< ILayoutTrackFactory >, CConstIRef< IAppJobError >, CConstIRef< IAppJobProgress >, CConstIRef< IScoringAlignment >, and CConstIRef< IEventRecord >.

Definition at line 1135 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
typedef const element_type CConstRef< C, Locker >::TObjectType
 

Define alias TObjectType.

Reimplemented in CConstIRef< Interface, Locker >, CConstIRef< ILayoutTrackFactory >, CConstIRef< IAppJobError >, CConstIRef< IAppJobProgress >, CConstIRef< IScoringAlignment >, and CConstIRef< IEventRecord >.

Definition at line 1134 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
typedef CConstRef<C, Locker> CConstRef< C, Locker >::TThisType
 

Alias for this template type.

Reimplemented in CConstIRef< Interface, Locker >, CConstIRef< ILayoutTrackFactory >, CConstIRef< IAppJobError >, CConstIRef< IAppJobProgress >, CConstIRef< IScoringAlignment >, and CConstIRef< IEventRecord >.

Definition at line 1136 of file ncbiobj.hpp.


Constructor & Destructor Documentation

template<class C, class Locker = CObjectCounterLocker>
CConstRef< C, Locker >::CConstRef void   )  [inline]
 

Constructor for null pointer.

Definition at line 1140 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
CConstRef< C, Locker >::CConstRef ENull   )  [inline]
 

Constructor for ENull pointer.

Definition at line 1146 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
CConstRef< C, Locker >::CConstRef TObjectType ptr  )  [inline, explicit]
 

Constructor for explicit type conversion from pointer to object.

Definition at line 1151 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
CConstRef< C, Locker >::CConstRef TObjectType ptr,
const locker_type locker_value
[inline]
 

Constructor for explicit type conversion from pointer to object.

Definition at line 1160 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
CConstRef< C, Locker >::CConstRef const TThisType ref  )  [inline]
 

Constructor from an existing CConstRef object,.

Definition at line 1170 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
CConstRef< C, Locker >::CConstRef const CRef< C, Locker > &  ref  )  [inline]
 

Constructor from an existing CRef object,.

Definition at line 1181 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
CConstRef< C, Locker >::~CConstRef void   )  [inline]
 

Destructor.

Definition at line 1192 of file ncbiobj.hpp.


Member Function Documentation

template<class C, class Locker = CObjectCounterLocker>
void CConstRef< C, Locker >::AtomicReleaseTo CConstRef< C, Locker > &  ref  )  [inline]
 

Release referenced object to another CConstRef<> object.

This copies the pointer to object to the argument ref, and release reference from this object. Old reference object held by argument ref is released and deleted if necessary. Operation is atomic on this object, so that AtomicResetFrom() and AtomicReleaseTo() called from different threads will work properly. Operation is not atomic on ref argument.

See also:
AtomicResetFrom(const CConstRef& ref);

Definition at line 1385 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
void CConstRef< C, Locker >::AtomicResetFrom const CConstRef< C, Locker > &  ref  )  [inline]
 

Reset reference object to new pointer.

This sets the pointer to object to the new pointer, and removes reference count to old object and deletes the old object if this is the last reference to the old object. The new pointer is got from ref argument. Operation is atomic on this object, so that AtomicResetFrom() and AtomicReleaseTo() called from different threads will work properly. Operation is not atomic on ref argument.

See also:
AtomicReleaseTo(CConstRef& ref);

Definition at line 1364 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
TObjectType* CConstRef< C, Locker >::AtomicSwap TObjectType ptr  )  [inline, private]
 

Definition at line 1515 of file ncbiobj.hpp.

Referenced by CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::AtomicReleaseTo(), and CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::AtomicResetFrom().

template<class C, class Locker = CObjectCounterLocker>
bool CConstRef< C, Locker >::Empty void   )  const [inline]
 

Check if CConstRef is empty -- not pointing to any object which means having a null value.

See also:
IsNull(), operator!()

Definition at line 1218 of file ncbiobj.hpp.

Referenced by CMaskedRangeSet::GetRanges(), CPhyTreeView::OnProjectChanged(), DoNotBelieveFrameShiftsWithoutCdsEvidence::operator()(), PackedSeqLocToMaskedQueryRegions(), CLocalPssmSearch::Run(), s_ExtractSeqId(), s_GetBestProtFeature(), SetAlignedResiduesOnSequence(), CPsiBlastImpl::SetPssm(), CMaskedRangeSet::x_CombineLocs(), CReferenceItem::x_CreateUniqueStr(), CShowBlastDefline::x_DisplayDefline(), CShowBlastDefline::x_DisplayDeflineTable(), CWriteDB_Impl::x_ExtractDeflines(), CMultiAligner::x_InitParams(), CWriteDB_Impl::x_Publish(), CNcbiRegistry::x_Read(), and CPsiBlastImpl::x_Validate().

template<class C, class Locker = CObjectCounterLocker>
const locker_type& CConstRef< C, Locker >::GetLocker void   )  const [inline]
 

Get reference to locker object.

Definition at line 1198 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
TObjectType* CConstRef< C, Locker >::GetNonNullPointer void   )  const [inline]
 

Get pointer value and throw a null pointer exception if pointer is null.

Similar to GetPointerOrNull() except that this method throws a null pointer exception if pointer is null, whereas GetPointerOrNull() returns a null value.

See also:
GetPointerOrNull(), GetPointer(), GetObject()

Definition at line 1436 of file ncbiobj.hpp.

Referenced by CSplignFormatter::AsSeqAlignSet(), CNWFormatter::SSegment::ExtendLeft(), CNWFormatter::SSegment::ExtendRight(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::GetObject(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::operator *(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::operator->(), and s_MakeBioseqs().

template<class C, class Locker = CObjectCounterLocker>
TObjectType& CConstRef< C, Locker >::GetObject void   )  const [inline]
 

Get object.

Similar to GetNonNullPointer(), except that this method returns the object whereas GetNonNullPointer() returns a pointer to the object.

See also:
GetNonNullPointer()

Definition at line 1479 of file ncbiobj.hpp.

Referenced by CSFTransDSType::CreateDS(), CSGGraphDSType::CreateDS(), CSGFeatureDSType::CreateDS(), CSGSequenceDSType::CreateDS(), CSGAlignmentDSType::CreateDS(), CFeaturePanelDSType::CreateDS(), CEpigenomicsDSType::CreateDS(), CSGSnpDSType::CreateDS(), CLDBlockDSType::CreateDS(), CSGHapmapDSType::CreateDS(), CSGGapDSType::CreateDS(), CBinsDSType::CreateDS(), CRelationTypeConverterAdapter::Dump(), CSGSnpDS::GetAnnotNames(), CFlatFileTextItem::GetAssosiatedObject(), CSeq_feat_Descr::GetFeat(), CRelationTypeConverterAdapter::GetName(), CSGAlignmentDS::GetScoringMethod(), CSGAlignmentDS::GetScoringMethodName(), CLDBlockDS::GetTrackNames(), CSGHapmapDS::GetTrackNames(), CSGGapDS::GetTrackNames(), CBinsDS::GetTrackNames(), CPhyloPhylipReader::GetTree(), CGBUserTypeReg::GetType(), StructureSet::MatchSequenceToMoleculeInObject(), PSSMWrapper::PSSMWrapper(), CFrameworkDemoGUI::RestoreWindowLayout(), and CSplignJob::x_CreateProjectItems().

template<class C, class Locker = CObjectCounterLocker>
TObjectType* CConstRef< C, Locker >::GetPointer void   )  const [inline]
 

Get pointer,.

Same as GetPointerOrNull().

See also:
GetPointerOrNull()

Definition at line 1466 of file ncbiobj.hpp.

Referenced by CProjectFileWriter::AddToScope(), CPhyTreeView::CommitTheChanges(), Convert_Seq_id_Bioseq_set(), CPsiBl2Seq::CPsiBl2Seq(), CSeq_loc_Mapper::CSeq_loc_Mapper(), CSGAlignmentDS::GetAlignType(), CGuiRegistry::CReadView::GetBool(), CConstRefTypeInfo< Data >::GetData(), CPluginObject::GetDataHandle(), CTextPanel::GetDataObject(), CBLAST_Dlg_Item::GetDBInfo(), CSeq_id_Descr::GetId(), CGuiRegistry::CReadView::GetInt(), CPluginObject::GetObject(), CGuiRegistry::CReadView::GetOctetString(), CSeqGraphicPane::GetPopupArea(), CPluginObject::GetProject(), CGuiRegistry::CReadView::GetReal(), CSGAlignmentDS::GetScoringMethod(), CSGAlignmentDS::GetScoringMethodName(), CGroupMapWidget::GetSelectedItem(), CProjectTreeView::GetSelection(), CStdSegHit::GetSeqAlign(), CGuiRegistry::CReadView::GetString(), CFlatFileTextItem::GetToolTipText(), CGBUserTypeReg::GetType(), CSeq_idUserType::GetUserType(), CUser_object::HasField(), CSwitchPointGlyph::HasObject(), CSegmentGlyph::HasObject(), CFeatGlyph::HasObject(), CClonePlacementGlyph::HasObject(), CAlignGlyph::HasObject(), CLayoutSwitchPoints::HasObject(), CLayoutSequence::HasObject(), CLayoutSeqMap::HasObject(), CLayoutFeat::HasObject(), CLayoutAlignSmear::HasObject(), CLayoutAlign::HasObject(), CLayoutGraph::HasObject(), CSeqTextPanel::Init(), CTextPanel::Init(), CAppPackagesDlg::OnPackageSelected(), CConvertCache::SCacheKeySort::operator()(), CConversionApp::Read(), CGffExportJob::Run(), CFlatFileExportJob::Run(), CAgpExportJob::Run(), s_CheckEmptyLists(), CPluginObject::SetDataHandle(), CPluginObject::SetObject(), CPluginObject::SetProject(), CSGAlignmentDS::SetScoringMethod(), CGeneGroup::SetShowGene(), SOAP_GetKnownObject(), CChangeSeqFeatCommand::x_Add(), COpenViewlDlgTask::x_CheckDataStatus(), CAlnMultiDSBuilder::x_CreateSparseDataSource(), CRnaCdsGroup::x_DrawLabels(), CAppPackagesDlg::x_DumpPkgInfo(), CAlignedFeatureGraph::x_GatherCluster(), CPkgManager::x_GetBasePkgs(), CSeqMap::x_GetChunkToLoad(), CSeqMap::x_GetObject(), CSnpTableView::x_GetOrigObject(), CFeatTableView::x_GetOrigObject(), CTextView::x_GetOrigObject(), CPhyTreeView::x_GetOrigObject(), CMultiAlignView::x_GetOrigObject(), CMPCrossAlignView::x_GetOrigObject(), CCrossAlignView::x_GetOrigObject(), CAlignSpanView::x_GetOrigObject(), CSeqMap::x_GetSeq_data(), CStatusBarService::x_HasEvent(), CTextPanel::x_LoadFlatFile(), CSeqMap::x_LoadObject(), CAppPackagesDlg::x_LoadPkgList(), CLayoutTrackHandler::x_MoveTrackDownRecursive(), CLayoutTrackHandler::x_MoveTrackUpRecursive(), CSequenceSearchJob::x_SearchSequence(), CSeqMap::x_SetSegmentRef(), CTextPanel::x_UpdateToolbar(), CSoapMessage::x_VerifyFaultObj(), and CProjectFileWriter::x_WriteGtf().

template<class C, class Locker = CObjectCounterLocker>
TObjectType* CConstRef< C, Locker >::GetPointerOrNull void   )  const [inline]
 

Get pointer value.

Similar to GetNonNullPointer() except that this method returns a null if the pointer is null, whereas GetNonNullPointer() throws a null pointer exception.

See also:
GetNonNullPointer()

Definition at line 1454 of file ncbiobj.hpp.

Referenced by CFlatFileFactoryBuilder::AddItem(), COMSSASearch::AppendBioseq(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::CConstRef(), CAnnotationASN1::CImplementationData::DumpEvidence(), CFeatureEditor::Edit(), CDefaultEditor::Edit(), CSeq_id_Handle::GetHash(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::GetPointer(), CValidError::GetValidated(), and CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::operator TObjectType *().

template<class C, class Locker = CObjectCounterLocker>
bool CConstRef< C, Locker >::IsNull void   )  const [inline]
 

Check if pointer is null -- same effect as Empty().

See also:
Empty(), operator!()

Definition at line 1234 of file ncbiobj.hpp.

Referenced by CSplignFormatter::AsAlignmentText(), CCompareFeats::IsMatch(), operator!=(), SFeats_OpLess::operator()(), operator<<(), operator==(), PackedSeqLocToMaskedQueryRegions(), CSearch< LEGACY, NHITS >::WriteBioseqs(), CCompareSeqRegions::x_GetPutativeMatches(), and CCleanup_imp::x_RemovePseudoProducts().

template<class C, class Locker = CObjectCounterLocker>
bool CConstRef< C, Locker >::NotEmpty void   )  const [inline]
 

Check if CConstRef is not empty -- pointing to an object and has a non-null value.

Definition at line 1225 of file ncbiobj.hpp.

Referenced by CBuildDatabase::AddSequences(), BOOST_AUTO_TEST_CASE(), CAnnotationASN1::CImplementationData::create_internal_feature(), CObjMgrFree_RemoteQueryData::GetBioseqSet(), CFeatGlyph::GetHTMLActiveAreas(), CBioseqSeqInfoSrc::GetId(), CBlastDbDataLoader::GetLoaderNameFromArgs(), CMatePairGlyph::GetObject(), CLayoutMatePair::GetObject(), CObjMgrFree_LocalQueryData::GetQueryInfo(), CReferenceItem::GetReftype(), CObjMgrFree_RemoteQueryData::GetSeqLocs(), CObjMgrFree_LocalQueryData::GetSequenceBlk(), SAnnotSelector::HasLimit(), CBioseqContext::IsEncode(), CValidErrItem::IsSetContext(), CValidErrItem::IsSetObject(), CFlatItem::IsSetObject(), CBlastFormatUtil::PrintAsciiPssm(), s_GetModelEvidance(), s_TitleFromProtein(), CPssmEngine::SetUngappedStatisticalParams(), SetupSubjects_OMF(), CMessageSlot::x_CanShowPopup(), CWriteDB_Impl::x_CookSequence(), CPsiBlastInputData::x_ExtractQueryForPssm(), CReferenceItem::x_GatherInfo(), CFastaOstream::x_GetMaskingStates(), CBlastTracebackSearch::x_Init(), CLocalDbAdapter::x_InitSeqDB(), CObjMgrFree_QueryFactory::x_MakeLocalQueryData(), CObjMgrFree_QueryFactory::x_MakeRemoteQueryData(), and CBlastFormat::x_WrapAlignmentInSeqAnnot().

template<class C, class Locker = CObjectCounterLocker>
bool CConstRef< C, Locker >::NotNull void   )  const [inline]
 

Check if pointer is not null -- same effect as NotEmpty().

See also:
NotEmpty()

Definition at line 1243 of file ncbiobj.hpp.

Referenced by CScopeInfo_Base::HasObject().

template<class C, class Locker = CObjectCounterLocker>
TObjectType& CConstRef< C, Locker >::operator * void   )  const [inline]
 

Dereference operator returning object.

See also:
GetObject()

Definition at line 1489 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
CConstRef< C, Locker >::operator TObjectType * void   )  const [inline]
 

Dereference operator returning pointer.

See also:
GetPointer()

Definition at line 1509 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
bool CConstRef< C, Locker >::operator! void   )  const [inline]
 

Check if CConstRef is empty -- not pointing to any object, which means having a null value.

See also:
Empty(), IsNull()

Definition at line 1208 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
void CConstRef< C, Locker >::operator+ int   )  const [private]
 

template<class C, class Locker = CObjectCounterLocker>
void CConstRef< C, Locker >::operator- int   )  const [private]
 

template<class C, class Locker = CObjectCounterLocker>
void CConstRef< C, Locker >::operator- TObjectType  )  const [private]
 

template<class C, class Locker = CObjectCounterLocker>
TObjectType* CConstRef< C, Locker >::operator-> void   )  const [inline]
 

Reference operator.

See also:
GetPointer()

Definition at line 1499 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
TThisType& CConstRef< C, Locker >::operator= ENull   )  [inline]
 

Assignment operator with right hand side set to ENull.

Reimplemented in CConstIRef< Interface, Locker >, CConstIRef< ILayoutTrackFactory >, CConstIRef< IAppJobError >, CConstIRef< IAppJobProgress >, CConstIRef< IScoringAlignment >, and CConstIRef< IEventRecord >.

Definition at line 1420 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
TThisType& CConstRef< C, Locker >::operator= TObjectType ptr  )  [inline]
 

Assignment operator for const references with right hand side set to a pointer.

Definition at line 1413 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
TThisType& CConstRef< C, Locker >::operator= const CRef< C, Locker > &  ref  )  [inline]
 

Assignment operator for assigning a reference to a const reference.

Definition at line 1405 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
TThisType& CConstRef< C, Locker >::operator= const TThisType ref  )  [inline]
 

Assignment operator for const references.

Definition at line 1398 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
TObjectType* CConstRef< C, Locker >::Release void   )  [inline]
 

Release a reference to the object and return a pointer to the object.

Releasing a reference means decreasing the reference count by "1". A pointer to the existing object is returned, unless this pointer is already null(0), in which the null pointer exception (eNullPtr) is thrown.

Similar to ReleaseOrNull(), except that this method throws an exception whereas ReleaseOrNull() does not.

See also:
ReleaseOrNull()

Definition at line 1338 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
TObjectType* CConstRef< C, Locker >::ReleaseOrNull void   )  [inline]
 

Release a reference to the object and return a pointer to the object.

Releasing a reference means decreasing the reference count by "1". A pointer to the existing object is returned, unless this pointer is already null(0), in which case a null(0) is returned.

Similar to Release(), except that this method returns a null, whereas Release() throws a null pointer exception.

See also:
Release()

Definition at line 1309 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
void CConstRef< C, Locker >::Reset TObjectType newPtr  )  [inline]
 

Reset reference object to new pointer.

This sets the pointer to object to the new pointer, and removes reference count to old object and deletes the old object if this is the last reference to the old object.

See also:
Reset()

Definition at line 1283 of file ncbiobj.hpp.

template<class C, class Locker = CObjectCounterLocker>
void CConstRef< C, Locker >::Reset void   )  [inline]
 

Reset reference object.

This sets the pointer to object to null, and removes reference count to object and deletes the object if this is the last reference to the object.

See also:
Reset(TObjectType*)

Definition at line 1266 of file ncbiobj.hpp.

Referenced by CStatusBarService::AddEventMessage(), CSelectionEvent::AddObjectSelection(), CWriteDB_Impl::AddSequence(), CSnpTableModel::ApplyFilter(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::AtomicReleaseTo(), CCrossPanelIR::ColorBySegments(), CSeq_loc_Conversion::ConvertInterval(), CSeq_loc_Conversion::ConvertPoint(), CBlobSplitterImpl::CopySequence(), CPeriodicTestJob::CPeriodicTestJob(), CReferenceItem::CReferenceItem(), CSeqTableSetAnyObjField::CSeqTableSetAnyObjField(), CPluginReply::DecomposeRaw(), CGFFGatherer::Gather(), CFlatGatherer::Gather(), CValidError_imp::GatherSources(), CValidError_imp::GetCDSGivenProduct(), CLayoutGroup::GetChild(), CSeq_id_Gi_Tree::GetGiHandle(), CAnnotObject_Info::GetMaps(), CValidError_imp::GetmRNAGivenProduct(), CFastaBioseqSource::GetNext(), CSeqEntrySource::GetNext(), CGeneGroup::GetObject(), CSeq_id_General_Str_Info::GetPackedSeqId(), CSeq_id_General_Id_Info::GetPackedSeqId(), CSeq_id_Textseq_Info::GetPackedSeqId(), CSeq_id_Gi_Info::GetPackedSeqId(), CProjectTreeView::GetSelection(), CFlatFileGenerator::GetSeqFeatText(), CSegmentGlyph::GetTooltip(), CBinsDS::GetTrackNames(), CTextPanel::Init(), CFeatTableDS::Init(), CSeq_align_Mapper_Base::InitExon(), CViewGraphic::InitView(), CMappedGraph::MakeMappedGraph(), CMappedGraph::MakeMappedLoc(), CSeqGraphicPane::OnLeftDown(), CAlign_CI::operator *(), CAlign_CI::operator++(), CRangeWithFuzz::operator+=(), CAlign_CI::operator--(), CAlign_CI::operator->(), CMappedFeat::operator=(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::operator=(), operator>>(), CPluginObject::PostRead(), CTSE_LoadLockGuard::Release(), CSplitBlob::Reset(), CSeq_loc_Conversion::Reset(), CMappedFeat::Reset(), CPluginObject::Reset(), CMessageSlot::Reset(), CFlatFileContext::Reset(), CSeq_id_Handle::Reset(), CAlnChunkSegment::Reset(), CRangeWithFuzz::ResetFuzzFrom(), CRangeWithFuzz::ResetFuzzTo(), CPrimeNumbersJob::Run(), CLocalPssmSearch::Run(), s_ExtractSeqId(), s_FindLatest(), s_GetBestProtFeature(), s_GetGeneForFeature(), s_GetModelEvidance(), s_GetQueryBioseq(), CSeqGraphicPane::SelectObject(), CMappedFeat::Set(), CLayoutGroup::SetConfig(), CRnaCdsGroup::SetConfig(), CAlignGlyph::SetConfig(), CPluginObject::SetDataHandle(), CCrossPanelIR::SetDataSource(), CTSE_ScopeInfo::SetEditTSE(), SAnnotSelector::SetLimitNone(), SAnnotSelector::SetLimitSeqAnnot(), SAnnotSelector::SetLimitSeqEntry(), SAnnotSelector::SetLimitTSE(), CSourceFeatureItem::SetLoc(), CFlatFileContext::SetLocation(), CPluginObject::SetObject(), CPluginObject::SetProject(), CMessageSlot::SetRecord(), CEventRecordDetailsDlg::SetRecord(), CSeq_annot_SplitInfo::SetSeq_annot(), CSeq_data_SplitInfo::SetSeq_data(), CAlignModel::SetTargetId(), CSubstMatrix::SetTranslationTable(), CCleanup_imp::Setup(), CStatusBarService::ShutDownService(), testResultAlignments(), CIdHandler::ToCanonical(), CChangeSeqFeatCommand::Unexecute(), CSeqGraphicPane::UpdateConfig(), CChangeSeqFeatCommand::x_Add(), CReferenceItem::x_AddAuthors(), CSeqMap::x_AddSegment(), CAlnMultiDSBuilder::x_Clear(), CMaskedRangeSet::x_CombineLocs(), CSGFeatureJob::x_CreateFeature1(), CTreeBuilderJob::x_CreateProjectItems(), CGFFGatherer::x_DoSingleSection(), CGenbankGatherer::x_DoSingleSection(), CFtableGatherer::x_DoSingleSection(), CEmblGatherer::x_DoSingleSection(), CTSE_Lock::x_Drop(), CSnpJob::x_Execute(), CScope_Impl::x_FindBioseqInfo(), CScopeInfo_Base::x_ForgetTSE(), CFlatGatherer::x_GatherAlignments(), CSourceFeatureItem::x_GatherInfo(), CFeatHeaderItem::x_GatherInfo(), CDateItem::x_GatherInfo(), CFeatureItem::x_GetAssociatedProtInfo(), CPrimaryItem::x_GetStrForPrimary(), CSeqMap::x_GetSubSeqMap(), CGFFFormatter::x_GetTranscriptID(), CMultiAlignView::x_GetValidInputData(), CReferenceItem::x_Init(), CSeq_align_Mapper_Base::x_Init(), CAnnotCompare_AlignDS::x_Init(), CBioseqContext::x_Init(), CSequenceDataTester::x_Init(), CSeq_loc_Mapper::x_InitializeSeqMap(), CReferenceItem::x_InitProc(), CFeaturePanel::x_IsChromosome(), CLDBlockJob::x_Load(), CHapmapJob::x_Load(), CGapJob::x_Load(), CBinsJob::x_Load(), CGapJob::x_LoadGWAS(), CTSE_Lock::x_Lock(), CBlastFormat::x_PrintTabularReport(), CSplitQueryTestFixture::x_ReadQueryBoundsPerChunk(), CDataSource::x_ReleaseLastLock(), CTSE_Lock::x_Relock(), CScopeInfo_Base::x_ResetLock(), CWriteDB_Impl::x_ResetSequenceData(), CFlatFeatureRetrieveJob::x_Run(), CMultiAlignView::x_SelectRows(), CSeqMap::x_SetChunk(), CWriteDB_Impl::x_SetDeflinesFromBinary(), CDataSource::x_SetLock(), CSeqMap::x_SetObject(), CFlatItem::x_SetObject(), CFlatItem::x_SetSkip(), CSeq_descr_CI::x_Step(), CStatusBarService::x_TerminateEventMode(), CDeflineGenerator::x_TitleFromNM(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::~CConstRef(), and CSeq_id_Gi_Tree::~CSeq_id_Gi_Tree().

template<class C, class Locker = CObjectCounterLocker>
void CConstRef< C, Locker >::Swap TThisType ref  )  [inline]
 

Swaps the pointer with another reference.

See also:
Swap(ConstRef<>&)

Definition at line 1253 of file ncbiobj.hpp.

Referenced by CSeq_id_Handle::Swap().

template<class C, class Locker = CObjectCounterLocker>
static void CConstRef< C, Locker >::ThrowNullPointerException void   )  [inline, static]
 

Definition at line 1320 of file ncbiobj.hpp.

Referenced by CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::GetNonNullPointer(), and CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::Release().


Member Data Documentation

template<class C, class Locker = CObjectCounterLocker>
pair_base_member<locker_type, TObjectType*> CConstRef< C, Locker >::m_Data [private]
 

Pointer to object.

Definition at line 1525 of file ncbiobj.hpp.

Referenced by CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::AtomicReleaseTo(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::AtomicResetFrom(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::AtomicSwap(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::CConstRef(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::Empty(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::GetLocker(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::GetNonNullPointer(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::GetPointerOrNull(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::IsNull(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::NotEmpty(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::NotNull(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::operator!(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::operator=(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::Release(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::ReleaseOrNull(), CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::Reset(), and CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::Swap().


The documentation for this class was generated from the following file:
Generated on Mon Dec 7 10:55:52 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:22:53 2009 by modify_doxy.py rev. 173732