Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of boost::noncopyable #23

Merged
merged 1 commit into from
May 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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