Skip to content

Commit

Permalink
[Tf] Remove boost/noncopyable
Browse files Browse the repository at this point in the history
  • Loading branch information
superfunc committed Aug 4, 2019
1 parent 7b4c757 commit c1f0039
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 15 deletions.
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

0 comments on commit c1f0039

Please sign in to comment.