Skip to content

Commit

Permalink
Merge pull request #2323 from jwillemsen/jwi-defaultcopydis
Browse files Browse the repository at this point in the history
Don't use Copy_Disabled, just delete the methods, use default for var…
  • Loading branch information
jwillemsen authored Feb 5, 2025
2 parents 13acc82 + 2a99115 commit a6a1599
Show file tree
Hide file tree
Showing 75 changed files with 308 additions and 274 deletions.
7 changes: 5 additions & 2 deletions ACE/ACEXML/common/InputSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "ACEXML/common/CharStream.h"
#include "ace/Copy_Disabled.h"

/**
* @class ACEXML_InputSource
Expand Down Expand Up @@ -49,14 +48,18 @@
*
* @sa ACEXML_CharStream
*/
class ACEXML_Export ACEXML_InputSource : private ACE_Copy_Disabled
class ACEXML_Export ACEXML_InputSource
{
public:
/**
* Default constructor.
*/
ACEXML_InputSource ();

ACEXML_InputSource (const ACEXML_InputSource &) = delete;
ACEXML_InputSource (ACEXML_InputSource &&) = delete;
ACEXML_InputSource &operator= (const ACEXML_InputSource &) = delete;
ACEXML_InputSource &operator= (ACEXML_InputSource &&) = delete;

/**
* Create a new input source with a ACEXML_Char stream.
Expand Down
9 changes: 6 additions & 3 deletions ACE/ACEXML/common/LocatorImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "ACEXML/common/Locator.h"
#include "ace/Copy_Disabled.h"

/**
* @class ACEXML_LocatorImpl
Expand Down Expand Up @@ -58,8 +57,7 @@
* @sa ACEXML_Locator
*/
class ACEXML_Export ACEXML_LocatorImpl :
public ACEXML_Locator,
private ACE_Copy_Disabled
public ACEXML_Locator
{
public:
/*
Expand All @@ -81,6 +79,11 @@ class ACEXML_Export ACEXML_LocatorImpl :
*/
ACEXML_LocatorImpl (const ACEXML_Locator& locator);

ACEXML_LocatorImpl (const ACEXML_LocatorImpl &) = delete;
ACEXML_LocatorImpl (ACEXML_LocatorImpl &&) = delete;
ACEXML_LocatorImpl &operator= (const ACEXML_LocatorImpl &) = delete;
ACEXML_LocatorImpl &operator= (ACEXML_LocatorImpl &&) = delete;

/*
* Destructor.
*/
Expand Down
9 changes: 6 additions & 3 deletions ACE/Kokyu/DSRT_CV_Dispatcher_Impl_T.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#define DSRT_CV_DISPATCHER_IMPL_T_H
#include /**/ "ace/pre.h"
#include "ace/Task.h"
#include "ace/Copy_Disabled.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
Expand All @@ -23,8 +22,7 @@ namespace Kokyu
{
template<class DSRT_Scheduler_Traits>
class DSRT_CV_Dispatcher_Impl :
public DSRT_Dispatcher_Impl<DSRT_Scheduler_Traits>,
public ACE_Copy_Disabled
public DSRT_Dispatcher_Impl<DSRT_Scheduler_Traits>
{
public:
typedef typename
Expand All @@ -36,6 +34,11 @@ namespace Kokyu
DSRT_CV_Dispatcher_Impl (ACE_Sched_Params::Policy sched_policy,
int sched_scope);

DSRT_CV_Dispatcher_Impl (const DSRT_CV_Dispatcher_Impl &) = delete;
DSRT_CV_Dispatcher_Impl (DSRT_CV_Dispatcher_Impl &&) = delete;
DSRT_CV_Dispatcher_Impl &operator= (const DSRT_CV_Dispatcher_Impl &) = delete;
DSRT_CV_Dispatcher_Impl &operator= (DSRT_CV_Dispatcher_Impl &&) = delete;

int init_i (const DSRT_ConfigInfo&);

/// Schedule a thread dynamically based on the qos info supplied.
Expand Down
9 changes: 6 additions & 3 deletions ACE/Kokyu/DSRT_Direct_Dispatcher_Impl_T.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/Copy_Disabled.h"
#include "Kokyu_dsrt.h"
#include "DSRT_Sched_Queue_T.h"
#include "DSRT_Dispatcher_Impl_T.h"
Expand All @@ -25,8 +24,7 @@ namespace Kokyu
template<class DSRT_Scheduler_Traits>
class DSRT_Direct_Dispatcher_Impl :
public ACE_Task_Base,
public DSRT_Dispatcher_Impl<DSRT_Scheduler_Traits>,
public ACE_Copy_Disabled
public DSRT_Dispatcher_Impl<DSRT_Scheduler_Traits>
{
public:
typedef typename
Expand All @@ -38,6 +36,11 @@ namespace Kokyu
DSRT_Direct_Dispatcher_Impl (ACE_Sched_Params::Policy sched_policy,
int sched_scope);

DSRT_Direct_Dispatcher_Impl (const DSRT_Direct_Dispatcher_Impl &) = delete;
DSRT_Direct_Dispatcher_Impl (DSRT_Direct_Dispatcher_Impl &&) = delete;
DSRT_Direct_Dispatcher_Impl &operator= (const DSRT_Direct_Dispatcher_Impl &) = delete;
DSRT_Direct_Dispatcher_Impl &operator= (DSRT_Direct_Dispatcher_Impl &&) = delete;

int init_i (const DSRT_ConfigInfo&);

/// Schedule a thread dynamically based on the qos info supplied.
Expand Down
8 changes: 6 additions & 2 deletions ACE/Kokyu/DSRT_Dispatch_Item_T.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#define DSRT_DISPATCH_ITEM_H
#include /**/ "ace/pre.h"
#include "ace/Bound_Ptr.h"
#include "ace/Copy_Disabled.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
Expand All @@ -26,7 +25,7 @@ namespace Kokyu
*/

template <class DSRT_Scheduler_Traits>
class DSRT_Dispatch_Item : private ACE_Copy_Disabled
class DSRT_Dispatch_Item
{
typedef typename
DSRT_Scheduler_Traits::Guid_t Guid_t;
Expand All @@ -43,6 +42,11 @@ namespace Kokyu
public:
DSRT_Dispatch_Item (Guid_t guid, const DSRT_QoSDescriptor&);

DSRT_Dispatch_Item (const DSRT_Dispatch_Item &) = delete;
DSRT_Dispatch_Item (DSRT_Dispatch_Item &&) = delete;
DSRT_Dispatch_Item &operator= (const DSRT_Dispatch_Item &) = delete;
DSRT_Dispatch_Item &operator= (DSRT_Dispatch_Item &&) = delete;

/// Get the guid.
Guid_t guid ();

Expand Down
16 changes: 13 additions & 3 deletions ACE/Kokyu/Kokyu.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#ifndef KOKYU_H
#define KOKYU_H
#include /**/ "ace/pre.h"
#include "ace/Copy_Disabled.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
Expand Down Expand Up @@ -56,9 +55,15 @@ namespace Kokyu
* Dispatcher is the class that users will be using to achieve
* dynamic dispatching of events in an event channel.
*/
class Kokyu_Export Dispatcher : private ACE_Copy_Disabled
class Kokyu_Export Dispatcher
{
public:
Dispatcher () = default;
Dispatcher (const Dispatcher &) = delete;
Dispatcher (Dispatcher &&) = delete;
Dispatcher &operator= (const Dispatcher &) = delete;
Dispatcher &operator= (Dispatcher &&) = delete;

/// Dispatch a command object based on the qos info supplied.
int dispatch (const Dispatch_Command*, const QoSDescriptor&);

Expand Down Expand Up @@ -90,9 +95,14 @@ namespace Kokyu
* Factory class creates a dispatcher for EC and configures the
* interface object with the appropriate implementation.
*/
class Kokyu_Export Dispatcher_Factory : private ACE_Copy_Disabled
class Kokyu_Export Dispatcher_Factory
{
public:
Dispatcher_Factory (const Dispatcher_Factory &) = delete;
Dispatcher_Factory (Dispatcher_Factory &&) = delete;
Dispatcher_Factory &operator= (const Dispatcher_Factory &) = delete;
Dispatcher_Factory &operator= (Dispatcher_Factory &&) = delete;

/**
* Create a dispatcher for dynamic dispatching of commands
* (eg. events). The caller is responsible for freeing the
Expand Down
17 changes: 14 additions & 3 deletions ACE/Kokyu/Kokyu_dsrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#ifndef KOKYU_DSRT_H
#define KOKYU_DSRT_H
#include /**/ "ace/pre.h"
#include "ace/Copy_Disabled.h"

#include "kokyu_export.h"
#include "Kokyu_defs.h"
Expand All @@ -31,7 +30,7 @@ namespace Kokyu
* dynamic scheduling of threads.
*/
template <class DSRT_Scheduler_Traits>
class DSRT_Dispatcher : private ACE_Copy_Disabled
class DSRT_Dispatcher
{
public:
typedef typename DSRT_Scheduler_Traits::Guid_t Guid_t;
Expand Down Expand Up @@ -60,6 +59,13 @@ namespace Kokyu
/// Shut down the dispatcher. The dispatcher will stop processing requests.
int shutdown ();

DSRT_Dispatcher () = default;

DSRT_Dispatcher (const DSRT_Dispatcher &) = delete;
DSRT_Dispatcher (DSRT_Dispatcher &&) = delete;
DSRT_Dispatcher &operator= (const DSRT_Dispatcher &) = delete;
DSRT_Dispatcher &operator= (DSRT_Dispatcher &&) = delete;

/// Non virtual destructor. Read as <b><i>this class not available
/// for inheritance<i></b>.
~DSRT_Dispatcher ();
Expand All @@ -82,9 +88,14 @@ namespace Kokyu
*/

template <class DSRT_Scheduler_Traits>
class DSRT_Dispatcher_Factory : private ACE_Copy_Disabled
class DSRT_Dispatcher_Factory
{
public:
DSRT_Dispatcher_Factory (const DSRT_Dispatcher_Factory &) = delete;
DSRT_Dispatcher_Factory (DSRT_Dispatcher_Factory &&) = delete;
DSRT_Dispatcher_Factory &operator= (const DSRT_Dispatcher_Factory &) = delete;
DSRT_Dispatcher_Factory &operator= (DSRT_Dispatcher_Factory &&) = delete;

typedef std::unique_ptr<DSRT_Dispatcher<DSRT_Scheduler_Traits> > DSRT_Dispatcher_Auto_Ptr;

/**
Expand Down
1 change: 0 additions & 1 deletion ACE/ace/Activation_Queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "ace/Message_Queue.h"
#include "ace/Copy_Disabled.h"
#include "ace/Condition_Thread_Mutex.h"

/// Define to be compatible with the terminology in the POSA2 book!
Expand Down
36 changes: 30 additions & 6 deletions ACE/ace/Caching_Utility_T.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include "ace/Global_Macros.h"
#include "ace/Cleanup_Strategies_T.h"
#include "ace/Copy_Disabled.h"

ACE_BEGIN_VERSIONED_NAMESPACE_DECL

Expand All @@ -40,7 +39,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
* entries to be cleaned up will be delegated.
*/
template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
class ACE_Pair_Caching_Utility : private ACE_Copy_Disabled
class ACE_Pair_Caching_Utility
{
public:
typedef ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY;
Expand All @@ -52,6 +51,11 @@ class ACE_Pair_Caching_Utility : private ACE_Copy_Disabled
/// Destructor.
~ACE_Pair_Caching_Utility ();

ACE_Pair_Caching_Utility (const ACE_Pair_Caching_Utility &) = delete;
ACE_Pair_Caching_Utility (ACE_Pair_Caching_Utility &&) = delete;
ACE_Pair_Caching_Utility &operator= (const ACE_Pair_Caching_Utility &) = delete;
ACE_Pair_Caching_Utility &operator= (ACE_Pair_Caching_Utility &&) = delete;

/**
* Purge entries from the @a container. The Cleanup_Strategy will do the
* actual job of cleanup once the entries to be cleaned up are decided.
Expand Down Expand Up @@ -87,7 +91,7 @@ class ACE_Pair_Caching_Utility : private ACE_Copy_Disabled
* be cleaned up will be delegated.
*/
template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
class ACE_Recyclable_Handler_Caching_Utility : private ACE_Copy_Disabled
class ACE_Recyclable_Handler_Caching_Utility
{
public:
typedef ACE_Recyclable_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY;
Expand All @@ -100,6 +104,11 @@ class ACE_Recyclable_Handler_Caching_Utility : private ACE_Copy_Disabled
/// Destructor.
~ACE_Recyclable_Handler_Caching_Utility ();

ACE_Recyclable_Handler_Caching_Utility (const ACE_Recyclable_Handler_Caching_Utility &) = delete;
ACE_Recyclable_Handler_Caching_Utility (ACE_Recyclable_Handler_Caching_Utility &&) = delete;
ACE_Recyclable_Handler_Caching_Utility &operator= (const ACE_Recyclable_Handler_Caching_Utility &) = delete;
ACE_Recyclable_Handler_Caching_Utility &operator= (ACE_Recyclable_Handler_Caching_Utility &&) = delete;

/**
* Purge entries from the @a container. The Cleanup_Strategy will do
* the actual job of cleanup once the entries to be cleaned up are
Expand Down Expand Up @@ -137,7 +146,7 @@ class ACE_Recyclable_Handler_Caching_Utility : private ACE_Copy_Disabled
* delegated.
*/
template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
class ACE_Refcounted_Recyclable_Handler_Caching_Utility : private ACE_Copy_Disabled
class ACE_Refcounted_Recyclable_Handler_Caching_Utility
{
public:
typedef ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY;
Expand All @@ -150,6 +159,11 @@ class ACE_Refcounted_Recyclable_Handler_Caching_Utility : private ACE_Copy_Disab
/// Destructor.
~ACE_Refcounted_Recyclable_Handler_Caching_Utility ();

ACE_Refcounted_Recyclable_Handler_Caching_Utility (const ACE_Refcounted_Recyclable_Handler_Caching_Utility &) = delete;
ACE_Refcounted_Recyclable_Handler_Caching_Utility (ACE_Refcounted_Recyclable_Handler_Caching_Utility &&) = delete;
ACE_Refcounted_Recyclable_Handler_Caching_Utility &operator= (const ACE_Refcounted_Recyclable_Handler_Caching_Utility &) = delete;
ACE_Refcounted_Recyclable_Handler_Caching_Utility &operator= (ACE_Refcounted_Recyclable_Handler_Caching_Utility &&) = delete;

/**
* Purge entries from the @a container. The Cleanup_Strategy will do
* the actual job of cleanup once the entries to be cleaned up are
Expand Down Expand Up @@ -193,7 +207,7 @@ class ACE_Refcounted_Recyclable_Handler_Caching_Utility : private ACE_Copy_Disab
* class to which the entries to be cleaned up will be delegated.
*/
template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
class ACE_Handler_Caching_Utility : private ACE_Copy_Disabled
class ACE_Handler_Caching_Utility
{
public:
typedef ACE_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY;
Expand All @@ -203,6 +217,11 @@ class ACE_Handler_Caching_Utility : private ACE_Copy_Disabled
ACE_Handler_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy = 0,
bool delete_cleanup_strategy = false);

ACE_Handler_Caching_Utility (const ACE_Handler_Caching_Utility &) = delete;
ACE_Handler_Caching_Utility (ACE_Handler_Caching_Utility &&) = delete;
ACE_Handler_Caching_Utility &operator= (const ACE_Handler_Caching_Utility &) = delete;
ACE_Handler_Caching_Utility &operator= (ACE_Handler_Caching_Utility &&) = delete;

/// Destructor.
~ACE_Handler_Caching_Utility ();

Expand Down Expand Up @@ -246,7 +265,7 @@ class ACE_Handler_Caching_Utility : private ACE_Copy_Disabled
* be cleaned up will be delegated.
*/
template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
class ACE_Null_Caching_Utility : private ACE_Copy_Disabled
class ACE_Null_Caching_Utility
{
public:
typedef ACE_Null_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY;
Expand All @@ -256,6 +275,11 @@ class ACE_Null_Caching_Utility : private ACE_Copy_Disabled
ACE_Null_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy = 0,
bool delete_cleanup_strategy = false);

ACE_Null_Caching_Utility (const ACE_Null_Caching_Utility &) = delete;
ACE_Null_Caching_Utility (ACE_Null_Caching_Utility &&) = delete;
ACE_Null_Caching_Utility &operator= (const ACE_Null_Caching_Utility &) = delete;
ACE_Null_Caching_Utility &operator= (ACE_Null_Caching_Utility &&) = delete;

/// Destructor.
~ACE_Null_Caching_Utility ();

Expand Down
12 changes: 0 additions & 12 deletions ACE/ace/Cleanup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ ACE_Cleanup::cleanup (void *)
delete this;
}

ACE_Cleanup::~ACE_Cleanup ()
{
}

/*****************************************************************************/

extern "C" void
Expand Down Expand Up @@ -82,14 +78,6 @@ ACE_Cleanup_Info_Node::operator!= (const ACE_Cleanup_Info_Node &o) const

/*****************************************************************************/

ACE_OS_Exit_Info::ACE_OS_Exit_Info ()
{
}

ACE_OS_Exit_Info::~ACE_OS_Exit_Info ()
{
}

int
ACE_OS_Exit_Info::at_exit_i (void *object,
ACE_CLEANUP_FUNC cleanup_hook,
Expand Down
Loading

0 comments on commit a6a1599

Please sign in to comment.