#include <ncbiobj.hpp>
Inheritance diagram for CConstRef< C, Locker >:


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_type & | GetLocker (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. | |
| TObjectType * | ReleaseOrNull (void) |
| Release a reference to the object and return a pointer to the object. | |
| TObjectType * | Release (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. | |
| TThisType & | operator= (const TThisType &ref) |
| Assignment operator for const references. | |
| TThisType & | operator= (const CRef< C, Locker > &ref) |
| Assignment operator for assigning a reference to a const reference. | |
| TThisType & | operator= (TObjectType *ptr) |
| Assignment operator for const references with right hand side set to a pointer. | |
| TThisType & | operator= (ENull) |
| Assignment operator with right hand side set to ENull. | |
| TObjectType * | GetNonNullPointer (void) const |
| Get pointer value and throw a null pointer exception if pointer is null. | |
| TObjectType * | GetPointerOrNull (void) const THROWS_NONE |
| Get pointer value. | |
| TObjectType * | GetPointer (void) const THROWS_NONE |
| Get pointer,. | |
| TObjectType & | GetObject (void) const |
| Get object. | |
| TObjectType & | operator * (void) const |
| Dereference operator returning object. | |
| TObjectType * | operator-> (void) const |
| Reference operator. | |
| operator TObjectType * (void) const | |
| Dereference operator returning pointer. | |
Static Public Member Functions | |
| static void | ThrowNullPointerException (void) |
Private Member Functions | |
| TObjectType * | AtomicSwap (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. | |
|
|||||
|
Define alias element_type.
Definition at line 1133 of file ncbiobj.hpp. |
|
|||||
|
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. |
|
|||||
|
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. |
|
|||||
|
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 for null pointer.
Definition at line 1140 of file ncbiobj.hpp. |
|
||||||||||
|
Constructor for ENull pointer.
Definition at line 1146 of file ncbiobj.hpp. |
|
||||||||||
|
Constructor for explicit type conversion from pointer to object.
Definition at line 1151 of file ncbiobj.hpp. |
|
||||||||||||||||
|
Constructor for explicit type conversion from pointer to object.
Definition at line 1160 of file ncbiobj.hpp. |
|
||||||||||
|
Constructor from an existing CConstRef object,.
Definition at line 1170 of file ncbiobj.hpp. |
|
||||||||||
|
Constructor from an existing CRef object,.
Definition at line 1181 of file ncbiobj.hpp. |
|
||||||||||
|
Destructor.
Definition at line 1192 of file ncbiobj.hpp. |
|
||||||||||
|
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.
Definition at line 1385 of file ncbiobj.hpp. |
|
||||||||||
|
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.
Definition at line 1364 of file ncbiobj.hpp. |
|
||||||||||
|
Definition at line 1515 of file ncbiobj.hpp. Referenced by CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::AtomicReleaseTo(), and CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::AtomicResetFrom(). |
|
||||||||||
|
Check if CConstRef is empty -- not pointing to any object which means having a null value.
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(). |
|
||||||||||
|
Get reference to locker object.
Definition at line 1198 of file ncbiobj.hpp. |
|
||||||||||
|
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.
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(). |
|
||||||||||
|
||||||||||
|
||||||||||
|
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.
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 *(). |
|
||||||||||
|
Check if pointer is null -- same effect as Empty().
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(). |
|
||||||||||
|
||||||||||
|
Check if pointer is not null -- same effect as NotEmpty().
Definition at line 1243 of file ncbiobj.hpp. Referenced by CScopeInfo_Base::HasObject(). |
|
||||||||||
|
Dereference operator returning object.
Definition at line 1489 of file ncbiobj.hpp. |
|
||||||||||
|
Dereference operator returning pointer.
Definition at line 1509 of file ncbiobj.hpp. |
|
||||||||||
|
Check if CConstRef is empty -- not pointing to any object, which means having a null value.
Definition at line 1208 of file ncbiobj.hpp. |
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
Reference operator.
Definition at line 1499 of file ncbiobj.hpp. |
|
||||||||||
|
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. |
|
||||||||||
|
Assignment operator for const references with right hand side set to a pointer.
Definition at line 1413 of file ncbiobj.hpp. |
|
||||||||||
|
Assignment operator for assigning a reference to a const reference.
Definition at line 1405 of file ncbiobj.hpp. |
|
||||||||||
|
Assignment operator for const references.
Definition at line 1398 of file ncbiobj.hpp. |
|
||||||||||
|
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.
Definition at line 1338 of file ncbiobj.hpp. |
|
||||||||||
|
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.
Definition at line 1309 of file ncbiobj.hpp. |
|
||||||||||
|
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.
Definition at line 1283 of file ncbiobj.hpp. |
|
||||||||||
|
||||||||||
|
Swaps the pointer with another reference.
Definition at line 1253 of file ncbiobj.hpp. Referenced by CSeq_id_Handle::Swap(). |
|
||||||||||
|
Definition at line 1320 of file ncbiobj.hpp. Referenced by CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::GetNonNullPointer(), and CConstRef< IAppJobError, CInterfaceObjectLocker< IAppJobError > >::Release(). |
|
|||||
1.4.6
Modified on Mon Dec 07 16:22:53 2009 by modify_doxy.py rev. 173732