Skip to content

Commit

Permalink
Merge pull request #23 from lsst/tickets/DM-6092
Browse files Browse the repository at this point in the history
Remove use of boost::noncopyable
  • Loading branch information
Pim Schellart authored and Pim Schellart committed May 28, 2016
2 parents d23feb1 + 1a51d72 commit e40f846
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
13 changes: 10 additions & 3 deletions include/lsst/meas/modelfit/Likelihood.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ namespace lsst { namespace meas { namespace modelfit {
* rather than per-pixel weights, but will will still use a vector to represent it.
*/
class Likelihood
#ifndef SWIG
: private boost::noncopyable
#endif
{
public:

Expand Down Expand Up @@ -128,6 +125,16 @@ class Likelihood

virtual ~Likelihood() {}

#ifndef SWIG
// No copying
Likelihood ( const Likelihood & ) = delete;
Likelihood & operator= ( const Likelihood & ) = delete;

// No moving
Likelihood ( Likelihood && ) = delete;
Likelihood & operator= ( Likelihood && ) = delete;
#endif

protected:

Likelihood(PTR(Model) model, ndarray::Array<Scalar const,1,1> const & fixed) :
Expand Down
12 changes: 9 additions & 3 deletions include/lsst/meas/modelfit/Model.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

#include <vector>

#include "boost/noncopyable.hpp"

#include "lsst/base.h"
#include "lsst/afw/geom/ellipses/Ellipse.h"
#include "lsst/shapelet/MultiShapeletBasis.h"
Expand Down Expand Up @@ -55,7 +53,7 @@ typedef std::vector<PTR(Model)> ModelVector;
* A few private concrete subclasses of Model have been provided that will meet most needs;
* instances can be constructed via the make() and makeGaussian()
*/
class Model : private boost::noncopyable {
class Model {
public:

enum CenterEnum {
Expand Down Expand Up @@ -256,6 +254,14 @@ class Model : private boost::noncopyable {

virtual ~Model() {}

// No copying
Model (const Model&) = delete;
Model& operator=(const Model&) = delete;

// No moving
Model (Model&&) = delete;
Model& operator=(Model&&) = delete;

protected:

Model(
Expand Down
10 changes: 9 additions & 1 deletion include/lsst/meas/modelfit/Prior.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace lsst { namespace meas { namespace modelfit {
/**
* @brief Base class for Bayesian priors
*/
class Prior: private boost::noncopyable {
class Prior {
public:

std::string const & getTag() const { return _tag; }
Expand Down Expand Up @@ -160,6 +160,14 @@ class Prior: private boost::noncopyable {

virtual ~Prior() {}

// No copying
Prior (const Prior&) = delete;
Prior& operator=(const Prior&) = delete;

// No moving
Prior (Prior&&) = delete;
Prior& operator=(Prior&&) = delete;

protected:

explicit Prior(std::string const & tag="") : _tag(tag) {}
Expand Down
10 changes: 9 additions & 1 deletion src/Mixture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ void Mixture::_stream(std::ostream & os) const {

namespace {

class MixturePersistenceKeys : private boost::noncopyable {
class MixturePersistenceKeys {
public:
tbl::Schema schema;
tbl::Key<Scalar> weight;
Expand All @@ -441,6 +441,14 @@ class MixturePersistenceKeys : private boost::noncopyable {
mu(schema["mu"]),
sigma(schema["sigma"])
{}

// No copying
MixturePersistenceKeys (const MixturePersistenceKeys&) = delete;
MixturePersistenceKeys& operator=(const MixturePersistenceKeys&) = delete;

// No moving
MixturePersistenceKeys (MixturePersistenceKeys&&) = delete;
MixturePersistenceKeys& operator=(MixturePersistenceKeys&&) = delete;
};

class MixtureFactory : public tbl::io::PersistableFactory {
Expand Down

0 comments on commit e40f846

Please sign in to comment.