diff --git a/modules/mol/base/src/atom_view.cc b/modules/mol/base/src/atom_view.cc index 5fcb7010abbdf1dd20d31e8f104f26accd0f5f15..084741a596093d600d3b171c4caa35f67103c4c0 100644 --- a/modules/mol/base/src/atom_view.cc +++ b/modules/mol/base/src/atom_view.cc @@ -167,6 +167,11 @@ unsigned long AtomView::GetHashCode() const return reinterpret_cast<unsigned long>(data_.get()); } +bool AtomView::IsValid() const +{ + return Impl().get()!=0 && Impl()->GetEntity(); +} + }} // ns diff --git a/modules/mol/base/src/atom_view.hh b/modules/mol/base/src/atom_view.hh index 2172453937cddc59c70b4a2439a7129e83d749a2..4dc505c47302dbc3c540f4ff43e0267e57da3df0 100644 --- a/modules/mol/base/src/atom_view.hh +++ b/modules/mol/base/src/atom_view.hh @@ -47,7 +47,7 @@ public: operator bool() const { return this->IsValid(); } /// \brief check validity of handle /// \sa #operator bool() - bool IsValid() const { return data_.get()!=0; } + bool IsValid() const; //@} // constructors AtomView(); diff --git a/modules/mol/base/src/chain_view.cc b/modules/mol/base/src/chain_view.cc index c8498b1d38099efa32454fb9159fa4a3f2a057a1..f6fad0265b05b85e7948aec558a654c4114777e4 100644 --- a/modules/mol/base/src/chain_view.cc +++ b/modules/mol/base/src/chain_view.cc @@ -483,5 +483,11 @@ unsigned long ChainView::GetHashCode() const return reinterpret_cast<unsigned long>(data_.get()); } +bool ChainView::IsValid() const +{ + return Impl().get()!=0 && Impl()->GetEntity(); +} + + }} // ns diff --git a/modules/mol/base/src/chain_view.hh b/modules/mol/base/src/chain_view.hh index 6f2c1a337042d83cb24e85d4c796683a343d6ba2..3adc60e945049d628b51d5b46433323c1a50de2b 100644 --- a/modules/mol/base/src/chain_view.hh +++ b/modules/mol/base/src/chain_view.hh @@ -56,7 +56,7 @@ public: operator bool() const { return this->IsValid(); } /// \brief check validity of handle /// \sa #operator bool() - bool IsValid() const { return data_.get()!=0; } + bool IsValid() const; //@} /// \brief Get parent entity view diff --git a/modules/mol/base/src/residue_view.cc b/modules/mol/base/src/residue_view.cc index 5948a38a479887b76fedc47f85ce76a80951c0f3..2674714a17a2f2f14562e20c3394b74ad41e892b 100644 --- a/modules/mol/base/src/residue_view.cc +++ b/modules/mol/base/src/residue_view.cc @@ -291,4 +291,9 @@ unsigned long ResidueView::GetHashCode() const return reinterpret_cast<unsigned long>(data_.get()); } +bool ResidueView::IsValid() const +{ + return Impl().get()!=0 && Impl()->GetEntity(); +} + }} //ns diff --git a/modules/mol/base/src/residue_view.hh b/modules/mol/base/src/residue_view.hh index 8268143fa34bdeead462dba753a71c640b83946b..1517622ed6cabca9c812eb7e481699c65e40174a 100644 --- a/modules/mol/base/src/residue_view.hh +++ b/modules/mol/base/src/residue_view.hh @@ -65,7 +65,7 @@ public: operator bool() const { return this->IsValid(); } /// \brief check validity of handle /// \sa #operator bool() - bool IsValid() const { return data_.get()!=0; } + bool IsValid() const; //@} /// \name internal