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 #5

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: 9 additions & 4 deletions include/lsst/daf/base/Citizen.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
#include <vector>
#include <typeinfo>

#include "boost/noncopyable.hpp"


namespace lsst {
namespace daf {
namespace base {
Expand Down Expand Up @@ -129,10 +126,18 @@ namespace base {
*
* @sa Citizen::markPersistent()
*/
class PersistentCitizenScope : private boost::noncopyable {
class PersistentCitizenScope {
public:
PersistentCitizenScope();
~PersistentCitizenScope();

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

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

Expand Down
17 changes: 10 additions & 7 deletions include/lsst/daf/base/PropertySet.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
#include <vector>

#include "boost/any.hpp"
#include "boost/noncopyable.hpp"

#include "lsst/daf/base/Citizen.h"
#include "lsst/daf/base/Persistable.h"
Expand All @@ -80,12 +79,7 @@ namespace base {
#pragma warning (disable: 444)
#endif

class PropertySet :
public Persistable, public Citizen
#ifndef SWIG
, public boost::noncopyable
#endif
{
class PropertySet : public Persistable, public Citizen {
public:
// Typedefs
typedef std::shared_ptr<PropertySet> Ptr;
Expand All @@ -95,6 +89,15 @@ class PropertySet :
explicit PropertySet(bool flat=false);
virtual ~PropertySet(void);

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

// No moving
PropertySet (PropertySet&&) = delete;
PropertySet& operator=(PropertySet&&) = delete;
#endif
// Accessors
virtual Ptr deepCopy(void) const;
// Returns a PropertySet::Ptr pointing to a new deep copy.
Expand Down