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

[Usd] Boost Noncopyable #645

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2bb0436
[Imaging] Remove unnecessary boost::noncopyable
superfunc Jan 23, 2018
4c6aeed
[Pcp] Replace boost noncopyable
superfunc May 7, 2018
86441e0
[Sdf] Remove boost/noncopyable
superfunc Sep 13, 2018
ae548cc
[Sdf] Remove boost/noncopyable.
superfunc Sep 15, 2018
740f0f3
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
e8117cc
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
ecbc190
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
321dc73
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
ad5b872
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
692fabf
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
0e81f8e
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
223a3ab
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
7456ca1
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
39a2efc
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
5479773
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
5839e0a
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
94103c8
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
6855a4e
[Sdf] Remove boost/noncopyable
superfunc Sep 15, 2018
e301987
[Sdf] Remove boost/noncopyable.
superfunc Sep 15, 2018
1210d69
[Sdf] Remove boost/noncopyable
superfunc Sep 16, 2018
29c2289
[Plug] Remove unused boost include
superfunc Sep 20, 2018
e7c3014
[Kind] Remove unnecessary boost
superfunc Sep 20, 2018
a3fe307
[UsdImaging] Add required default ctor
superfunc Oct 9, 2018
9f15094
[UsdMaya] Remove boost/noncopyable usage
superfunc Oct 9, 2018
7b4c757
[UsdAbc] Remove boost/noncopyable usage
superfunc Oct 9, 2018
c1f0039
[Tf] Remove boost/noncopyable
superfunc Oct 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pxr/base/lib/plug/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "pxr/base/tf/refPtr.h"
#include "pxr/base/tf/weakPtr.h"

#include <boost/noncopyable.hpp>
#include <atomic>
#include <string>
#include <utility>
Expand Down
8 changes: 5 additions & 3 deletions pxr/base/lib/tf/atomicOfstreamWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#include "pxr/pxr.h"
#include "pxr/base/tf/api.h"

#include <boost/noncopyable.hpp>

#include <fstream>
#include <string>

