diff --git a/modules/gfx/src/gfx_node.cc b/modules/gfx/src/gfx_node.cc index 716523f1df54883e4c692929b301d8bbb82a4505..3923eb735880e99893c666934eaa702ca2a7177d 100644 --- a/modules/gfx/src/gfx_node.cc +++ b/modules/gfx/src/gfx_node.cc @@ -16,7 +16,7 @@ // along with this library; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA //------------------------------------------------------------------------------ -#include <boost/bind.hpp> +#include <boost/bind/bind.hpp> #include <ost/dyn_cast.hh> #include "gfx_node.hh" @@ -156,7 +156,7 @@ void GfxNode::Remove(GfxObjP obj) obj->parent_.reset(); if (this->IsAttachedToScene()) { Scene::Instance().NotifyObservers(bind(&SceneObserver::NodeRemoved, - _1, obj)); + boost::placeholders::_1, obj)); } } @@ -174,7 +174,7 @@ void GfxNode::RemoveAll() if (!attached) continue; Scene::Instance().NotifyObservers(bind(&SceneObserver::NodeRemoved, - _1, *i)); + boost::placeholders::_1, *i)); } node_vector_.clear(); } @@ -211,7 +211,7 @@ void GfxNode::Remove(GfxNodeP node) } if (this->IsAttachedToScene()) { Scene::Instance().NotifyObservers(bind(&SceneObserver::NodeRemoved, - _1, node)); + boost::placeholders::_1, node)); } } diff --git a/modules/gfx/src/scene.cc b/modules/gfx/src/scene.cc index a6fbd0d6898852d38a14478d35a0ddeac96ce718..1774cb72fab415e41a251a14f9c86dff7cc87c85 100644 --- a/modules/gfx/src/scene.cc +++ b/modules/gfx/src/scene.cc @@ -30,7 +30,7 @@ #include <sys/time.h> #endif -#include <boost/bind.hpp> +#include <boost/bind/bind.hpp> #include <boost/shared_array.hpp> #include <boost/filesystem/operations.hpp> #include <boost/filesystem/fstream.hpp> @@ -995,7 +995,7 @@ bool Scene::IsNameAvailable(const String& name) const void Scene::NodeAdded(const GfxNodeP& node) { - this->NotifyObservers(bind(&SceneObserver::NodeAdded, _1, node)); + this->NotifyObservers(bind(&SceneObserver::NodeAdded, boost::placeholders::_1, node)); } void Scene::ObjectChanged(const String& name) @@ -1003,13 +1003,13 @@ void Scene::ObjectChanged(const String& name) FindObj fn(name); Apply(fn); if(fn.node) { - this->NotifyObservers(bind(&SceneObserver::NodeChanged, _1, fn.node)); + this->NotifyObservers(bind(&SceneObserver::NodeChanged, boost::placeholders::_1, fn.node)); } } void Scene::NodeTransformed(const GfxObjP& object) { - this->NotifyObservers(bind(&SceneObserver::NodeTransformed, _1, object)); + this->NotifyObservers(bind(&SceneObserver::NodeTransformed, boost::placeholders::_1, object)); } void Scene::SelectionChanged(const String& name, const mol::EntityView& sel) @@ -1017,7 +1017,7 @@ void Scene::SelectionChanged(const String& name, const mol::EntityView& sel) FindObj fn(name); Apply(fn); if(fn.node) { - this->NotifyObservers(bind(&SceneObserver::SelectionChanged, _1, fn.node, sel)); + this->NotifyObservers(bind(&SceneObserver::SelectionChanged, boost::placeholders::_1, fn.node, sel)); } } @@ -1026,7 +1026,7 @@ void Scene::RenderModeChanged(const String& name) FindObj fn(name); Apply(fn); if(fn.node) { - this->NotifyObservers(bind(&SceneObserver::RenderModeChanged, _1, fn.node)); + this->NotifyObservers(bind(&SceneObserver::RenderModeChanged, boost::placeholders::_1, fn.node)); } } @@ -1034,7 +1034,7 @@ void Scene::Remove(const GfxNodeP& go) { if(!go) return; root_node_->Remove(go); - this->NotifyObservers(bind(&SceneObserver::NodeRemoved, _1,go)); + this->NotifyObservers(bind(&SceneObserver::NodeRemoved, boost::placeholders::_1,go)); } void Scene::RemoveAll() @@ -1050,7 +1050,7 @@ void Scene::Remove(const String& name) if(fn.node) { root_node_->Remove(name); if(GfxObjP go = dyn_cast<GfxObj>(fn.node)) { - this->NotifyObservers(bind(&SceneObserver::NodeRemoved, _1, go)); + this->NotifyObservers(bind(&SceneObserver::NodeRemoved, boost::placeholders::_1, go)); } } } @@ -1610,7 +1610,7 @@ void Scene::SetSelectionMode(uint m) { if (selection_mode_!=m) { selection_mode_=m; - this->NotifyObservers(bind(&SceneObserver::SelectionModeChanged, _1, + this->NotifyObservers(bind(&SceneObserver::SelectionModeChanged, boost::placeholders::_1, selection_mode_)); } diff --git a/modules/io/src/img/map_io_jpk_handler.cc b/modules/io/src/img/map_io_jpk_handler.cc index 3225ef8717b78fde842aa9df778b65e4c5349e46..58922e5412deb21da24e87f97bb1de61cecb33ca 100644 --- a/modules/io/src/img/map_io_jpk_handler.cc +++ b/modules/io/src/img/map_io_jpk_handler.cc @@ -32,7 +32,6 @@ #include <ost/io/io_exception.hh> #include <boost/function.hpp> -#include <boost/bind.hpp> #include "jpk_util.hh" #include "tiff_util.hh" diff --git a/modules/io/src/img/map_io_tiff_handler.cc b/modules/io/src/img/map_io_tiff_handler.cc index d88fc01d7d55b3b6227da0f8d18054fad3b54d2d..fbabb0cf67bdd1f0294d5003cf620bf11516db2c 100644 --- a/modules/io/src/img/map_io_tiff_handler.cc +++ b/modules/io/src/img/map_io_tiff_handler.cc @@ -29,7 +29,6 @@ #include <stdarg.h> #include <boost/function.hpp> -#include <boost/bind.hpp> #include <ost/img/image_state.hh> #include <ost/img/progress.hh> diff --git a/modules/io/src/mol/sdf_writer.cc b/modules/io/src/mol/sdf_writer.cc index ff14d0fd51129010f46d70a23c18ccd372a01430..8deaf9a7819f0fff6c069b721af7b55e446a0245 100644 --- a/modules/io/src/mol/sdf_writer.cc +++ b/modules/io/src/mol/sdf_writer.cc @@ -28,7 +28,7 @@ #include <ost/mol/chain_view.hh> #include <ost/mol/bond_handle.hh> #include <boost/regex.hpp> -#include <boost/bind.hpp> +#include <boost/bind/bind.hpp> namespace ost { namespace io { @@ -100,7 +100,8 @@ namespace { // get all neighboring atoms and sort them according to their atom index mol::AtomViewList atoms = atom.GetBondPartners(); std::sort(atoms.begin(), atoms.end(), bind(&SDFBondWriter::CompareAtomIdx, - this, _1, _2)); + this, boost::placeholders::_1, + boost::placeholders::_2)); // iterate all neighboring atoms and print bonds to all atoms with index // larger than current atom index diff --git a/modules/mol/alg/src/svd_superpose.cc b/modules/mol/alg/src/svd_superpose.cc index 6780213cf513cbd4785b50f542881570ec62b003..bbf35c24d1faf8e2b99b2248785195554c60cb7a 100644 --- a/modules/mol/alg/src/svd_superpose.cc +++ b/modules/mol/alg/src/svd_superpose.cc @@ -19,7 +19,6 @@ #include <stdexcept> #include <iostream> -#include <boost/bind.hpp> #include <Eigen/SVD> #include <Eigen/Geometry> @@ -39,7 +38,6 @@ namespace ost { namespace mol { namespace alg { -using boost::bind; typedef Eigen::Matrix<Real,3,1> EVec3; typedef Eigen::Matrix<Real,3,3> EMat3; typedef Eigen::Matrix<Real,4,4> EMat4; diff --git a/modules/mol/base/src/chain_view.cc b/modules/mol/base/src/chain_view.cc index 96c038460795b24ae2f91a92fb6d2cdc2a49c6c6..e0c5b5dce051f82ec27f705cfb0ebf07deec7c7f 100644 --- a/modules/mol/base/src/chain_view.cc +++ b/modules/mol/base/src/chain_view.cc @@ -18,7 +18,7 @@ //------------------------------------------------------------------------------ #include <algorithm> #include <limits> -#include <boost/bind.hpp> +#include <boost/bind/bind.hpp> #include <ost/log.hh> #include <ost/mol/bond_handle.hh> #include <ost/mol/residue_handle.hh> @@ -31,7 +31,6 @@ #include <ost/mol/impl/chain_impl.hh> #include <ost/mol/entity_handle.hh> -using boost::bind; namespace ost { namespace mol { @@ -182,7 +181,7 @@ ResidueView ChainView::FindResidue(const ResNum& number) const { return ResidueView(); } else { i=std::find_if(l.begin(), l.end(), - bind(&ResidueView::GetNumber, _1)==number); + bind(&ResidueView::GetNumber, boost::placeholders::_1)==number); return i==data_->residues.end() ? ResidueView() : *i; } } @@ -310,7 +309,7 @@ ResidueView ChainView::AddResidue(const ResidueView& residue_view, void ChainView::RemoveResidues() { this->CheckValidity(); std::for_each(data_->residues.begin(), data_->residues.end(), - bind(&ResidueView::RemoveAtoms, _1)); + bind(&ResidueView::RemoveAtoms, boost::placeholders::_1)); data_->residues.clear(); data_->handle_to_view.clear(); } @@ -340,7 +339,7 @@ int ChainView::GetResidueIndex(const ResNum& number) const i=p.first; } else { i=std::find_if(data_->residues.begin(), data_->residues.end(), - bind(&ResidueView::GetNumber, _1)==number); + bind(&ResidueView::GetNumber, boost::placeholders::_1)==number); } return i==data_->residues.end() ? -1 : i-data_->residues.begin(); diff --git a/modules/mol/base/src/entity_view.cc b/modules/mol/base/src/entity_view.cc index 26cfa75e3f44a780814e2a9a44b5c8a3b5499569..c28b7aae500cbcf8fca9fbe9362dd4e72ed0695a 100644 --- a/modules/mol/base/src/entity_view.cc +++ b/modules/mol/base/src/entity_view.cc @@ -22,7 +22,7 @@ */ #include <algorithm> -#include <boost/bind.hpp> +#include <boost/bind/bind.hpp> #include <boost/logic/tribool.hpp> #include <ost/log.hh> @@ -44,7 +44,6 @@ using boost::logic::tribool; using boost::logic::indeterminate; -using boost::bind; @@ -266,7 +265,7 @@ ChainView EntityView::FindChain(const String& chain_name) const{ this->CheckValidity(); ChainViewList::const_iterator i; i=std::find_if(data_->chains.begin(), data_->chains.end(), - boost::bind(&ChainView::GetName, _1)==chain_name); + boost::bind(&ChainView::GetName, boost::placeholders::_1)==chain_name); return (i!=data_->chains.end()) ? *i : ChainView(); } @@ -428,7 +427,7 @@ ChainView EntityView::ViewForHandle(const ChainHandle& chain) const { this->CheckValidity(); ChainViewList::const_iterator i; i=std::find_if(data_->chains.begin(), data_->chains.end(), - bind(&ChainView::GetHandle, _1)==chain); + bind(&ChainView::GetHandle, boost::placeholders::_1)==chain); return (i!=data_->chains.end()) ? *i : ChainView(); } diff --git a/modules/mol/base/src/impl/atom_impl.cc b/modules/mol/base/src/impl/atom_impl.cc index 73d0d5e6a90c6fddcd763b62eb333fc33343f1bf..9c5642eafc12d70f32be6c47f710f539c908dd9a 100644 --- a/modules/mol/base/src/impl/atom_impl.cc +++ b/modules/mol/base/src/impl/atom_impl.cc @@ -29,10 +29,9 @@ #include "chain_impl.hh" #include "torsion_impl.hh" #include <ost/mol/entity_visitor.hh> -#include <boost/bind.hpp> +#include <boost/bind/bind.hpp> #include <algorithm> -using boost::bind; namespace ost { namespace mol { namespace impl { @@ -375,7 +374,7 @@ void AtomImpl::DeleteAllTorsions() { TorsionImplList& l = (*i)->GetTorsionList(); TorsionImplList::iterator j; j=std::remove_if(l.begin(), l.end(), - bind(&TorsionImpl::IsAtomInvolved, _1, shared_from_this())); + bind(&TorsionImpl::IsAtomInvolved, boost::placeholders::_1, shared_from_this())); l.erase(j, l.end()); } } diff --git a/modules/mol/base/src/impl/chain_impl.cc b/modules/mol/base/src/impl/chain_impl.cc index d07bc6436a2a69c06eda8c2e2178093cac54a73c..ca2aeaad7c5df77bf7f2d2860311df43f9507ae4 100644 --- a/modules/mol/base/src/impl/chain_impl.cc +++ b/modules/mol/base/src/impl/chain_impl.cc @@ -23,11 +23,10 @@ #include "entity_impl.hh" #include <ost/mol/impl/atom_impl.hh> #include <ost/mol/entity_visitor.hh> -#include <boost/bind.hpp> +#include <boost/bind/bind.hpp> #include <algorithm> #include <numeric> -using boost::bind; using std::accumulate; namespace ost { namespace mol { namespace impl { @@ -380,7 +379,7 @@ int ChainImpl::GetIndexForResNum(const ResNum& number) const ResidueImplList::const_iterator k; k=std::find_if(residue_list_.begin(), residue_list_.end(), - bind(&ResidueImpl::GetNumber, _1)==number); + bind(&ResidueImpl::GetNumber, boost::placeholders::_1)==number); if (k==residue_list_.end()) return -1; @@ -426,7 +425,7 @@ int ChainImpl::GetIndex(const ResidueImplPtr& res) const ResidueImplList::const_iterator k=residue_list_.begin()-1; do { k=std::find_if(k+1, residue_list_.end(), - bind(&ResidueImpl::GetNumber, _1)==number); + bind(&ResidueImpl::GetNumber, boost::placeholders::_1)==number); } while(k!=residue_list_.end() && (*k)!=res); if (k==residue_list_.end()) diff --git a/modules/mol/base/src/impl/residue_impl.cc b/modules/mol/base/src/impl/residue_impl.cc index c4ddfbe36e3dcfa59451f54758aa95b0c186dffd..819c7294dea5a4ca9bedb5c5c97a652b0a34de8e 100644 --- a/modules/mol/base/src/impl/residue_impl.cc +++ b/modules/mol/base/src/impl/residue_impl.cc @@ -23,12 +23,10 @@ #include "residue_impl.hh" #include "atom_impl.hh" #include "entity_impl.hh" -#include <boost/bind.hpp> #include <algorithm> #include "torsion_impl.hh" #include <ost/mol/impl/connector_impl.hh> -using boost::bind; namespace ost { namespace mol { namespace impl { diff --git a/modules/mol/base/src/residue_view.cc b/modules/mol/base/src/residue_view.cc index ee463fe1a62b4e58f465afbedb20a650faf27a9b..db550340700e16951cd1dc5a5ca3a6bb0a13c86e 100644 --- a/modules/mol/base/src/residue_view.cc +++ b/modules/mol/base/src/residue_view.cc @@ -19,7 +19,7 @@ #include <algorithm> #include <limits> -#include <boost/bind.hpp> +#include <boost/bind/bind.hpp> #include <ost/log.hh> #include <ost/mol/bond_handle.hh> #include <ost/mol/chain_view.hh> @@ -32,7 +32,6 @@ #include "residue_view.hh" #include "residue_handle.hh" -using boost::bind; namespace ost { namespace mol { @@ -114,7 +113,7 @@ AtomView ResidueView::FindAtom(const String& atom_name) const { this->CheckValidity(); const AtomViewList& l=data_->atoms; AtomViewList::const_iterator i; - i=std::find_if(l.begin(), l.end(), boost::bind(&AtomView::GetName, _1)==atom_name); + i=std::find_if(l.begin(), l.end(), boost::bind(&AtomView::GetName, boost::placeholders::_1)==atom_name); return i==data_->atoms.end() ? AtomView() : *i; } @@ -122,7 +121,7 @@ AtomView ResidueView::ViewForHandle(const AtomHandle& handle) const { this->CheckValidity(); const AtomViewList& l=data_->atoms; AtomViewList::const_iterator i; - i=std::find_if(l.begin(), l.end(), bind(&AtomView::GetHandle, _1)==handle); + i=std::find_if(l.begin(), l.end(), bind(&AtomView::GetHandle, boost::placeholders::_1)==handle); return i==data_->atoms.end() ? AtomView() : *i; } @@ -166,7 +165,7 @@ void ResidueView::RemoveAtoms() { this->CheckValidity(); std::for_each(data_->atoms.begin(), data_->atoms.end(), - bind(&AtomView::RemoveBonds, _1)); + bind(&AtomView::RemoveBonds, boost::placeholders::_1)); AtomViewList::iterator i; EntityView ev=this->GetEntity(); for (i=data_->atoms.begin(); i!=data_->atoms.end(); ++i) { diff --git a/modules/seq/base/src/sequence_op.cc b/modules/seq/base/src/sequence_op.cc index b6a5dfda5c886bf63af15de16eea13cab607b72d..3bf3efaabab1b9120a4cee211656922971309788 100644 --- a/modules/seq/base/src/sequence_op.cc +++ b/modules/seq/base/src/sequence_op.cc @@ -19,14 +19,12 @@ #include <sstream> #include <numeric> -#include <boost/bind.hpp> #include <ost/mol/mol.hh> #include "sequence_op.hh" -using boost::bind; namespace ost { namespace seq {