Expand Down Expand Up @@ -76,12 +74,16 @@ PXR_NAMESPACE_OPEN_SCOPE
/// // called, and the temporary file is removed.
/// \endcode
///
class TfAtomicOfstreamWrapper : boost::noncopyable
class TfAtomicOfstreamWrapper
{
public:
/// Constructor.
TF_API explicit TfAtomicOfstreamWrapper(const std::string& filePath);

// Disallow copies
TfAtomicOfstreamWrapper(const TfAtomicOfstreamWrapper&) = delete;
TfAtomicOfstreamWrapper& operator=(const TfAtomicOfstreamWrapper&) = delete;

/// Destructor. Calls Cancel().
TF_API ~TfAtomicOfstreamWrapper();

Expand Down
6 changes: 5 additions & 1 deletion pxr/base/lib/tf/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ static const char* _helpMsg =
"enables debugging for any symbol in STAF, all symbols in SIC except for\n"
"SIC_REGISTRY_ENUMS and the symbol GPT_IK.\n";

class ARCH_HIDDEN Tf_DebugSymbolRegistry : boost::noncopyable {
class ARCH_HIDDEN Tf_DebugSymbolRegistry {
public:
// Disallow copies
Tf_DebugSymbolRegistry(const Tf_DebugSymbolRegistry&) = delete;
Tf_DebugSymbolRegistry& operator=(const Tf_DebugSymbolRegistry&) = delete;

static Tf_DebugSymbolRegistry& _GetInstance() {
return TfSingleton<Tf_DebugSymbolRegistry>::GetInstance();
}
Expand Down
7 changes: 5 additions & 2 deletions pxr/base/lib/tf/enum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

#include "pxr/base/arch/demangle.h"

#include <boost/noncopyable.hpp>
#include "pxr/base/tf/hashmap.h"

#include <tbb/spin_mutex.h>
Expand All @@ -62,8 +61,12 @@ typedef TfHashMap<string, TfEnum, TfHash> _NameToEnumTableType;
typedef TfHashMap<string, vector<string>, TfHash> _TypeNameToNameVectorTableType;
typedef TfHashMap<string, const type_info *, TfHash> _TypeNameToTypeTableType;

class Tf_EnumRegistry : boost::noncopyable {
class Tf_EnumRegistry {
private:
// Disallow copies
Tf_EnumRegistry(const Tf_EnumRegistry&) = delete;
Tf_EnumRegistry& operator=(const Tf_EnumRegistry&) = delete;

static Tf_EnumRegistry& _GetInstance() {
return TfSingleton<Tf_EnumRegistry>::GetInstance();
}
Expand Down
9 changes: 5 additions & 4 deletions pxr/base/lib/tf/errorMark.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#include "pxr/base/tf/errorTransport.h"
#include "pxr/base/tf/api.h"

#include <boost/noncopyable.hpp>

PXR_NAMESPACE_OPEN_SCOPE

/// \class TfErrorMark
Expand Down Expand Up @@ -63,10 +61,9 @@ PXR_NAMESPACE_OPEN_SCOPE
/// }
/// \endcode
///
class TfErrorMark : boost::noncopyable
class TfErrorMark
{
public:

typedef TfDiagnosticMgr::ErrorIterator Iterator;

/// Default constructor.
Expand All @@ -75,6 +72,10 @@ class TfErrorMark : boost::noncopyable
/// of declaration.
TF_API TfErrorMark();

// Disallow copies
TfErrorMark(const TfErrorMark&) = delete;
TfErrorMark& operator=(const TfErrorMark&) = delete;

/// Destroy this ErrorMark.
///
/// If this is the last ErrorMark on this thread of execution and there
Expand Down
1 change: 0 additions & 1 deletion pxr/base/lib/tf/fileUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

#include <boost/assign.hpp>
#include <boost/functional/hash.hpp>
#include <boost/noncopyable.hpp>
#include "pxr/base/tf/hashset.h"

#include <set>
Expand Down
8 changes: 5 additions & 3 deletions pxr/base/lib/tf/noticeRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
#include "pxr/base/tf/singleton.h"
#include "pxr/base/tf/type.h"

#include <boost/noncopyable.hpp>

#include <tbb/enumerable_thread_specific.h>
#include <tbb/spin_mutex.h>
#include <atomic>
Expand Down Expand Up @@ -68,8 +66,12 @@ PXR_NAMESPACE_OPEN_SCOPE
/// registry, since multiple active traversals (either by different threads,
/// or because of reentrancy) should be rare.
///
class Tf_NoticeRegistry : boost::noncopyable {
class Tf_NoticeRegistry {
public:
// Disallow copies
Tf_NoticeRegistry(const Tf_NoticeRegistry&) = delete;
Tf_NoticeRegistry& operator=(const Tf_NoticeRegistry&) = delete;

TF_API
void _BeginDelivery(const TfNotice &notice,
const TfWeakBase *sender,
Expand Down
1 change: 0 additions & 1 deletion pxr/base/lib/tf/patternMatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ PXR_NAMESPACE_OPEN_SCOPE
///
class TfPatternMatcher
{

public:

/// Construct an empty (invalid) TfPatternMatcher.
Expand Down
1 change: 0 additions & 1 deletion pxr/imaging/lib/cameraUtil/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
#include <boost/mpl/pop_front.hpp>
#include <boost/mpl/remove.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/noncopyable.hpp>
#include <boost/operators.hpp>
#include <boost/optional.hpp>
#include <boost/preprocessor/arithmetic/add.hpp>
Expand Down
12 changes: 8 additions & 4 deletions pxr/imaging/lib/glf/baseTextureData.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,25 @@
#include "pxr/base/tf/refPtr.h"
#include "pxr/base/tf/weakPtr.h"

#include <boost/noncopyable.hpp>

PXR_NAMESPACE_OPEN_SCOPE


TF_DECLARE_WEAK_AND_REF_PTRS(GlfBaseTextureData);

class GlfBaseTextureData : public TfRefBase,
public TfWeakBase,
boost::noncopyable
public TfWeakBase
{
public:
GLF_API
virtual ~GlfBaseTextureData();

GLF_API
GlfBaseTextureData() = default;

// Disallow copies
GlfBaseTextureData(const GlfBaseTextureData&) = delete;
GlfBaseTextureData& operator=(const GlfBaseTextureData&) = delete;

struct WrapInfo {
WrapInfo() :
hasWrapModeS(false), hasWrapModeT(false),
Expand Down
8 changes: 5 additions & 3 deletions pxr/imaging/lib/glf/contextCaps.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
#include "pxr/imaging/glf/api.h"
#include "pxr/base/tf/singleton.h"

#include <boost/noncopyable.hpp>

PXR_NAMESPACE_OPEN_SCOPE


Expand All @@ -56,7 +54,7 @@ PXR_NAMESPACE_OPEN_SCOPE
/// subscribe to when the caps changes, so they can
/// update and invalidate.
///
class GlfContextCaps : boost::noncopyable {
class GlfContextCaps {
public:

/// InitInstance queries the GL context for its capabilities.
Expand All @@ -74,6 +72,10 @@ class GlfContextCaps : boost::noncopyable {



// Disallow copies
GlfContextCaps(const GlfContextCaps&) = delete;
GlfContextCaps& operator=(const GlfContextCaps&) = delete;

// GL version
int glVersion; // 400 (4.0), 410 (4.1), ...

Expand Down
21 changes: 17 additions & 4 deletions pxr/imaging/lib/glf/glContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "pxr/pxr.h"
#include "pxr/imaging/glf/api.h"
#include "pxr/base/arch/threads.h"
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>

PXR_NAMESPACE_OPEN_SCOPE
Expand All @@ -49,11 +48,15 @@ typedef boost::shared_ptr<class GlfGLContext> GlfGLContextSharedPtr;
/// This mechanism depends on the application code registering callbacks to
/// provide access to its GL contexts.
///
class GlfGLContext : public boost::noncopyable {
class GlfGLContext {
public:
GLF_API
virtual ~GlfGLContext();

// Disallow copies
GlfGLContext(const GlfGLContext&) = delete;
GlfGLContext& operator=(const GlfGLContext&) = delete;

/// Returns an instance for the current GL context.
GLF_API
static GlfGLContextSharedPtr GetCurrentGLContext();
Expand Down Expand Up @@ -162,13 +165,17 @@ class GlfGLContext : public boost::noncopyable {
/// The underlying calls to make GL contexts current can be moderately
/// expensive. So, this mechanism should be used carefully.
///
class GlfGLContextScopeHolder : boost::noncopyable {
class GlfGLContextScopeHolder {
public:
/// Make the given context current and restore the current context
/// when this object is destroyed.
GLF_API
explicit GlfGLContextScopeHolder(const GlfGLContextSharedPtr& newContext);

// Disallow copies
GlfGLContextScopeHolder(const GlfGLContextScopeHolder&) = delete;
GlfGLContextScopeHolder& operator=(const GlfGLContextScopeHolder&) = delete;

GLF_API
~GlfGLContextScopeHolder();

Expand Down Expand Up @@ -249,11 +256,17 @@ class GlfSharedGLContextScopeHolder : private GlfGLContextScopeHolder {
/// If you subclass GlfGLContext you should subclass this type and
/// instantiate an instance on the heap. It will be cleaned up
/// automatically.
class GlfGLContextRegistrationInterface : boost::noncopyable {
class GlfGLContextRegistrationInterface {
public:
GLF_API
virtual ~GlfGLContextRegistrationInterface();

// Disallow copies
GlfGLContextRegistrationInterface(
const GlfGLContextRegistrationInterface&) = delete;
GlfGLContextRegistrationInterface& operator=(
const GlfGLContextRegistrationInterface&) = delete;

/// If this GLContext system supports a shared context this should
/// return it. This will be called at most once.
virtual GlfGLContextSharedPtr GetShared() = 0;
Expand Down
7 changes: 5 additions & 2 deletions pxr/imaging/lib/glf/glContextRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "pxr/pxr.h"
#include "pxr/imaging/glf/glContext.h"
#include "pxr/base/tf/singleton.h"
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/scoped_ptr.hpp>
Expand All @@ -46,8 +45,12 @@ typedef boost::shared_ptr<class GlfGLContext> GlfGLContextSharedPtr;
///
/// Registry of GlfGLContexts.
///
class GlfGLContextRegistry : boost::noncopyable {
class GlfGLContextRegistry {
public:
// Disallow copies
GlfGLContextRegistry(const GlfGLContextRegistry&) = delete;
GlfGLContextRegistry& operator=(const GlfGLContextRegistry&) = delete;

static GlfGLContextRegistry& GetInstance()
{
return TfSingleton<GlfGLContextRegistry>::GetInstance();
Expand Down
16 changes: 10 additions & 6 deletions pxr/imaging/lib/glf/image.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "pxr/base/vt/dictionary.h"
#include "pxr/base/vt/value.h"

#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>

#include <string>
Expand All @@ -51,18 +50,23 @@ typedef boost::shared_ptr<class GlfImage> GlfImageSharedPtr;
///
/// The class allows basic access to texture image file data.
///
class GlfImage : public boost::noncopyable {

class GlfImage {
public:
GLF_API
GlfImage() = default;

// Disallow copies
GlfImage(const GlfImage&) = delete;
GlfImage& operator=(const GlfImage&) = delete;

/// Specifies whether to treat the image origin as the upper-left corner
/// or the lower left
enum ImageOriginLocation
{
OriginUpperLeft,
OriginUpperLeft,
OriginLowerLeft
};
};

/// \class StorageSpec
///
/// Describes the memory layout and storage of a texture image
Expand Down
8 changes: 5 additions & 3 deletions pxr/imaging/lib/glf/simpleShadowArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,23 @@
#include "pxr/base/gf/vec4d.h"
#include "pxr/imaging/garch/gl.h"

#include <boost/noncopyable.hpp>
#include <vector>

PXR_NAMESPACE_OPEN_SCOPE


class GlfSimpleShadowArray : public TfRefBase,
public TfWeakBase,
boost::noncopyable {
public TfWeakBase {
public:
GLF_API
GlfSimpleShadowArray(GfVec2i const & size, size_t numLayers);
GLF_API
virtual ~GlfSimpleShadowArray();

// Disallow copies
GlfSimpleShadowArray(const GlfSimpleShadowArray&) = delete;
GlfSimpleShadowArray& operator=(const GlfSimpleShadowArray&) = delete;

GLF_API
GfVec2i GetSize() const;
GLF_API
Expand Down
7 changes: 5 additions & 2 deletions pxr/imaging/lib/glf/texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <map>
#include <string>
#include <vector>
#include <boost/noncopyable.hpp>

PXR_NAMESPACE_OPEN_SCOPE

Expand All @@ -60,7 +59,7 @@ TF_DECLARE_WEAK_AND_REF_PTRS(GlfTexture);
/// A texture is typically defined by reading texture image data from an image
/// file but a texture might also represent an attachment of a draw target.
///
class GlfTexture : public TfRefBase, public TfWeakBase, boost::noncopyable {
class GlfTexture : public TfRefBase, public TfWeakBase {
public:
/// \class Binding
///
Expand Down Expand Up @@ -90,6 +89,10 @@ class GlfTexture : public TfRefBase, public TfWeakBase, boost::noncopyable {
GLF_API
virtual ~GlfTexture() = 0;

// Disallow copies
GlfTexture(const GlfTexture&) = delete;
GlfTexture& operator=(const GlfTexture&) = delete;

/// Returns the bindings to use this texture for the shader resource
/// named \a identifier. If \a samplerId is specified, the bindings
/// returned will use this samplerId for resources which can be sampled.
Expand Down
Loading