diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-08 19:23:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 19:23:32 +0100 |
commit | 61cd647874bd1717fe2854421dce3d42fdb04c57 (patch) | |
tree | 96c0a8a0e80d45a727a29d1a13a7492fdfabcc12 | |
parent | e05eb413c59f589e7d4192af7e12eb777017bd70 (diff) | |
parent | e3a8449f8c7335667a4b8fcf24648acb5ce6e372 (diff) | |
download | ATCD-61cd647874bd1717fe2854421dce3d42fdb04c57.tar.gz |
Merge pull request #1339 from jwillemsen/jwi-acetests-using
Modernize ACE tests with using instead of typedef
84 files changed, 302 insertions, 440 deletions
diff --git a/ACE/tests/Array_Map_Test.cpp b/ACE/tests/Array_Map_Test.cpp index 5aad75f3a7e..2e48f16b4d4 100644 --- a/ACE/tests/Array_Map_Test.cpp +++ b/ACE/tests/Array_Map_Test.cpp @@ -43,7 +43,7 @@ bool insertion_removal_test () { // Instantiate the map. - typedef ACE_Array_Map<char, ACE_TString> Map; + using Map = ACE_Array_Map<char, ACE_TString>; Map phonetic[2]; ACE_TEST_ASSERT (phonetic[0] == phonetic[1]); // Sanity check. @@ -223,7 +223,7 @@ bool index_operator_test () { // Instantiate the map. - typedef ACE_Array_Map<char, ACE_TString> Map; + using Map = ACE_Array_Map<char, ACE_TString>; Map phonetic; ACE_TEST_ASSERT (phonetic.size () == 0 && phonetic.is_empty ()); @@ -250,7 +250,7 @@ index_operator_test () ACE_TEST_ASSERT (phonetic.size () == letters_len); - typedef Map::const_iterator const_iterator; + using const_iterator = Map::const_iterator; // Access the elements that were inserted into the map. char const * letter = letters; @@ -281,7 +281,7 @@ index_operator_test () ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("... in reverse ...\n"))); - typedef Map::const_reverse_iterator const_reverse_iterator; + using const_reverse_iterator = Map::const_reverse_iterator; letter = letters + letters_len - 1; word = words + words_len - 1; @@ -392,7 +392,7 @@ private: bool reference_count_test () { - typedef ACE_Array_Map<ACE_TString, RefCounted> Map; + using Map = ACE_Array_Map<ACE_TString, RefCounted>; static Map::size_type const CAPACITY = 30; diff --git a/ACE/tests/Auto_IncDec_Test.cpp b/ACE/tests/Auto_IncDec_Test.cpp index db61c42a77c..e075af5f713 100644 --- a/ACE/tests/Auto_IncDec_Test.cpp +++ b/ACE/tests/Auto_IncDec_Test.cpp @@ -24,7 +24,7 @@ // Default number of threads. static size_t n_threads = 15; -typedef ACE_Atomic_Op<ACE_Thread_Mutex, int> INTERLOCKED_INT; +using INTERLOCKED_INT = ACE_Atomic_Op<ACE_Thread_Mutex, int>; static INTERLOCKED_INT current_threads_in_first_section; static INTERLOCKED_INT current_threads_in_second_section; diff --git a/ACE/tests/Based_Pointer_Test.cpp b/ACE/tests/Based_Pointer_Test.cpp index 064d5885d29..93888ff3741 100644 --- a/ACE/tests/Based_Pointer_Test.cpp +++ b/ACE/tests/Based_Pointer_Test.cpp @@ -56,11 +56,10 @@ class Void_Pointer : public ACE_Based_Pointer<void> #endif /* ACE_WIN32 */ // Declare the type of the DLL symbol: -typedef void *(*Get_Bp_Repository_Inst)(); +using Get_Bp_Repository_Inst = void *(*)(); // Declare an allocator based MMAP_Memory_Pool -typedef ACE_Malloc_T< ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex, ACE_PI_Control_Block - > MMAP_Allocator; +using MMAP_Allocator = ACE_Malloc_T<ACE_MMAP_Memory_Pool, ACE_Null_Mutex, ACE_PI_Control_Block>; // Check that the ACE_Based_Pointer_Repository can be accessed diff --git a/ACE/tests/Basic_Types_Test.cpp b/ACE/tests/Basic_Types_Test.cpp index 1f312944ea0..b02e691577f 100644 --- a/ACE/tests/Basic_Types_Test.cpp +++ b/ACE/tests/Basic_Types_Test.cpp @@ -31,7 +31,7 @@ #include "ace/Basic_Types.h" #include "ace/OS_NS_unistd.h" -typedef void* (*a_function_pointer) (void*); +using a_function_pointer = void *(*)(void *); static u_int diff --git a/ACE/tests/Buffer_Stream_Test.cpp b/ACE/tests/Buffer_Stream_Test.cpp index f8207bde15c..254a60aa11d 100644 --- a/ACE/tests/Buffer_Stream_Test.cpp +++ b/ACE/tests/Buffer_Stream_Test.cpp @@ -28,9 +28,9 @@ static const char ACE_ALPHABET[] = "abcdefghijklmnopqrstuvwxyz"; -typedef ACE_Stream<ACE_MT_SYNCH> MT_Stream; -typedef ACE_Module<ACE_MT_SYNCH> MT_Module; -typedef ACE_Task<ACE_MT_SYNCH> MT_Task; +using MT_Stream = ACE_Stream<ACE_MT_SYNCH>; +using MT_Module = ACE_Module<ACE_MT_SYNCH>; +using MT_Task = ACE_Task<ACE_MT_SYNCH>; /** * @class Common_Task diff --git a/ACE/tests/Bug_2609_Regression_Test.cpp b/ACE/tests/Bug_2609_Regression_Test.cpp index 940a7bc11f7..dfdb8dc5884 100644 --- a/ACE/tests/Bug_2609_Regression_Test.cpp +++ b/ACE/tests/Bug_2609_Regression_Test.cpp @@ -29,7 +29,7 @@ ACE_Thread_Semaphore g_semaphore (0); class My_Svc_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM,ACE_NULL_SYNCH> { public: - typedef ACE_Svc_Handler<ACE_SOCK_STREAM,ACE_NULL_SYNCH> super; + using super = ACE_Svc_Handler<ACE_SOCK_Stream, ACE_NULL_SYNCH>; My_Svc_Handler() { TEST_TRACE ("My_Svc_Handler:My_Svc_Handler"); @@ -98,7 +98,7 @@ struct Timer_Handler : public ACE_Event_Handler } }; -typedef ACE_Acceptor<My_Svc_Handler, ACE_SOCK_ACCEPTOR> My_Acceptor; +using My_Acceptor = ACE_Acceptor<My_Svc_Handler, ACE_SOCK_Acceptor>; #endif diff --git a/ACE/tests/Bug_2610_Regression_Test.cpp b/ACE/tests/Bug_2610_Regression_Test.cpp index 425f001e8c6..c0f46ddcfc4 100644 --- a/ACE/tests/Bug_2610_Regression_Test.cpp +++ b/ACE/tests/Bug_2610_Regression_Test.cpp @@ -30,7 +30,7 @@ ACE_Thread_Semaphore g_semaphore (0); class My_Svc_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM,ACE_NULL_SYNCH> { public: - typedef ACE_Svc_Handler<ACE_SOCK_STREAM,ACE_NULL_SYNCH> super; + using super = ACE_Svc_Handler<ACE_SOCK_Stream, ACE_NULL_SYNCH>; My_Svc_Handler() { TEST_TRACE ("My_Svc_Handler:My_Svc_Handler"); @@ -58,7 +58,7 @@ bool g_acceptor_accept_fails; class My_Acceptor : public ACE_Acceptor<My_Svc_Handler, ACE_SOCK_ACCEPTOR> { public: - typedef ACE_Acceptor<My_Svc_Handler, ACE_SOCK_ACCEPTOR> super; + using super = ACE_Acceptor<My_Svc_Handler, ACE_SOCK_Acceptor>; My_Acceptor () : super (ACE_INET_Addr(9000)) {} protected: @@ -84,7 +84,7 @@ protected: class My_Connector : public ACE_Connector<My_Svc_Handler, ACE_SOCK_CONNECTOR> { public: - typedef ACE_Connector<My_Svc_Handler, ACE_SOCK_CONNECTOR> super; + using super = ACE_Connector<My_Svc_Handler, ACE_SOCK_Connector>; protected: int activate_svc_handler (My_Svc_Handler* /*svc_handler*/) override { diff --git a/ACE/tests/Bug_2980_Regression_Test.cpp b/ACE/tests/Bug_2980_Regression_Test.cpp index 0e7a01c9691..1b4383d61ce 100644 --- a/ACE/tests/Bug_2980_Regression_Test.cpp +++ b/ACE/tests/Bug_2980_Regression_Test.cpp @@ -50,7 +50,7 @@ namespace { #endif -typedef int (* voidfunction)(); +using voidfunction = int (*)(); #if defined (CAN_RUN_TEST) diff --git a/ACE/tests/Bug_3912_Regression_Test.cpp b/ACE/tests/Bug_3912_Regression_Test.cpp index d24c079efc0..c1c9fe0a321 100644 --- a/ACE/tests/Bug_3912_Regression_Test.cpp +++ b/ACE/tests/Bug_3912_Regression_Test.cpp @@ -22,8 +22,8 @@ #include "ace/Task.h" #include "ace/Module.h" -typedef ACE_Task<ACE_SYNCH> MT_Task; -typedef ACE_Module<ACE_SYNCH> MT_Module; +using MT_Task = ACE_Task<ACE_MT_SYNCH>; +using MT_Module = ACE_Module<ACE_MT_SYNCH>; /** * We use this Task to track if close was called. diff --git a/ACE/tests/Bug_3943_Regression_Test.cpp b/ACE/tests/Bug_3943_Regression_Test.cpp index 8c4d11f60dd..8fdf4a0f98b 100644 --- a/ACE/tests/Bug_3943_Regression_Test.cpp +++ b/ACE/tests/Bug_3943_Regression_Test.cpp @@ -53,7 +53,7 @@ typedef ACE_Null_Mutex ACCEPTOR_LOCKING; # else # include "ace/Process_Mutex.h" - typedef ACE_Process_Mutex ACCEPTOR_LOCKING; + using ACCEPTOR_LOCKING = ACE_Process_Mutex; # define CLEANUP_PROCESS_MUTEX # endif /* ACE_HAS_THREAD_SAFE_ACCEPT */ #endif /* ACE_LACKS_FORK */ @@ -88,7 +88,7 @@ namespace { #if defined (ACE_LACKS_IOVEC) typedef u_long buffer_len; #else - typedef size_t buffer_len; + using buffer_len = size_t; #endif /* ACE_LACKS_IOVEC */ #if defined (ACE_WIN32) @@ -248,10 +248,8 @@ namespace { }; } // namespace "" -typedef ACE_Oneshot_Acceptor<Svc_Handler, - LOCK_SOCK_ACCEPTOR> ACCEPTOR; -typedef ACE_Connector<Svc_Handler, - ACE_SOCK_CONNECTOR> CONNECTOR; +using ACCEPTOR = ACE_Oneshot_Acceptor<Svc_Handler, ACE_LOCK_SOCK_Acceptor<ACCEPTOR_LOCKING>>; +using CONNECTOR = ACE_Connector<Svc_Handler, ACE_SOCK_Connector>; IovecGuard::IovecGuard(const int count, const int slot, const buffer_len max) diff --git a/ACE/tests/Bug_4055_Regression_Test.cpp b/ACE/tests/Bug_4055_Regression_Test.cpp index 6b09bea8b76..1e427befaee 100644 --- a/ACE/tests/Bug_4055_Regression_Test.cpp +++ b/ACE/tests/Bug_4055_Regression_Test.cpp @@ -36,10 +36,7 @@ create_timer_queue () { ACE_Timer_Queue * tmq = 0; - typedef ACE_Timer_Heap_T<ACE_Event_Handler *, - ACE_Event_Handler_Handle_Timeout_Upcall, - ACE_SYNCH_RECURSIVE_MUTEX, - ACE_HR_Time_Policy> timer_queue_type; + using timer_queue_type = ACE_Timer_Heap_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall, ACE_MT_SYNCH::RECURSIVE_MUTEX, ACE_HR_Time_Policy>; ACE_NEW_RETURN (tmq, timer_queue_type (), 0); return tmq; diff --git a/ACE/tests/CDR_Fixed_Test.cpp b/ACE/tests/CDR_Fixed_Test.cpp index f9611bbf529..96aa893e315 100644 --- a/ACE/tests/CDR_Fixed_Test.cpp +++ b/ACE/tests/CDR_Fixed_Test.cpp @@ -47,10 +47,10 @@ int run_main (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("CDR_Fixed_Test")); - typedef ACE_CDR::Fixed Fixed; - typedef ACE_CDR::LongLong LongLong; - typedef ACE_CDR::ULongLong ULongLong; - typedef ACE_CDR::LongDouble LongDouble; + using Fixed = ACE_CDR::Fixed; + using LongLong = ACE_CDR::LongLong; + using ULongLong = ACE_CDR::ULongLong; + using LongDouble = ACE_CDR::LongDouble; const Fixed f1 = Fixed::from_integer (LongLong (-1234567890l)), f2 = Fixed::from_integer (ULongLong (987654321ul)), diff --git a/ACE/tests/Cache_Map_Manager_Test.cpp b/ACE/tests/Cache_Map_Manager_Test.cpp index af0a5249521..51e9e765767 100644 --- a/ACE/tests/Cache_Map_Manager_Test.cpp +++ b/ACE/tests/Cache_Map_Manager_Test.cpp @@ -26,82 +26,52 @@ #include "ace/Get_Opt.h" #include "Cache_Map_Manager_Test.h" // Hash_Key class defined in here -typedef size_t KEY; -typedef size_t VALUE; -typedef int ATTR; -typedef std::pair<VALUE, ATTR> CACHE_VALUE; -typedef ACE_Equal_To<KEY> COMPARE_KEYS; - -typedef ACE_Hash_Map_Manager_Ex<KEY, CACHE_VALUE, Hash_Key, ACE_Equal_To<KEY>, ACE_Null_Mutex> - HASH_MAP_MANAGER; -typedef ACE_Hash_Map_Iterator_Ex<KEY, CACHE_VALUE, Hash_Key, ACE_Equal_To<KEY>, ACE_Null_Mutex> - HASH_MAP_ITERATOR; -typedef ACE_Hash_Map_Reverse_Iterator_Ex<KEY, CACHE_VALUE, Hash_Key, ACE_Equal_To<KEY>, ACE_Null_Mutex> - HASH_MAP_REVERSE_ITERATOR; - -typedef ACE_Map_Manager<KEY, CACHE_VALUE, ACE_Null_Mutex> - MAP_MANAGER; -typedef ACE_Map_Iterator<KEY, CACHE_VALUE, ACE_Null_Mutex> - MAP_ITERATOR; -typedef ACE_Map_Reverse_Iterator<KEY, CACHE_VALUE, ACE_Null_Mutex> - MAP_REVERSE_ITERATOR; - -typedef ACE_Cleanup_Strategy<KEY, CACHE_VALUE, HASH_MAP_MANAGER> - HASH_MAP_CLEANUP; - -typedef ACE_Cleanup_Strategy<KEY, CACHE_VALUE, MAP_MANAGER> - MAP_CLEANUP; - -typedef ACE_Pair_Caching_Utility<KEY, CACHE_VALUE, HASH_MAP_MANAGER, HASH_MAP_ITERATOR, ATTR> - HASH_MAP_CACHING_UTILITY; - -typedef ACE_Pair_Caching_Utility<KEY, CACHE_VALUE, MAP_MANAGER, MAP_ITERATOR, ATTR> - MAP_CACHING_UTILITY; +using KEY = size_t; +using VALUE = size_t; +using ATTR = int; +using CACHE_VALUE = std::pair<VALUE, ATTR>; +using COMPARE_KEYS = ACE_Equal_To<KEY>; + +using HASH_MAP_MANAGER = ACE_Hash_Map_Manager_Ex<KEY, CACHE_VALUE, Hash_Key, ACE_Equal_To<KEY>, ACE_Null_Mutex>; +using HASH_MAP_ITERATOR = ACE_Hash_Map_Iterator_Ex<KEY, CACHE_VALUE, Hash_Key, ACE_Equal_To<KEY>, ACE_Null_Mutex>; +using HASH_MAP_REVERSE_ITERATOR = ACE_Hash_Map_Reverse_Iterator_Ex<KEY, CACHE_VALUE, Hash_Key, ACE_Equal_To<KEY>, ACE_Null_Mutex>; + +using MAP_MANAGER = ACE_Map_Manager<KEY, CACHE_VALUE, ACE_Null_Mutex>; +using MAP_ITERATOR = ACE_Map_Iterator<KEY, CACHE_VALUE, ACE_Null_Mutex>; +using MAP_REVERSE_ITERATOR = ACE_Map_Reverse_Iterator<KEY, CACHE_VALUE, ACE_Null_Mutex>; + +using HASH_MAP_CLEANUP = ACLE<KEY, CACHE_VALUE, HASH_MAP_MANAGER>; + +using MAP_CLEANUP = ACLE<KEY, CACHE_VALUE, MAP_MANAGER>; + +using HASH_MAP_CACHING_UTILITY = ACE_Pair_Caching_Utility<KEY, CACHE_VALUE, HASH_MAP_MANAGER, HASH_MAP_ITERATOR, ATTR>; + +using MAP_CACHING_UTILITY = ACE_Pair_Caching_Utility<KEY, CACHE_VALUE, MAP_MANAGER, MAP_ITERATOR, ATTR>; // = Hash_Map_Manager related -typedef ACE_Caching_Strategy<ATTR, HASH_MAP_CACHING_UTILITY> - HASH_MAP_CACHING_STRATEGY; -typedef ACE_LRU_Caching_Strategy<ATTR, HASH_MAP_CACHING_UTILITY> - HASH_MAP_LRU; -typedef ACE_LFU_Caching_Strategy<ATTR, HASH_MAP_CACHING_UTILITY> - HASH_MAP_LFU; -typedef ACE_FIFO_Caching_Strategy<ATTR, HASH_MAP_CACHING_UTILITY> - HASH_MAP_FIFO; -typedef ACE_Null_Caching_Strategy<ATTR, HASH_MAP_CACHING_UTILITY> - HASH_MAP_NULL; -typedef ACE_Caching_Strategy_Adapter<ATTR, HASH_MAP_CACHING_UTILITY, HASH_MAP_LRU> - HASH_MAP_LRU_ADAPTER; -typedef ACE_Caching_Strategy_Adapter<ATTR, HASH_MAP_CACHING_UTILITY, HASH_MAP_LFU> - HASH_MAP_LFU_ADAPTER; -typedef ACE_Caching_Strategy_Adapter<ATTR, HASH_MAP_CACHING_UTILITY, HASH_MAP_FIFO> - HASH_MAP_FIFO_ADAPTER; -typedef ACE_Caching_Strategy_Adapter<ATTR, HASH_MAP_CACHING_UTILITY, HASH_MAP_NULL> - HASH_MAP_NULL_ADAPTER; +using HASH_MAP_CACHING_STRATEGY = ACS<ATTR, HASH_MAP_CACHING_UTILITY>; +using HASH_MAP_LRU = ALRU<ATTR, HASH_MAP_CACHING_UTILITY>; +using HASH_MAP_LFU = ALFU<ATTR, HASH_MAP_CACHING_UTILITY>; +using HASH_MAP_FIFO = AFIFO<ATTR, HASH_MAP_CACHING_UTILITY>; +using HASH_MAP_NULL = ANULL<ATTR, HASH_MAP_CACHING_UTILITY>; +using HASH_MAP_LRU_ADAPTER = ACSA<ATTR, HASH_MAP_CACHING_UTILITY, HASH_MAP_LRU>; +using HASH_MAP_LFU_ADAPTER = ACSA<ATTR, HASH_MAP_CACHING_UTILITY, HASH_MAP_LFU>; +using HASH_MAP_FIFO_ADAPTER = ACSA<ATTR, HASH_MAP_CACHING_UTILITY, HASH_MAP_FIFO>; +using HASH_MAP_NULL_ADAPTER = ACSA<ATTR, HASH_MAP_CACHING_UTILITY, HASH_MAP_NULL>; // = Map_Manager related -typedef ACE_Caching_Strategy<ATTR, MAP_CACHING_UTILITY> - MAP_CACHING_STRATEGY; -typedef ACE_LRU_Caching_Strategy<ATTR, MAP_CACHING_UTILITY> - MAP_LRU; -typedef ACE_LFU_Caching_Strategy<ATTR, MAP_CACHING_UTILITY> - MAP_LFU; -typedef ACE_FIFO_Caching_Strategy<ATTR, MAP_CACHING_UTILITY> - MAP_FIFO; -typedef ACE_Null_Caching_Strategy<ATTR, MAP_CACHING_UTILITY> - MAP_NULL; -typedef ACE_Caching_Strategy_Adapter<ATTR, MAP_CACHING_UTILITY, MAP_LRU> - MAP_LRU_ADAPTER; -typedef ACE_Caching_Strategy_Adapter<ATTR, MAP_CACHING_UTILITY, MAP_LFU> - MAP_LFU_ADAPTER; -typedef ACE_Caching_Strategy_Adapter<ATTR, MAP_CACHING_UTILITY, MAP_FIFO> - MAP_FIFO_ADAPTER; -typedef ACE_Caching_Strategy_Adapter<ATTR, MAP_CACHING_UTILITY, MAP_NULL> - MAP_NULL_ADAPTER; - -typedef ACE_Hash_Cache_Map_Manager<KEY, VALUE, Hash_Key, ACE_Equal_To<KEY>, HASH_MAP_CACHING_STRATEGY, ATTR> - HASH_MAP_CACHE; -typedef ACE_Cache_Map_Manager<KEY, VALUE, MAP_MANAGER, MAP_ITERATOR, MAP_REVERSE_ITERATOR, MAP_CACHING_STRATEGY, ATTR> - MAP_CACHE; +using MAP_CACHING_STRATEGY = ACS<ATTR, MAP_CACHING_UTILITY>; +using MAP_LRU = ALRU<ATTR, MAP_CACHING_UTILITY>; +using MAP_LFU = ALFU<ATTR, MAP_CACHING_UTILITY>; +using MAP_FIFO = AFIFO<ATTR, MAP_CACHING_UTILITY>; +using MAP_NULL = ANULL<ATTR, MAP_CACHING_UTILITY>; +using MAP_LRU_ADAPTER = ACSA<ATTR, MAP_CACHING_UTILITY, MAP_LRU>; +using MAP_LFU_ADAPTER = ACSA<ATTR, MAP_CACHING_UTILITY, MAP_LFU>; +using MAP_FIFO_ADAPTER = ACSA<ATTR, MAP_CACHING_UTILITY, MAP_FIFO>; +using MAP_NULL_ADAPTER = ACSA<ATTR, MAP_CACHING_UTILITY, MAP_NULL>; + +using HASH_MAP_CACHE = ACE_Hash_Cache_Map_Manager<KEY, VALUE, Hash_Key, ACE_Equal_To<KEY>, HASH_MAP_CACHING_STRATEGY, ATTR>; +using MAP_CACHE = ACMM<KEY, VALUE, MAP_MANAGER, MAP_ITERATOR, MAP_REVERSE_ITERATOR, MAP_CACHING_STRATEGY, ATTR>; enum Caching_Strategy_Type { diff --git a/ACE/tests/Cached_Accept_Conn_Test.cpp b/ACE/tests/Cached_Accept_Conn_Test.cpp index 3207b9f6718..960816e3402 100644 --- a/ACE/tests/Cached_Accept_Conn_Test.cpp +++ b/ACE/tests/Cached_Accept_Conn_Test.cpp @@ -127,8 +127,7 @@ Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::out_of_sockets_handler () return -1; } -typedef Accept_Strategy<Server_Svc_Handler, ACE_SOCK_ACCEPTOR> - ACCEPT_STRATEGY; +using ACCEPT_STRATEGY = Accept_Strategy<Server_Svc_Handler, ACE_SOCK_Acceptor>; Client_Svc_Handler::Client_Svc_Handler (ACE_Thread_Manager *t) : ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> (t) diff --git a/ACE/tests/Cached_Allocator_Test.cpp b/ACE/tests/Cached_Allocator_Test.cpp index 4d4b7f8dbf1..d954c2980cd 100644 --- a/ACE/tests/Cached_Allocator_Test.cpp +++ b/ACE/tests/Cached_Allocator_Test.cpp @@ -20,7 +20,7 @@ #include "ace/Synch_Traits.h" #include "ace/Null_Mutex.h" -typedef ACE_Dynamic_Cached_Allocator<ACE_SYNCH_NULL_MUTEX> DYNAMIC_ALLOCATOR; +using DYNAMIC_ALLOCATOR = ACE_Dynamic_Cached_Allocator<ACE_MT_SYNCH::NULL_MUTEX>; static int speed_test (ACE_UINT32 loops) @@ -71,7 +71,7 @@ speed_test (ACE_UINT32 loops) } typedef char MEMBLOCK[8]; -typedef ACE_Cached_Allocator<MEMBLOCK, ACE_SYNCH_NULL_MUTEX> STATIC_ALLOCATOR; +using STATIC_ALLOCATOR = ACE_Cached_Allocator<MEMBLOCK, ACE_MT_SYNCH::NULL_MUTEX>; static int stdspeed_test (ACE_UINT32 loops) diff --git a/ACE/tests/Cached_Conn_Test.cpp b/ACE/tests/Cached_Conn_Test.cpp index 803d37bd36b..9f6bb780237 100644 --- a/ACE/tests/Cached_Conn_Test.cpp +++ b/ACE/tests/Cached_Conn_Test.cpp @@ -40,60 +40,39 @@ -typedef size_t ATTRIBUTES; -typedef std::pair<Svc_Handler *, ATTRIBUTES> - CACHED_HANDLER; -typedef ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> - ACE_ADDR; -typedef ACE_Hash<ACE_ADDR> H_KEY; -typedef ACE_Equal_To<ACE_ADDR> C_KEYS; - -typedef ACE_Hash_Map_Manager_Ex<ACE_ADDR, CACHED_HANDLER, H_KEY, C_KEYS, ACE_Null_Mutex> - HASH_MAP; -typedef ACE_Hash_Map_Iterator_Ex<ACE_ADDR, CACHED_HANDLER, H_KEY, C_KEYS, ACE_Null_Mutex> - HASH_MAP_ITERATOR; -typedef ACE_Hash_Map_Reverse_Iterator_Ex<ACE_ADDR, CACHED_HANDLER, H_KEY, C_KEYS, ACE_Null_Mutex> - HASH_MAP_REVERSE_ITERATOR; - -typedef ACE_Recyclable_Handler_Cleanup_Strategy<ACE_ADDR, CACHED_HANDLER, HASH_MAP> - CLEANUP_STRATEGY; -typedef ACE_Recyclable_Handler_Caching_Utility<ACE_ADDR, CACHED_HANDLER, HASH_MAP, HASH_MAP_ITERATOR, ATTRIBUTES> - CACHING_UTILITY; - -typedef ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY> - LRU_CACHING_STRATEGY; - -typedef ACE_LFU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY> - LFU_CACHING_STRATEGY; -typedef ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY> - FIFO_CACHING_STRATEGY; -typedef ACE_Null_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY> - NULL_CACHING_STRATEGY; -typedef ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, LRU_CACHING_STRATEGY> - LRU_CACHING_STRATEGY_ADAPTER; -typedef ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, LFU_CACHING_STRATEGY> - LFU_CACHING_STRATEGY_ADAPTER; -typedef ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, FIFO_CACHING_STRATEGY> - FIFO_CACHING_STRATEGY_ADAPTER; -typedef ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, NULL_CACHING_STRATEGY> - NULL_CACHING_STRATEGY_ADAPTER; -typedef ACE_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY> - CACHING_STRATEGY; - -typedef ACE_Oneshot_Acceptor<Svc_Handler, ACE_SOCK_ACCEPTOR> - ACCEPTOR; - -typedef ACE_Strategy_Connector<Svc_Handler, ACE_SOCK_CONNECTOR> - STRATEGY_CONNECTOR; - -typedef ACE_NOOP_Creation_Strategy<Svc_Handler> - NULL_CREATION_STRATEGY; - -typedef ACE_NOOP_Concurrency_Strategy<Svc_Handler> - NULL_ACTIVATION_STRATEGY; - -typedef ACE_Cached_Connect_Strategy_Ex<Svc_Handler, ACE_SOCK_CONNECTOR, CACHING_STRATEGY, ATTRIBUTES, ACE_SYNCH_NULL_MUTEX> - CACHED_CONNECT_STRATEGY; +using ATTRIBUTES = size_t; +using CACHED_HANDLER = std::pair<Svc_Handler *, ATTRIBUTES>; +using ACE_ADDR = ARHR<ACE_INET_Addr>; +using H_KEY = ACE_Hash<ACE_ADDR>; +using C_KEYS = ACE_Equal_To<ACE_ADDR>; + +using HASH_MAP = ACE_Hash_Map_Manager_Ex<ACE_ADDR, CACHED_HANDLER, H_KEY, C_KEYS, ACE_Null_Mutex>; +using HASH_MAP_ITERATOR = ACE_Hash_Map_Iterator_Ex<ACE_ADDR, CACHED_HANDLER, H_KEY, C_KEYS, ACE_Null_Mutex>; +using HASH_MAP_REVERSE_ITERATOR = ACE_Hash_Map_Reverse_Iterator_Ex<ACE_ADDR, CACHED_HANDLER, H_KEY, C_KEYS, ACE_Null_Mutex>; + +using CLEANUP_STRATEGY = ARHCLE<ACE_ADDR, CACHED_HANDLER, HASH_MAP>; +using CACHING_UTILITY = ACE_Recyclable_Handler_Caching_Utility<ACE_ADDR, CACHED_HANDLER, HASH_MAP, HASH_MAP_ITERATOR, ATTRIBUTES>; + +using LRU_CACHING_STRATEGY = ALRU<ATTRIBUTES, CACHING_UTILITY>; + +using LFU_CACHING_STRATEGY = ALFU<ATTRIBUTES, CACHING_UTILITY>; +using FIFO_CACHING_STRATEGY = AFIFO<ATTRIBUTES, CACHING_UTILITY>; +using NULL_CACHING_STRATEGY = ANULL<ATTRIBUTES, CACHING_UTILITY>; +using LRU_CACHING_STRATEGY_ADAPTER = ACSA<ATTRIBUTES, CACHING_UTILITY, LRU_CACHING_STRATEGY>; +using LFU_CACHING_STRATEGY_ADAPTER = ACSA<ATTRIBUTES, CACHING_UTILITY, LFU_CACHING_STRATEGY>; +using FIFO_CACHING_STRATEGY_ADAPTER = ACSA<ATTRIBUTES, CACHING_UTILITY, FIFO_CACHING_STRATEGY>; +using NULL_CACHING_STRATEGY_ADAPTER = ACSA<ATTRIBUTES, CACHING_UTILITY, NULL_CACHING_STRATEGY>; +using CACHING_STRATEGY = ACS<ATTRIBUTES, CACHING_UTILITY>; + +using ACCEPTOR = ACE_Oneshot_Acceptor<Svc_Handler, ACE_SOCK_Acceptor>; + +using STRATEGY_CONNECTOR = ACE_Strategy_Connector<Svc_Handler, ACE_SOCK_Connector>; + +using NULL_CREATION_STRATEGY = ACE_NOOP_Creation_Strategy<Svc_Handler>; + +using NULL_ACTIVATION_STRATEGY = ACE_NOOP_Concurrency_Strategy<Svc_Handler>; + +using CACHED_CONNECT_STRATEGY = ACCSE<Svc_Handler, ACE_SOCK_Connector, CACHING_STRATEGY, ATTRIBUTES, ACE_MT_SYNCH::NULL_MUTEX>; #endif /* CACHED_CONNECT_TEST */ diff --git a/ACE/tests/Collection_Test.cpp b/ACE/tests/Collection_Test.cpp index 2d5f23d7841..5b92fbc35b4 100644 --- a/ACE/tests/Collection_Test.cpp +++ b/ACE/tests/Collection_Test.cpp @@ -27,14 +27,14 @@ UglyThing::operator== (const UglyThing& r) const return this->alloc_ == r.alloc_; } -typedef UglyThing DATA; -typedef ACE_Unbounded_Set<DATA> UNBOUNDED_SET; -typedef ACE_Unbounded_Set_Iterator<DATA> UNBOUNDED_SET_ITERATOR; -typedef ACE_Unbounded_Set_Const_Iterator<DATA> UNBOUNDED_SET_CONST_ITERATOR; - -typedef int ARRAY_DATA; -typedef ACE_Array<ARRAY_DATA> ARRAY; -typedef ACE_Array_Iterator<ARRAY_DATA> ARRAY_ITERATOR; +using DATA = UglyThing; +using UNBOUNDED_SET = ACE_Unbounded_Set<DATA>; +using UNBOUNDED_SET_ITERATOR = ACE_Unbounded_Set_Iterator<DATA>; +using UNBOUNDED_SET_CONST_ITERATOR = ACE_Unbounded_Set_Const_Iterator<DATA>; + +using ARRAY_DATA = int; +using ARRAY = ACE_Array<ARRAY_DATA>; +using ARRAY_ITERATOR = ACE_Array_Iterator<ARRAY_DATA>; void iterate_const(const UNBOUNDED_SET& set) { diff --git a/ACE/tests/Compiler_Features_01_Test.cpp b/ACE/tests/Compiler_Features_01_Test.cpp index 9f23b27fe5a..ecf26f1b251 100644 --- a/ACE/tests/Compiler_Features_01_Test.cpp +++ b/ACE/tests/Compiler_Features_01_Test.cpp @@ -27,7 +27,7 @@ run_main (int, ACE_TCHAR *[]) int status = 0; // Create a simple list ... - typedef std::list<int> collection; + using collection = std::list<int>; collection c; // ... insert some elements ... diff --git a/ACE/tests/Compiler_Features_02_Test.cpp b/ACE/tests/Compiler_Features_02_Test.cpp index f1e31f20b0d..42632f09d23 100644 --- a/ACE/tests/Compiler_Features_02_Test.cpp +++ b/ACE/tests/Compiler_Features_02_Test.cpp @@ -25,7 +25,7 @@ run_main (int, ACE_TCHAR *[]) int status = 0; // Create a simple list ... - typedef std::map<int,int> collection; + using collection = std::map<int, int>; collection c; // ... insert some elements ... diff --git a/ACE/tests/Compiler_Features_03_Test.cpp b/ACE/tests/Compiler_Features_03_Test.cpp index b34088bdd18..9363c337593 100644 --- a/ACE/tests/Compiler_Features_03_Test.cpp +++ b/ACE/tests/Compiler_Features_03_Test.cpp @@ -25,7 +25,7 @@ run_main (int, ACE_TCHAR *[]) int status = 0; // Create a simple list ... - typedef std::vector<int> collection; + using collection = std::vector<int>; collection c; // ... insert some elements ... diff --git a/ACE/tests/Compiler_Features_04_Test.cpp b/ACE/tests/Compiler_Features_04_Test.cpp index a8e24b74ead..7f4cdb4c373 100644 --- a/ACE/tests/Compiler_Features_04_Test.cpp +++ b/ACE/tests/Compiler_Features_04_Test.cpp @@ -25,7 +25,7 @@ run_main (int, ACE_TCHAR *[]) int status = 0; // Create a simple list ... - typedef std::set<int> collection; + using collection = std::set<int>; collection c; // ... insert some elements ... diff --git a/ACE/tests/Compiler_Features_05_Test.cpp b/ACE/tests/Compiler_Features_05_Test.cpp index 3caa89031f2..c67992ba4a3 100644 --- a/ACE/tests/Compiler_Features_05_Test.cpp +++ b/ACE/tests/Compiler_Features_05_Test.cpp @@ -25,7 +25,7 @@ run_main (int, ACE_TCHAR *[]) int status = 0; // Create a simple queue ... - typedef std::queue<int> collection; + using collection = std::queue<int>; // ... if the previous line compiles, the default template // parameters work. The declaration of queue<> is something like: // template<typename T, typename Sequence = deque<T> > diff --git a/ACE/tests/Compiler_Features_06_Test.cpp b/ACE/tests/Compiler_Features_06_Test.cpp index 2e68a987b72..3fde520fb71 100644 --- a/ACE/tests/Compiler_Features_06_Test.cpp +++ b/ACE/tests/Compiler_Features_06_Test.cpp @@ -30,7 +30,7 @@ run_main (int, ACE_TCHAR *[]) int status = 0; // Create a simple list ... - typedef std::set<int,std::greater<int> > collection; + using collection = std::set<int, std::greater<int>>; collection c; // ... insert some elements ... diff --git a/ACE/tests/Compiler_Features_07_Test.cpp b/ACE/tests/Compiler_Features_07_Test.cpp index 854efe3ff82..bf4933326c3 100644 --- a/ACE/tests/Compiler_Features_07_Test.cpp +++ b/ACE/tests/Compiler_Features_07_Test.cpp @@ -26,7 +26,7 @@ run_main (int, ACE_TCHAR *[]) int status = 0; // Create a simple list ... - typedef std::set<std::string> collection; + using collection = std::set<std::string>; collection c; // ... insert some elements ... diff --git a/ACE/tests/Compiler_Features_18_Test.cpp b/ACE/tests/Compiler_Features_18_Test.cpp index 2eecfeba50f..ee48b20b80e 100644 --- a/ACE/tests/Compiler_Features_18_Test.cpp +++ b/ACE/tests/Compiler_Features_18_Test.cpp @@ -8,8 +8,8 @@ #include <array> namespace Test { - typedef std::array< float, 5 > arrayType; - typedef std::array< arrayType, 5 > array_array; + using arrayType = std::array<float, 5>; + using array_array = std::array<arrayType, 5>; }; int diff --git a/ACE/tests/Compiler_Features_19_Test.cpp b/ACE/tests/Compiler_Features_19_Test.cpp index a3fcad2e364..19ba4cddd76 100644 --- a/ACE/tests/Compiler_Features_19_Test.cpp +++ b/ACE/tests/Compiler_Features_19_Test.cpp @@ -16,7 +16,7 @@ namespace IDL typename _Alloc = std::allocator<_CharT> > class bounded_basic_string : public std::basic_string<_CharT, _Traits, _Alloc> { - typedef std::basic_string<_CharT, _Traits, _Alloc> _String; + using _String = std::basic_string<_CharT, _Traits, _Alloc>; public: static const uint32_t bound_ = _Bound; @@ -46,7 +46,7 @@ run_main (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT("Compiler_Features_19_Test")); - typedef IDL::bounded_string<100> string100; + using string100 = IDL::bounded_string<100>; string100 s100("world"); ACE_DEBUG ((LM_DEBUG, diff --git a/ACE/tests/Compiler_Features_24_Test.cpp b/ACE/tests/Compiler_Features_24_Test.cpp index c62aac7241d..895a28820ea 100644 --- a/ACE/tests/Compiler_Features_24_Test.cpp +++ b/ACE/tests/Compiler_Features_24_Test.cpp @@ -16,7 +16,7 @@ namespace FOO template <typename T> struct o_t { - typedef o_r<T> ref_type; + using ref_type = o_r<T>; }; class T_base {}; @@ -32,7 +32,7 @@ namespace FOO template <typename _Tp1, typename, typename ...Args> friend o_r<_Tp1> make_f(Args&& ...args); protected: - typedef std::shared_ptr<T> shared_ptr_type; + using shared_ptr_type = std::shared_ptr<T>; template<typename _Tp1, typename = typename std::enable_if<std::is_convertible<_Tp1*, T*>::value>::type> explicit o_r (_Tp1*) diff --git a/ACE/tests/Compiler_Features_25_Test.cpp b/ACE/tests/Compiler_Features_25_Test.cpp index 9a77979adff..e273b166224 100644 --- a/ACE/tests/Compiler_Features_25_Test.cpp +++ b/ACE/tests/Compiler_Features_25_Test.cpp @@ -9,8 +9,8 @@ struct Foo { - typedef std::true_type is_true; - typedef std::false_type is_false; + using is_true = std::true_type; + using is_false = std::false_type; }; int diff --git a/ACE/tests/Compiler_Features_31_Test.cpp b/ACE/tests/Compiler_Features_31_Test.cpp index 349ebca71d5..f0665819fad 100644 --- a/ACE/tests/Compiler_Features_31_Test.cpp +++ b/ACE/tests/Compiler_Features_31_Test.cpp @@ -15,7 +15,7 @@ namespace A template <typename T> struct abstractbase_traits { - typedef abstractbase_reference<T> ref_type; + using ref_type = abstractbase_reference<T>; static ref_type narrow(abstractbase_reference<C::AbstractBase>); static ref_type narrow2(abstractbase_reference<C::AbstractBase>); }; diff --git a/ACE/tests/Compiler_Features_36_Test.cpp b/ACE/tests/Compiler_Features_36_Test.cpp index 4e82062b646..9a4f81c3acc 100644 --- a/ACE/tests/Compiler_Features_36_Test.cpp +++ b/ACE/tests/Compiler_Features_36_Test.cpp @@ -10,7 +10,7 @@ template <typename T> struct non_instantiatable { - typedef typename T::THIS_TYPE_CANNOT_BE_INSTANTIATED type; + using type = typename T::THIS_TYPE_CANNOT_BE_INSTANTIATED; }; int diff --git a/ACE/tests/Compiler_Features_37_Test.cpp b/ACE/tests/Compiler_Features_37_Test.cpp index 5d88aee0033..8fe14fda578 100644 --- a/ACE/tests/Compiler_Features_37_Test.cpp +++ b/ACE/tests/Compiler_Features_37_Test.cpp @@ -12,9 +12,9 @@ class my_map public: my_map () : capacity_ (0), nodes_(0) {} ~my_map (); - typedef key key_type; - typedef value data_type; - typedef std::pair<key, value> value_type; + using key_type = key; + using data_type = value; + using value_type = std::pair<key, value>; size_t capacity_; value_type* nodes_; }; diff --git a/ACE/tests/Compiler_Features_38_Test.cpp b/ACE/tests/Compiler_Features_38_Test.cpp index 1c2f901bb7d..402fdd4816e 100644 --- a/ACE/tests/Compiler_Features_38_Test.cpp +++ b/ACE/tests/Compiler_Features_38_Test.cpp @@ -11,7 +11,7 @@ class Foo_T { public: Foo_T () : member() {}; - typedef T& T_elem; + using T_elem = T &; T_elem operator[] (ACE_CDR::ULong) { return member; } private: T member; @@ -21,7 +21,7 @@ struct Foo2 { long i; }; -typedef Foo_T<Foo2> Foo2Seq; +using Foo2Seq = Foo_T<Foo2>; int run_main (int, ACE_TCHAR *[]) diff --git a/ACE/tests/Conn_Test.cpp b/ACE/tests/Conn_Test.cpp index bc7786b3635..4986926a2a0 100644 --- a/ACE/tests/Conn_Test.cpp +++ b/ACE/tests/Conn_Test.cpp @@ -66,28 +66,17 @@ static const char ACE_ALPHABET[] = "abcdefghijklmnopqrstuvwxyz"; typedef ACE_Null_Mutex ACCEPTOR_LOCKING; # else # include "ace/Process_Mutex.h" - typedef ACE_Process_Mutex ACCEPTOR_LOCKING; + using ACCEPTOR_LOCKING = ACE_Process_Mutex; # define CLEANUP_PROCESS_MUTEX # endif /* ACE_HAS_THREAD_SAFE_ACCEPT */ #endif /* ACE_LACKS_FORK */ -typedef ACE_Oneshot_Acceptor<Svc_Handler, - ACE_LOCK_SOCK_Acceptor<ACCEPTOR_LOCKING> > - ACCEPTOR; -typedef ACE_Connector<Svc_Handler, - ACE_SOCK_CONNECTOR> - CONNECTOR; -typedef ACE_Strategy_Connector<Svc_Handler, - ACE_SOCK_CONNECTOR> - STRAT_CONNECTOR; -typedef ACE_NOOP_Creation_Strategy<Svc_Handler> - NULL_CREATION_STRATEGY; -typedef ACE_NOOP_Concurrency_Strategy<Svc_Handler> - NULL_ACTIVATION_STRATEGY; -typedef ACE_Cached_Connect_Strategy<Svc_Handler, - ACE_SOCK_CONNECTOR, - ACE_SYNCH_MUTEX> - CACHED_CONNECT_STRATEGY; +using ACCEPTOR = ACE_Oneshot_Acceptor<Svc_Handler, ACE_LOCK_SOCK_Acceptor<ACCEPTOR_LOCKING>>; +using CONNECTOR = ACE_Connector<Svc_Handler, ACE_SOCK_Connector>; +using STRAT_CONNECTOR = ACE_Strategy_Connector<Svc_Handler, ACE_SOCK_Connector>; +using NULL_CREATION_STRATEGY = ACE_NOOP_Creation_Strategy<Svc_Handler>; +using NULL_ACTIVATION_STRATEGY = ACE_NOOP_Concurrency_Strategy<Svc_Handler>; +using CACHED_CONNECT_STRATEGY = ACE_Cached_Connect_Strategy<Svc_Handler, ACE_SOCK_Connector, ACE_MT_SYNCH::MUTEX>; #define CACHED_CONNECT_STRATEGY ACE_Cached_Connect_Strategy<Svc_Handler, ACE_SOCK_CONNECTOR, ACE_SYNCH_MUTEX> #define REFCOUNTED_HASH_RECYCLABLE_ADDR ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> diff --git a/ACE/tests/DLL_Test.cpp b/ACE/tests/DLL_Test.cpp index 746909efb86..25d4212468e 100644 --- a/ACE/tests/DLL_Test.cpp +++ b/ACE/tests/DLL_Test.cpp @@ -31,9 +31,8 @@ #endif /* ACE_WIN32 */ // Declare the type of the symbol: -typedef Hello *(*Hello_Factory)(); - -typedef int ( *PFN )( Parent* ); +using Hello_Factory = Hello *(*)(); +using PFN = int (*)(Parent *); int handle_test (ACE_DLL &dll) { diff --git a/ACE/tests/DLList_Test.cpp b/ACE/tests/DLList_Test.cpp index a15362672ed..182664be037 100644 --- a/ACE/tests/DLList_Test.cpp +++ b/ACE/tests/DLList_Test.cpp @@ -15,10 +15,10 @@ #include "ace/SString.h" #include "ace/Malloc_T.h" -typedef ACE_TCHAR *ACE_STRING; -typedef ACE_DLList<ACE_STRING> STRLIST; -typedef ACE_DLList_Iterator<ACE_STRING> STRLIST_ITERATOR; -typedef ACE_DLList_Reverse_Iterator<ACE_STRING> STRLIST_REVERSE_ITERATOR; +using ACE_STRING = ACE_TCHAR *; +using STRLIST = ACE_DLList<ACE_STRING>; +using STRLIST_ITERATOR = ACE_DLList_Iterator<ACE_STRING>; +using STRLIST_REVERSE_ITERATOR = ACE_DLList_Reverse_Iterator<ACE_STRING>; static ACE_STRING string_table[] = { diff --git a/ACE/tests/Dev_Poll_Reactor_Echo_Test.cpp b/ACE/tests/Dev_Poll_Reactor_Echo_Test.cpp index d92794937f9..f33a16646cd 100644 --- a/ACE/tests/Dev_Poll_Reactor_Echo_Test.cpp +++ b/ACE/tests/Dev_Poll_Reactor_Echo_Test.cpp @@ -30,7 +30,7 @@ #include <queue> -typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> SVC_HANDLER; +using SVC_HANDLER = ACE_Svc_Handler<ACE_SOCK_Stream, ACE_NULL_SYNCH>; // ---------------------------------------------------- @@ -361,8 +361,8 @@ Server::handle_close (ACE_HANDLE handle, // ---------------------------------------------------- -typedef ACE_Acceptor<Server, ACE_SOCK_ACCEPTOR> ACCEPTOR; -typedef ACE_Connector<Client, ACE_SOCK_CONNECTOR> CONNECTOR; +using ACCEPTOR = ACE_Acceptor<Server, ACE_SOCK_Acceptor>; +using CONNECTOR = ACE_Connector<Client, ACE_SOCK_Connector>; // ---------------------------------------------------- diff --git a/ACE/tests/Dev_Poll_Reactor_Test.cpp b/ACE/tests/Dev_Poll_Reactor_Test.cpp index 4b2be8b2610..14cfa9e27e8 100644 --- a/ACE/tests/Dev_Poll_Reactor_Test.cpp +++ b/ACE/tests/Dev_Poll_Reactor_Test.cpp @@ -36,7 +36,7 @@ #include "ace/OS_NS_netdb.h" -typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> SVC_HANDLER; +using SVC_HANDLER = ACE_Svc_Handler<ACE_SOCK_Stream, ACE_NULL_SYNCH>; // ---------------------------------------------------- @@ -310,8 +310,8 @@ Server::handle_close (ACE_HANDLE handle, // ---------------------------------------------------- -typedef ACE_Acceptor<Server, ACE_SOCK_ACCEPTOR> ACCEPTOR; -typedef ACE_Connector<Client, ACE_SOCK_CONNECTOR> CONNECTOR; +using ACCEPTOR = ACE_Acceptor<Server, ACE_SOCK_Acceptor>; +using CONNECTOR = ACE_Connector<Client, ACE_SOCK_Connector>; // ---------------------------------------------------- diff --git a/ACE/tests/Framework_Component_DLL.cpp b/ACE/tests/Framework_Component_DLL.cpp index d8252f321e9..b3ef6c457a6 100644 --- a/ACE/tests/Framework_Component_DLL.cpp +++ b/ACE/tests/Framework_Component_DLL.cpp @@ -62,11 +62,11 @@ public: } }; -typedef Server_T <1> Server_1; +using Server_1 = Server_T<1>; FRAMEWORK_COMPONENT_DLL_SINGLETON_DECLARATION(Server_T<1>;) ACE_FACTORY_DEFINE (Framework_Component_DLL, Server_1) -typedef Server_T <2> Server_2; +using Server_2 = Server_T<2>; FRAMEWORK_COMPONENT_DLL_SINGLETON_DECLARATION(Server_T<2>;) ACE_FACTORY_DEFINE (Framework_Component_DLL, Server_2) diff --git a/ACE/tests/Future_Set_Test.cpp b/ACE/tests/Future_Set_Test.cpp index e80274cfe39..3648646a703 100644 --- a/ACE/tests/Future_Set_Test.cpp +++ b/ACE/tests/Future_Set_Test.cpp @@ -33,7 +33,7 @@ #if defined (ACE_HAS_THREADS) -typedef ACE_Atomic_Op<ACE_Thread_Mutex, int> ATOMIC_INT; +using ATOMIC_INT = ACE_Atomic_Op<ACE_Thread_Mutex, int>; // A counter for the tasks.. static ATOMIC_INT task_count (0); @@ -363,11 +363,11 @@ Prime_Scheduler::work (u_long newparam, // Total number of loops. static int n_loops = 100; -typedef ACE_Future_Rep<u_long> *u_long_key; -typedef ACE_Future_Holder<u_long> *u_long_value; +using u_long_key = ACE_Future_Rep<u_long> *; +using u_long_value = ACE_Future_Holder<u_long> *; -typedef ACE_Future_Rep<const ACE_TCHAR *> *char_star_key; -typedef ACE_Future_Holder<const ACE_TCHAR *> *char_star_value; +using char_star_key = ACE_Future_Rep<const ACE_TCHAR *> *; +using char_star_value = ACE_Future_Holder<const ACE_TCHAR *> *; #endif /* ACE_HAS_THREADS */ diff --git a/ACE/tests/Future_Test.cpp b/ACE/tests/Future_Test.cpp index a1bdd6867c7..2340b684fe4 100644 --- a/ACE/tests/Future_Test.cpp +++ b/ACE/tests/Future_Test.cpp @@ -30,7 +30,7 @@ #if defined (ACE_HAS_THREADS) -typedef ACE_Atomic_Op<ACE_Thread_Mutex, int> ATOMIC_INT; +using ATOMIC_INT = ACE_Atomic_Op<ACE_Thread_Mutex, int>; // A counter for the tasks.. static ATOMIC_INT task_count (0); diff --git a/ACE/tests/Hash_Map_Bucket_Iterator_Test.cpp b/ACE/tests/Hash_Map_Bucket_Iterator_Test.cpp index c1b0a5233e6..2f2f8ac5422 100644 --- a/ACE/tests/Hash_Map_Bucket_Iterator_Test.cpp +++ b/ACE/tests/Hash_Map_Bucket_Iterator_Test.cpp @@ -51,17 +51,9 @@ parse_args (int argc, ACE_TCHAR *argv[]) return 0; } -typedef ACE_Hash_Map_Manager_Ex<ACE_UINT32, - ACE_UINT32, - ACE_Hash<ACE_UINT32>, - ACE_Equal_To<ACE_UINT32>, - ACE_SYNCH_NULL_MUTEX> HASH_MAP; - -typedef ACE_Hash_Map_Bucket_Iterator<ACE_UINT32, - ACE_UINT32, - ACE_Hash<ACE_UINT32>, - ACE_Equal_To<ACE_UINT32>, - ACE_SYNCH_NULL_MUTEX> HASH_MAP_BUCKET_ITERATOR; +using HASH_MAP = ACE_Hash_Map_Manager_Ex<ACE_UINT32, ACE_UINT32, ACE_Hash<ACE_UINT32>, ACE_Equal_To<ACE_UINT32>, ACE_MT_SYNCH::NULL_MUTEX>; + +using HASH_MAP_BUCKET_ITERATOR = ACE_Hash_Map_Bucket_Iterator<ACE_UINT32, ACE_UINT32, ACE_Hash<ACE_UINT32>, ACE_Equal_To<ACE_UINT32>, ACE_MT_SYNCH::NULL_MUTEX>; int run_main (int argc, ACE_TCHAR *argv[]) diff --git a/ACE/tests/Hash_Map_Manager_Test.cpp b/ACE/tests/Hash_Map_Manager_Test.cpp index b6aa0dbd23c..034c73e80ba 100644 --- a/ACE/tests/Hash_Map_Manager_Test.cpp +++ b/ACE/tests/Hash_Map_Manager_Test.cpp @@ -24,8 +24,7 @@ static const size_t STRING_TABLE_ENTRIES = 3 * 2; static const size_t MAX_HASH = 6; -typedef ACE_Hash_Map_Entry<const ACE_TCHAR *, - const ACE_TCHAR *> HASH_STRING_ENTRY; +using HASH_STRING_ENTRY = ACE_Hash_Map_Entry<const ACE_TCHAR *, const ACE_TCHAR *>; // @@ The following requires too much internal implementation // information about the <ACE_Hash_Map_Manager>. We need to figure @@ -35,29 +34,13 @@ static const size_t STRING_TABLE_SIZE = static ACE_Static_Allocator<STRING_TABLE_SIZE> ace_test_allocator; -typedef ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, - const ACE_TCHAR *, - ACE_Hash<const ACE_TCHAR *>, - ACE_Equal_To<const ACE_TCHAR *>, - ACE_Null_Mutex> HASH_STRING_MAP; - -typedef ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, - const ACE_TCHAR *, - ACE_Hash<const ACE_TCHAR *>, - ACE_Equal_To<const ACE_TCHAR *>, - ACE_Null_Mutex> HASH_STRING_ITER; - -typedef ACE_Hash_Map_Const_Iterator_Ex<const ACE_TCHAR *, - const ACE_TCHAR *, - ACE_Hash<const ACE_TCHAR *>, - ACE_Equal_To<const ACE_TCHAR *>, - ACE_Null_Mutex> HASH_STRING_CONST_ITER; - -typedef ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, - const ACE_TCHAR *, - ACE_Hash<const ACE_TCHAR *>, - ACE_Equal_To<const ACE_TCHAR *>, - ACE_Null_Mutex> HASH_STRING_REVERSE_ITER; +using HASH_STRING_MAP = ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>; + +using HASH_STRING_ITER = ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>; + +using HASH_STRING_CONST_ITER = ACE_Hash_Map_Const_Iterator_Ex<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>; + +using HASH_STRING_REVERSE_ITER = ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>; struct String_Table { diff --git a/ACE/tests/Hash_Multi_Map_Manager_Test.cpp b/ACE/tests/Hash_Multi_Map_Manager_Test.cpp index 6080e97fe3f..144befd426b 100644 --- a/ACE/tests/Hash_Multi_Map_Manager_Test.cpp +++ b/ACE/tests/Hash_Multi_Map_Manager_Test.cpp @@ -17,18 +17,14 @@ -typedef ACE_Hash_Multi_Map_Manager<const ACE_TCHAR *, - const ACE_TCHAR *, - ACE_Hash<const ACE_TCHAR *>, - ACE_Equal_To<const ACE_TCHAR *>, - ACE_Null_Mutex> HASH_STRING_MAP; - -typedef HASH_STRING_MAP::ENTRY HASH_STRING_ENTRY; -typedef HASH_STRING_ENTRY::VALUE_SET HASH_STRING_VALUE_SET; -typedef HASH_STRING_ENTRY::VALUE_SET_ITERATOR HASH_STRING_VALUE_SET_ITERATOR; -typedef HASH_STRING_MAP::ITERATOR HASH_STRING_ITERATOR; -typedef HASH_STRING_MAP::CONST_ITERATOR HASH_STRING_CONST_ITERATOR; -typedef HASH_STRING_MAP::REVERSE_ITERATOR HASH_STRING_REVERSE_ITERATOR; +using HASH_STRING_MAP = ACE_Hash_Multi_Map_Manager<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>; + +using HASH_STRING_ENTRY = HASH_STRING_MAP::ENTRY; +using HASH_STRING_VALUE_SET = HASH_STRING_ENTRY::VALUE_SET; +using HASH_STRING_VALUE_SET_ITERATOR = HASH_STRING_ENTRY::VALUE_SET_ITERATOR; +using HASH_STRING_ITERATOR = HASH_STRING_MAP::ITERATOR; +using HASH_STRING_CONST_ITERATOR = HASH_STRING_MAP::CONST_ITERATOR; +using HASH_STRING_REVERSE_ITERATOR = HASH_STRING_MAP::REVERSE_ITERATOR; static const ACE_TCHAR *color_sorts[] = {ACE_TEXT ("warm"), ACE_TEXT ("cold"), ACE_TEXT ("neutral"), 0}; static const ACE_TCHAR *warm_colors[] = {ACE_TEXT ("red"), ACE_TEXT ("yellow"), ACE_TEXT ("orange"), 0}; diff --git a/ACE/tests/Integer_Truncate_Test.cpp b/ACE/tests/Integer_Truncate_Test.cpp index 4d11a38f3da..0ba6b9fad83 100644 --- a/ACE/tests/Integer_Truncate_Test.cpp +++ b/ACE/tests/Integer_Truncate_Test.cpp @@ -30,8 +30,8 @@ sizeof_from_lt_sizeof_to () // signed from_type, unsigned to_type { - typedef signed char from_type; - typedef unsigned int to_type; + using from_type = signed char; + using to_type = unsigned int; ACE_TEST_ASSERT (sizeof (from_type) < sizeof (to_type)); @@ -50,8 +50,8 @@ sizeof_from_lt_sizeof_to () // unsigned from_type, signed to_type { - typedef unsigned char from_type; - typedef signed int to_type; + using from_type = unsigned char; + using to_type = int; ACE_TEST_ASSERT (sizeof (from_type) < sizeof (to_type)); @@ -70,8 +70,8 @@ sizeof_from_lt_sizeof_to () // signed from_type, signed to_type { - typedef signed char from_type; - typedef signed int to_type; + using from_type = signed char; + using to_type = int; ACE_TEST_ASSERT (sizeof (from_type) < sizeof (to_type)); @@ -92,8 +92,8 @@ sizeof_from_lt_sizeof_to () // unsigned from_type, unsigned to_type { - typedef unsigned char from_type; - typedef unsigned int to_type; + using from_type = unsigned char; + using to_type = unsigned int; ACE_TEST_ASSERT (sizeof (from_type) < sizeof (to_type)); @@ -129,8 +129,8 @@ sizeof_from_eq_sizeof_to () // signed from_type, unsigned to_type { - typedef signed int from_type; - typedef unsigned int to_type; + using from_type = int; + using to_type = unsigned int; ACE_TEST_ASSERT (sizeof (from_type) == sizeof (to_type)); @@ -151,8 +151,8 @@ sizeof_from_eq_sizeof_to () // unsigned from_type, signed to_type { - typedef unsigned int from_type; - typedef signed int to_type; + using from_type = unsigned int; + using to_type = int; ACE_TEST_ASSERT (sizeof (from_type) == sizeof (to_type)); @@ -171,8 +171,8 @@ sizeof_from_eq_sizeof_to () // signed from_type, signed to_type { - typedef signed int from_type; - typedef signed int to_type; + using from_type = int; + using to_type = int; ACE_TEST_ASSERT (sizeof (from_type) == sizeof (to_type)); @@ -193,8 +193,8 @@ sizeof_from_eq_sizeof_to () // unsigned from_type, unsigned to_type { - typedef unsigned int from_type; - typedef unsigned int to_type; + using from_type = unsigned int; + using to_type = unsigned int; ACE_TEST_ASSERT (sizeof (from_type) == sizeof (to_type)); @@ -230,8 +230,8 @@ sizeof_from_gt_sizeof_to () // signed from_type, unsigned to_type { - typedef signed int from_type; - typedef unsigned char to_type; + using from_type = int; + using to_type = unsigned char; ACE_TEST_ASSERT (sizeof (from_type) > sizeof (to_type)); @@ -250,8 +250,8 @@ sizeof_from_gt_sizeof_to () // unsigned from_type, signed to_type { - typedef unsigned int from_type; - typedef signed char to_type; + using from_type = unsigned int; + using to_type = signed char; ACE_TEST_ASSERT (sizeof (from_type) > sizeof (to_type)); @@ -270,8 +270,8 @@ sizeof_from_gt_sizeof_to () // signed from_type, signed to_type { - typedef signed int from_type; - typedef signed char to_type; + using from_type = int; + using to_type = signed char; ACE_TEST_ASSERT (sizeof (from_type) > sizeof (to_type)); @@ -292,8 +292,8 @@ sizeof_from_gt_sizeof_to () // unsigned from_type, unsigned to_type { - typedef unsigned int from_type; - typedef unsigned char to_type; + using from_type = unsigned int; + using to_type = unsigned char; ACE_TEST_ASSERT (sizeof (from_type) > sizeof (to_type)); @@ -352,7 +352,7 @@ run_main (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Integer_Truncate_Test")); - typedef bool (*test_func) (); + using test_func = bool (*)(); static test_func const tests[] = { diff --git a/ACE/tests/Lazy_Map_Manager_Test.cpp b/ACE/tests/Lazy_Map_Manager_Test.cpp index cfdb5a8b31b..22bae652ccc 100644 --- a/ACE/tests/Lazy_Map_Manager_Test.cpp +++ b/ACE/tests/Lazy_Map_Manager_Test.cpp @@ -19,7 +19,7 @@ // Simple map manager. -typedef ACE_Map_Manager<int, int, ACE_Null_Mutex> LAZY_MAP; +using LAZY_MAP = ACE_Map_Manager<int, int, ACE_Null_Mutex>; // Displaying the contents of a map manager. @@ -163,7 +163,7 @@ map_test () } // Simple active map manager. -typedef ACE_Active_Map_Manager<int> ACTIVE_MAP; +using ACTIVE_MAP = ACE_Active_Map_Manager<int>; // Displaying the contents of an active map manager. diff --git a/ACE/tests/MEM_Stream_Test.cpp b/ACE/tests/MEM_Stream_Test.cpp index b41456d4df5..8cc11482e4a 100644 --- a/ACE/tests/MEM_Stream_Test.cpp +++ b/ACE/tests/MEM_Stream_Test.cpp @@ -63,14 +63,14 @@ static const int opt_wfmo_reactor = 1; static int opt_select_reactor = 1; static ACE_MEM_IO::Signal_Strategy client_strategy = ACE_MEM_IO::Reactive; -typedef ACE_Atomic_Op <ACE_SYNCH_MUTEX, u_short> WaitingCounter; -typedef ACE_Singleton <WaitingCounter, ACE_SYNCH_RECURSIVE_MUTEX> Waiting; +using WaitingCounter = ACE_Atomic_Op<ACE_MT_SYNCH::MUTEX, u_short>; +using Waiting = ACE_Singleton<WaitingCounter, ACE_MT_SYNCH::RECURSIVE_MUTEX>; // Number of connections that are currently open static u_short connection_count = 0; -typedef ACE_Acceptor<Echo_Handler, ACE_MEM_ACCEPTOR> ACCEPTOR; -typedef ACE_Strategy_Acceptor<Echo_Handler, ACE_MEM_ACCEPTOR> S_ACCEPTOR; +using ACCEPTOR = ACE_Acceptor<Echo_Handler, ACE_MEM_Acceptor>; +using S_ACCEPTOR = ACE_Strategy_Acceptor<Echo_Handler, ACE_MEM_Acceptor>; void reset_handler (int conn) { diff --git a/ACE/tests/MT_NonBlocking_Connect_Test.cpp b/ACE/tests/MT_NonBlocking_Connect_Test.cpp index 6402fc7d8bf..93a0a8706c5 100644 --- a/ACE/tests/MT_NonBlocking_Connect_Test.cpp +++ b/ACE/tests/MT_NonBlocking_Connect_Test.cpp @@ -121,12 +121,10 @@ Concurrency_Strategy<SVC_HANDLER>:: } } -typedef ACE_Creation_Strategy<Svc_Handler> CREATION_STRATEGY; -typedef ACE_Connect_Strategy<Svc_Handler, - ACE_SOCK_CONNECTOR> CONNECT_STRATEGY; -typedef Concurrency_Strategy<Svc_Handler> CONCURRENCY_STRATEGY; -typedef ACE_Strategy_Connector<Svc_Handler, - ACE_SOCK_CONNECTOR> BASE_CONNECTOR; +using CREATION_STRATEGY = ACE_Creation_Strategy<Svc_Handler>; +using CONNECT_STRATEGY = ACE_Connect_Strategy<Svc_Handler, ACE_SOCK_Connector>; +using CONCURRENCY_STRATEGY = Concurrency_Strategy<Svc_Handler>; +using BASE_CONNECTOR = ACE_Strategy_Connector<Svc_Handler, ACE_SOCK_Connector>; class Connect_Thread : public ACE_Task_Base { diff --git a/ACE/tests/Malloc_Test.cpp b/ACE/tests/Malloc_Test.cpp index e3fbe50c46f..430e23c74f7 100644 --- a/ACE/tests/Malloc_Test.cpp +++ b/ACE/tests/Malloc_Test.cpp @@ -28,7 +28,7 @@ #if defined (ACE_HAS_PROCESS_SPAWN) #if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1) -typedef ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block> MALLOC; +using MALLOC = ACE_Malloc_T<ACE_MMAP_Memory_Pool, ACE_Process_Mutex, ACE_PI_Control_Block>; #else typedef ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex> MALLOC; #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ diff --git a/ACE/tests/Map_Manager_Test.cpp b/ACE/tests/Map_Manager_Test.cpp index 2a52e40804b..d55135235f7 100644 --- a/ACE/tests/Map_Manager_Test.cpp +++ b/ACE/tests/Map_Manager_Test.cpp @@ -22,51 +22,31 @@ #include "ace/Hash_Cache_Map_Manager_T.h" #include "ace/Caching_Strategies_T.h" -typedef ACE_Null_Mutex MUTEX; -typedef ACE_UINT32 TYPE; -typedef ACE_Active_Map_Manager_Key - ACTIVE_KEY; -typedef ACE_Hash<TYPE> - HASH_KEY; -typedef ACE_Equal_To<TYPE> - COMPARE_KEYS; - -typedef ACE_Map_Manager <TYPE, TYPE, MUTEX> - MAP_MANAGER; -typedef ACE_Map_Iterator <TYPE, TYPE, MUTEX> - ITERATOR; -typedef ACE_Map_Reverse_Iterator <TYPE, TYPE, MUTEX> - REVERSE_ITERATOR; -typedef ACE_Map_Entry <TYPE, TYPE> - MAP_ENTRY; -typedef ACE_Hash_Map_Manager_Ex <TYPE, TYPE, HASH_KEY, COMPARE_KEYS, MUTEX> - HASH_MAP_MANAGER; -typedef ACE_Hash_Map_Iterator_Ex <TYPE, TYPE, HASH_KEY, COMPARE_KEYS, MUTEX> - HASH_ITERATOR; -typedef ACE_Hash_Map_Reverse_Iterator_Ex <TYPE, TYPE, HASH_KEY, COMPARE_KEYS, MUTEX> - HASH_REVERSE_ITERATOR; -typedef ACE_Hash_Map_Entry <TYPE, TYPE> - HASH_ENTRY; -typedef ACE_Active_Map_Manager <TYPE> - ACTIVE_MAP_MANAGER; - -typedef ACE_Hash_Map_Manager_Ex<TYPE, std::pair<TYPE, int>, HASH_KEY, COMPARE_KEYS, MUTEX> - CACHE_MAP_IMPL; -typedef ACE_Hash_Map_Iterator_Ex<TYPE, std::pair<TYPE, int>, HASH_KEY, COMPARE_KEYS, MUTEX> - CACHE_ITER_IMPL; -typedef ACE_Hash_Map_Reverse_Iterator_Ex<TYPE, std::pair<TYPE, int>, HASH_KEY, COMPARE_KEYS, MUTEX> - CACHE_REV_ITER_IMPL; -typedef int ATTR; -typedef ACE_Null_Cleanup_Strategy<TYPE, TYPE, CACHE_MAP_IMPL> - NULL_CLEANUP; -typedef ACE_Null_Caching_Utility <TYPE, TYPE, CACHE_MAP_IMPL, CACHE_ITER_IMPL, ATTR> - NULL_UTILITY; -typedef ACE_Null_Caching_Strategy<ATTR, NULL_UTILITY> - NULL_CACHING_STRATEGY; -typedef ACE_Cache_Map_Manager<TYPE, TYPE, CACHE_MAP_IMPL, CACHE_ITER_IMPL, CACHE_REV_ITER_IMPL, NULL_CACHING_STRATEGY, ATTR> - CACHE_MAP_MANAGER; -typedef ACE_Hash_Cache_Map_Manager<TYPE, TYPE, HASH_KEY, COMPARE_KEYS, NULL_CACHING_STRATEGY, ATTR> - HASH_CACHE_MAP_MANAGER; +using MUTEX = ACE_Null_Mutex; +using TYPE = ACE_UINT32; +using ACTIVE_KEY = ACE_Active_Map_Manager_Key; +using HASH_KEY = ACE_Hash<TYPE>; +using COMPARE_KEYS = ACE_Equal_To<TYPE>; + +using MAP_MANAGER = ACE_Map_Manager<TYPE, TYPE, MUTEX>; +using ITERATOR = ACE_Map_Iterator<TYPE, TYPE, MUTEX>; +using REVERSE_ITERATOR = ACE_Map_Reverse_Iterator<TYPE, TYPE, MUTEX>; +using MAP_ENTRY = ACE_Map_Entry<TYPE, TYPE>; +using HASH_MAP_MANAGER = ACE_Hash_Map_Manager_Ex<TYPE, TYPE, HASH_KEY, COMPARE_KEYS, MUTEX>; +using HASH_ITERATOR = ACE_Hash_Map_Iterator_Ex<TYPE, TYPE, HASH_KEY, COMPARE_KEYS, MUTEX>; +using HASH_REVERSE_ITERATOR = ACE_Hash_Map_Reverse_Iterator_Ex<TYPE, TYPE, HASH_KEY, COMPARE_KEYS, MUTEX>; +using HASH_ENTRY = ACE_Hash_Map_Entry<TYPE, TYPE>; +using ACTIVE_MAP_MANAGER = ACE_Active_Map_Manager<TYPE>; + +using CACHE_MAP_IMPL = ACE_Hash_Map_Manager_Ex<TYPE, std::pair<TYPE, int>, HASH_KEY, COMPARE_KEYS, MUTEX>; +using CACHE_ITER_IMPL = ACE_Hash_Map_Iterator_Ex<TYPE, std::pair<TYPE, int>, HASH_KEY, COMPARE_KEYS, MUTEX>; +using CACHE_REV_ITER_IMPL = ACE_Hash_Map_Reverse_Iterator_Ex<TYPE, std::pair<TYPE, int>, HASH_KEY, COMPARE_KEYS, MUTEX>; +using ATTR = int; +using NULL_CLEANUP = ANCLE<TYPE, TYPE, CACHE_MAP_IMPL>; +using NULL_UTILITY = ACE_Null_Caching_Utility<TYPE, TYPE, CACHE_MAP_IMPL, CACHE_ITER_IMPL, ATTR>; +using NULL_CACHING_STRATEGY = ANULL<ATTR, NULL_UTILITY>; +using CACHE_MAP_MANAGER = ACMM<TYPE, TYPE, CACHE_MAP_IMPL, CACHE_ITER_IMPL, CACHE_REV_ITER_IMPL, NULL_CACHING_STRATEGY, ATTR>; +using HASH_CACHE_MAP_MANAGER = ACE_Hash_Cache_Map_Manager<TYPE, TYPE, HASH_KEY, COMPARE_KEYS, NULL_CACHING_STRATEGY, ATTR>; static int test_cache_map_manager (size_t table_size, diff --git a/ACE/tests/Map_Test.cpp b/ACE/tests/Map_Test.cpp index 6de7224501e..91c55896b43 100644 --- a/ACE/tests/Map_Test.cpp +++ b/ACE/tests/Map_Test.cpp @@ -25,19 +25,19 @@ : ACE_VERSIONED_NAMESPACE_NAME::__ace_assert(__FILE__, __LINE__, ACE_TEXT_CHAR_TO_TCHAR (#X))) // Value type. -typedef size_t VALUE; +using VALUE = size_t; // Generic map type. -typedef ACE_Map<KEY, VALUE> TEST_MAP; +using TEST_MAP = ACE_Map<KEY, VALUE>; // Manager Manager adapter. -typedef ACE_Map_Manager_Adapter<KEY, VALUE, Key_Generator> MAP_MANAGER_ADAPTER; +using MAP_MANAGER_ADAPTER = ACE_Map_Manager_Adapter<KEY, VALUE, Key_Generator>; // Hash Manager Manager adapter. -typedef ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, Hash_Key, ACE_Equal_To<KEY>, Key_Generator> HASH_MAP_MANAGER_ADAPTER; +using HASH_MAP_MANAGER_ADAPTER = ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, Hash_Key, ACE_Equal_To<KEY>, Key_Generator>; // Active Manager Manager adapter. -typedef ACE_Active_Map_Manager_Adapter<KEY, VALUE, Key_Adapter> ACTIVE_MAP_MANAGER_ADAPTER; +using ACTIVE_MAP_MANAGER_ADAPTER = ACE_Active_Map_Manager_Adapter<KEY, VALUE, Key_Adapter>; static void functionality_test (TEST_MAP &map, diff --git a/ACE/tests/Message_Queue_Test.cpp b/ACE/tests/Message_Queue_Test.cpp index 5e602a39fd9..0e3768ab837 100644 --- a/ACE/tests/Message_Queue_Test.cpp +++ b/ACE/tests/Message_Queue_Test.cpp @@ -41,9 +41,9 @@ const ACE_TCHAR usage[] = ACE_TEXT ("usage: Message_Queue_Test <number of messages>\n"); -typedef ACE_Message_Queue<ACE_NULL_SYNCH> QUEUE; -typedef ACE_Message_Queue_Iterator<ACE_NULL_SYNCH> ITERATOR; -typedef ACE_Message_Queue_Reverse_Iterator<ACE_NULL_SYNCH> REVERSE_ITERATOR; +using QUEUE = ACE_Message_Queue<ACE_NULL_SYNCH>; +using ITERATOR = ACE_Message_Queue_Iterator<ACE_NULL_SYNCH>; +using REVERSE_ITERATOR = ACE_Message_Queue_Reverse_Iterator<ACE_NULL_SYNCH>; #if defined (ACE_HAS_WINCE) static const int MESSAGE_FACTOR = 10000; @@ -60,7 +60,7 @@ static int max_messages = MAX_MESSAGES; static ACE_High_Res_Timer *timer = 0; #if defined (ACE_HAS_THREADS) -typedef ACE_Message_Queue<ACE_MT_SYNCH> SYNCH_QUEUE; +using SYNCH_QUEUE = ACE_Message_Queue<ACE_MT_SYNCH>; struct Queue_Wrapper { diff --git a/ACE/tests/Message_Queue_Test_Ex.cpp b/ACE/tests/Message_Queue_Test_Ex.cpp index c14496c13cf..3182d2c6d0b 100644 --- a/ACE/tests/Message_Queue_Test_Ex.cpp +++ b/ACE/tests/Message_Queue_Test_Ex.cpp @@ -34,7 +34,7 @@ const ACE_TCHAR usage[] = ACE_TEXT ("usage: Message_Queue_Test_Ex <number of messages>\n"); -typedef ACE_Message_Queue_Ex<User_Class, ACE_NULL_SYNCH> QUEUE; +using QUEUE = ACE_Message_Queue_Ex<User_Class, ACE_NULL_SYNCH>; static const int MAX_MESSAGES = 10000; static const char test_message[] = "ACE_Message_Queue_Ex Test Message"; @@ -61,7 +61,7 @@ print_message (const ACE_TCHAR *message) } #if defined (ACE_HAS_THREADS) -typedef ACE_Message_Queue_Ex<User_Class, ACE_MT_SYNCH> SYNCH_QUEUE; +using SYNCH_QUEUE = ACE_Message_Queue_Ex<User_Class, ACE_MT_SYNCH>; /** * Container for data passed to sender and receiver in diff --git a/ACE/tests/Monotonic_Message_Queue_Test.cpp b/ACE/tests/Monotonic_Message_Queue_Test.cpp index 2e18f66a567..846761d312e 100644 --- a/ACE/tests/Monotonic_Message_Queue_Test.cpp +++ b/ACE/tests/Monotonic_Message_Queue_Test.cpp @@ -39,7 +39,7 @@ # endif # if defined (ACE_HAS_THREADS) -typedef ACE_Message_Queue<ACE_MT_SYNCH, ACE_Monotonic_Time_Policy> SYNCH_QUEUE; +using SYNCH_QUEUE = ACE_Message_Queue<ACE_MT_SYNCH, ACE_Monotonic_Time_Policy>; // Create timer queue with hr support ACE_Timer_Queue * @@ -47,10 +47,7 @@ create_timer_queue () { ACE_Timer_Queue * tmq = 0; - typedef ACE_Timer_Heap_T<ACE_Event_Handler *, - ACE_Event_Handler_Handle_Timeout_Upcall, - ACE_SYNCH_RECURSIVE_MUTEX, - ACE_HR_Time_Policy> timer_queue_type; + using timer_queue_type = ACE_Timer_Heap_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall, ACE_MT_SYNCH::RECURSIVE_MUTEX, ACE_HR_Time_Policy>; ACE_NEW_RETURN (tmq, timer_queue_type (), 0); return tmq; diff --git a/ACE/tests/Multicast_Interfaces_Test.cpp b/ACE/tests/Multicast_Interfaces_Test.cpp index d3b75586661..5455277bc86 100644 --- a/ACE/tests/Multicast_Interfaces_Test.cpp +++ b/ACE/tests/Multicast_Interfaces_Test.cpp @@ -28,7 +28,7 @@ #include <set> -typedef std::set<ACE_TString> nameset; +using nameset = std::set<ACE_TString>; #if defined (ACE_WIN32) void diff --git a/ACE/tests/NonBlocking_Conn_Test.cpp b/ACE/tests/NonBlocking_Conn_Test.cpp index 811ba8656be..8c1019093b7 100644 --- a/ACE/tests/NonBlocking_Conn_Test.cpp +++ b/ACE/tests/NonBlocking_Conn_Test.cpp @@ -78,7 +78,7 @@ Svc_Handler::handle_close (ACE_HANDLE handle, ACE_Reactor_Mask mask) // handle_close() as it does plain 'delete this'. if (!this->is_ref_counted_) { - typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> super; + using super = ACE_Svc_Handler<ACE_SOCK_Stream, ACE_NULL_SYNCH>; return super::handle_close (handle, mask); } @@ -86,7 +86,7 @@ Svc_Handler::handle_close (ACE_HANDLE handle, ACE_Reactor_Mask mask) return 0; } -typedef ACE_Connector<Svc_Handler, ACE_SOCK_CONNECTOR> CONNECTOR; +using CONNECTOR = ACE_Connector<Svc_Handler, ACE_SOCK_Connector>; static const char* hosts[] = { "www.russiantvguide.com:80", diff --git a/ACE/tests/OS_Test.cpp b/ACE/tests/OS_Test.cpp index 4ffc3bf4511..abe20bdc17a 100644 --- a/ACE/tests/OS_Test.cpp +++ b/ACE/tests/OS_Test.cpp @@ -578,7 +578,7 @@ string_emulation_test () } // Test ACE_OS::snprintf -typedef int (*SNPrintF_t) (char *buf, size_t maxlen, const char *format, ...); +using SNPrintF_t = int (*)(char *, size_t, const char *, ...); int snprintf_test (SNPrintF_t fn) diff --git a/ACE/tests/Priority_Reactor_Test.cpp b/ACE/tests/Priority_Reactor_Test.cpp index 68f8f32af34..0716cd080f4 100644 --- a/ACE/tests/Priority_Reactor_Test.cpp +++ b/ACE/tests/Priority_Reactor_Test.cpp @@ -56,10 +56,8 @@ static int opt_max_duration = 60; // -m option. static int max_retries = 5; -typedef ACE_Connector<Write_Handler, ACE_SOCK_CONNECTOR> - CONNECTOR; -typedef ACE_Acceptor<Read_Handler, ACE_SOCK_ACCEPTOR> - ACCEPTOR; +using CONNECTOR = ACE_Connector<Write_Handler, ACE_SOCK_Connector>; +using ACCEPTOR = ACE_Acceptor<Read_Handler, ACE_SOCK_Acceptor>; int Read_Handler::waiting_ = 0; int Read_Handler::started_ = 0; diff --git a/ACE/tests/Proactor_Test.cpp b/ACE/tests/Proactor_Test.cpp index dadc6f24e7e..04bea2e7779 100644 --- a/ACE/tests/Proactor_Test.cpp +++ b/ACE/tests/Proactor_Test.cpp @@ -58,7 +58,7 @@ // Proactor Type (UNIX only, Win32 ignored) -typedef enum { DEFAULT = 0, AIOCB, SIG, SUN, CB } ProactorType; +using ProactorType = enum { DEFAULT = 0, AIOCB, SIG, SUN, CB }; static ProactorType proactor_type = DEFAULT; // POSIX : > 0 max number aio operations proactor, diff --git a/ACE/tests/Proactor_Test_IPV6.cpp b/ACE/tests/Proactor_Test_IPV6.cpp index a4ca1dd4412..c76eb0b62c9 100644 --- a/ACE/tests/Proactor_Test_IPV6.cpp +++ b/ACE/tests/Proactor_Test_IPV6.cpp @@ -59,7 +59,7 @@ // Proactor Type (UNIX only, Win32 ignored) -typedef enum { DEFAULT = 0, AIOCB, SIG, SUN, CB } ProactorType; +using ProactorType = enum { DEFAULT = 0, AIOCB, SIG, SUN, CB }; static ProactorType proactor_type = DEFAULT; // POSIX : > 0 max number aio operations proactor, diff --git a/ACE/tests/Proactor_Timer_Test.cpp b/ACE/tests/Proactor_Timer_Test.cpp index a247b1dcaed..8fdc0af8a89 100644 --- a/ACE/tests/Proactor_Timer_Test.cpp +++ b/ACE/tests/Proactor_Timer_Test.cpp @@ -308,7 +308,7 @@ run_main (int argc, ACE_TCHAR *[]) // to do it right in at least one test. Notice the lack of // ACE_NEW_RETURN, that monstrosity has no business in proper C++ // code ... - typedef ACE_Timer_Heap_T<ACE_Handler*,ACE_Proactor_Handle_Timeout_Upcall,ACE_SYNCH_RECURSIVE_MUTEX,ACE_FPointer_Time_Policy> Timer_Queue; + using Timer_Queue = ACE_Timer_Heap_T<ACE_Handler *, ACE_Proactor_Handle_Timeout_Upcall, ACE_MT_SYNCH::RECURSIVE_MUTEX, ACE_FPointer_Time_Policy>; std::unique_ptr<Timer_Queue> tq(new Timer_Queue); // ... notice how the policy is in the derived timer queue type. diff --git a/ACE/tests/Proactor_UDP_Test.cpp b/ACE/tests/Proactor_UDP_Test.cpp index c4ccd4fe2af..9f4cbd438fb 100644 --- a/ACE/tests/Proactor_UDP_Test.cpp +++ b/ACE/tests/Proactor_UDP_Test.cpp @@ -52,7 +52,7 @@ #endif /* ACE_WIN32 */ // Proactor Type (UNIX only, Win32 ignored) -typedef enum { DEFAULT = 0, AIOCB, SIG, SUN, CB } ProactorType; +using ProactorType = enum { DEFAULT = 0, AIOCB, SIG, SUN, CB }; static ProactorType proactor_type = DEFAULT; // POSIX : > 0 max number aio operations proactor, diff --git a/ACE/tests/Process_Env_Test.cpp b/ACE/tests/Process_Env_Test.cpp index 8334dbd15a3..ca8acbf66ce 100644 --- a/ACE/tests/Process_Env_Test.cpp +++ b/ACE/tests/Process_Env_Test.cpp @@ -14,8 +14,7 @@ #include "ace/Process.h" #include "ace/SString.h" -typedef void (*setenvfn_t) (const ACE_TCHAR *name, const ACE_TCHAR *value, - void *ctx); +using setenvfn_t = void (*)(const ACE_TCHAR *, const ACE_TCHAR *, void *); #if defined (ACE_WIN32) && !defined (ACE_USES_WCHAR) && !defined (ACE_HAS_WINCE) diff --git a/ACE/tests/Process_Strategy_Test.cpp b/ACE/tests/Process_Strategy_Test.cpp index cccb0a7554a..8b29d634394 100644 --- a/ACE/tests/Process_Strategy_Test.cpp +++ b/ACE/tests/Process_Strategy_Test.cpp @@ -58,10 +58,10 @@ ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Singleton, Options, ACE_Null_Mutex); // Define a <Strategy_Acceptor> that's parameterized by the // <Counting_Service>. -typedef ACE_Strategy_Acceptor <Counting_Service, ACE_SOCK_ACCEPTOR> ACCEPTOR; +using ACCEPTOR = ACE_Strategy_Acceptor<Counting_Service, ACE_SOCK_Acceptor>; // Create an Options Singleton. -typedef ACE_Singleton<Options, ACE_Null_Mutex> OPTIONS; +using OPTIONS = ACE_Singleton<Options, ACE_Null_Mutex>; // counter for connections static size_t connections = 0; diff --git a/ACE/tests/RB_Tree_Test.cpp b/ACE/tests/RB_Tree_Test.cpp index 1656e1b803f..f2568ce66bc 100644 --- a/ACE/tests/RB_Tree_Test.cpp +++ b/ACE/tests/RB_Tree_Test.cpp @@ -28,10 +28,10 @@ // Type definitions for the four distinct parameterizations of the // test. -typedef ACE_RB_Tree_Test<int, int, ACE_Less_Than<int>, ACE_Null_Mutex> INT_INT_RB_TREE_TEST; -typedef ACE_RB_Tree_Test<int, const char *, ACE_Less_Than<int>, ACE_Null_Mutex> INT_STR_RB_TREE_TEST; -typedef ACE_RB_Tree_Test<const char *, int, ACE_Less_Than<const char *>, ACE_Null_Mutex> STR_INT_RB_TREE_TEST; -typedef ACE_RB_Tree_Test<const char *, const char *, ACE_Less_Than<const char *>, ACE_Null_Mutex> STR_STR_RB_TREE_TEST; +using INT_INT_RB_TREE_TEST = ACE_RB_Tree_Test<int, int, ACE_Less_Than<int>, ACE_Null_Mutex>; +using INT_STR_RB_TREE_TEST = ACE_RB_Tree_Test<int, const char *, ACE_Less_Than<int>, ACE_Null_Mutex>; +using STR_INT_RB_TREE_TEST = ACE_RB_Tree_Test<const char *, int, ACE_Less_Than<const char *>, ACE_Null_Mutex>; +using STR_STR_RB_TREE_TEST = ACE_RB_Tree_Test<const char *, const char *, ACE_Less_Than<const char *>, ACE_Null_Mutex>; // Number of entries placed in each tree. static int RB_TREE_TEST_ENTRIES = 8; diff --git a/ACE/tests/Reactor_Fairness_Test.cpp b/ACE/tests/Reactor_Fairness_Test.cpp index 4eacc70a1ee..426adc3e269 100644 --- a/ACE/tests/Reactor_Fairness_Test.cpp +++ b/ACE/tests/Reactor_Fairness_Test.cpp @@ -51,7 +51,7 @@ namespace { // Class to collect and report on data handling for each test pass. struct Result_Set { int nr_conns; - typedef ACE_Array_Map<ACE_HANDLE, unsigned int> report_map; + using report_map = ACE_Array_Map<ACE_HANDLE, unsigned int>; report_map reports; void reset (int n_connections) // Reset for next run diff --git a/ACE/tests/Reactor_Performance_Test.cpp b/ACE/tests/Reactor_Performance_Test.cpp index 0b6f0dd96b3..0578aea9997 100644 --- a/ACE/tests/Reactor_Performance_Test.cpp +++ b/ACE/tests/Reactor_Performance_Test.cpp @@ -162,8 +162,8 @@ Write_Handler::send_data () } // Connection factories -typedef ACE_Connector<Write_Handler, ACE_SOCK_CONNECTOR> CONNECTOR; -typedef ACE_Acceptor<Read_Handler, ACE_SOCK_ACCEPTOR> ACCEPTOR; +using CONNECTOR = ACE_Connector<Write_Handler, ACE_SOCK_Connector>; +using ACCEPTOR = ACE_Acceptor<Read_Handler, ACE_SOCK_Acceptor>; // Execute the client tests. void * diff --git a/ACE/tests/Reactor_Remove_Resume_Test.cpp b/ACE/tests/Reactor_Remove_Resume_Test.cpp index 699cefa1ea9..16f23a6cbf1 100644 --- a/ACE/tests/Reactor_Remove_Resume_Test.cpp +++ b/ACE/tests/Reactor_Remove_Resume_Test.cpp @@ -362,7 +362,7 @@ handle_events (ACE_Reactor & reactor, // ------------------------------------------------------------ -typedef std::unique_ptr<ACE_Reactor_Impl> (*reactor_factory_type) (); +using reactor_factory_type = std::unique_ptr<ACE_Reactor_Impl> (*)(); std::unique_ptr<ACE_Reactor_Impl> tp_reactor_factory () diff --git a/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp b/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp index a28d8ff9ac2..943304eaf49 100644 --- a/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp +++ b/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp @@ -366,7 +366,7 @@ handle_events (ACE_Reactor & reactor, // ------------------------------------------------------------ -typedef std::unique_ptr<ACE_Reactor_Impl> (*reactor_factory_type) (); +using reactor_factory_type = std::unique_ptr<ACE_Reactor_Impl> (*)(); std::unique_ptr<ACE_Reactor_Impl> dev_poll_reactor_factory () diff --git a/ACE/tests/Recursive_Condition_Bug_Test.cpp b/ACE/tests/Recursive_Condition_Bug_Test.cpp index 81de69e74ff..c2e4c9a6f8e 100644 --- a/ACE/tests/Recursive_Condition_Bug_Test.cpp +++ b/ACE/tests/Recursive_Condition_Bug_Test.cpp @@ -27,7 +27,7 @@ // Number of iterations for the performance tests. static int max_iterations = 30; -typedef ACE_Thread_Timer_Queue_Adapter<ACE_Timer_Heap> Thread_Timer_Queue; +using Thread_Timer_Queue = ACE_Thread_Timer_Queue_Adapter<ACE_Timer_Heap>; class Test_Handler; diff --git a/ACE/tests/Recursive_Condition_Test.cpp b/ACE/tests/Recursive_Condition_Test.cpp index 72cba9e06ec..b7b30248c4b 100644 --- a/ACE/tests/Recursive_Condition_Test.cpp +++ b/ACE/tests/Recursive_Condition_Test.cpp @@ -22,7 +22,7 @@ #if defined (ACE_HAS_THREADS) -typedef ACE_Thread_Timer_Queue_Adapter<ACE_Timer_Heap> Thread_Timer_Queue; +using Thread_Timer_Queue = ACE_Thread_Timer_Queue_Adapter<ACE_Timer_Heap>; class Test_Handler : public ACE_Event_Handler { diff --git a/ACE/tests/Recursive_Mutex_Test.cpp b/ACE/tests/Recursive_Mutex_Test.cpp index dab2e6658ab..891cf42b6df 100644 --- a/ACE/tests/Recursive_Mutex_Test.cpp +++ b/ACE/tests/Recursive_Mutex_Test.cpp @@ -35,7 +35,7 @@ typedef ACE_Process_Mutex ACE_TEST_MUTEX; #else # include "ace/Thread_Mutex.h" - typedef ACE_Recursive_Thread_Mutex ACE_TEST_MUTEX; + using ACE_TEST_MUTEX = ACE_Recursive_Thread_Mutex; #endif #if !defined (ACE_HAS_MUTEX_TIMEOUTS) diff --git a/ACE/tests/Refcounted_Auto_Ptr_Test.cpp b/ACE/tests/Refcounted_Auto_Ptr_Test.cpp index e66449d255e..5c79a13ef1b 100644 --- a/ACE/tests/Refcounted_Auto_Ptr_Test.cpp +++ b/ACE/tests/Refcounted_Auto_Ptr_Test.cpp @@ -54,7 +54,7 @@ Printer::print () #if defined (ACE_HAS_THREADS) -typedef ACE_Refcounted_Auto_Ptr<Printer, ACE_Thread_Mutex> Printer_var; +using Printer_var = ACE_Refcounted_Auto_Ptr<Printer, ACE_Thread_Mutex>; /** * @class Scheduler @@ -276,7 +276,7 @@ static int n_loops = 10; // This will be used in a single thread to test the reset and release // methods. See Bugzilla #1925 for history. -typedef ACE_Refcounted_Auto_Ptr <Printer, ACE_Null_Mutex> Printer_Ptr; +using Printer_Ptr = ACE_Refcounted_Auto_Ptr<Printer, ACE_Null_Mutex>; static bool expect (const ACE_TCHAR *name, const Printer_Ptr &ptr, diff --git a/ACE/tests/Reverse_Lock_Test.cpp b/ACE/tests/Reverse_Lock_Test.cpp index f9f8cefd2d6..fa8d5c32868 100644 --- a/ACE/tests/Reverse_Lock_Test.cpp +++ b/ACE/tests/Reverse_Lock_Test.cpp @@ -17,7 +17,7 @@ #include "ace/Guard_T.h" #include "ace/Reverse_Lock_T.h" -typedef ACE_Reverse_Lock<ACE_SYNCH_MUTEX> REVERSE_MUTEX; +using REVERSE_MUTEX = ACE_Reverse_Lock<ACE_MT_SYNCH::MUTEX>; int run_main (int, ACE_TCHAR *[]) diff --git a/ACE/tests/SOCK_SEQPACK_SCTP_Test.cpp b/ACE/tests/SOCK_SEQPACK_SCTP_Test.cpp index e59d8a6925c..ef9d3e0812e 100644 --- a/ACE/tests/SOCK_SEQPACK_SCTP_Test.cpp +++ b/ACE/tests/SOCK_SEQPACK_SCTP_Test.cpp @@ -47,7 +47,7 @@ struct tdesc { bool ipv6_test; }; -typedef struct tdesc tdesc_t; +using tdesc_t = struct tdesc; #ifdef ACE_WIN64 // This arg is ignored on Windows and causes pointer truncation diff --git a/ACE/tests/Singleton_Restart_Test.cpp b/ACE/tests/Singleton_Restart_Test.cpp index 9d1e69b5ab9..f18966df030 100644 --- a/ACE/tests/Singleton_Restart_Test.cpp +++ b/ACE/tests/Singleton_Restart_Test.cpp @@ -23,8 +23,8 @@ void report_error (const ACE_TCHAR *lock) ACE_TEXT ("failed to allocate\n"), lock)); } -typedef ACE_Singleton<int, ACE_SYNCH_MUTEX> Singleton1; -typedef ACE_Singleton<int, ACE_SYNCH_RECURSIVE_MUTEX> Singleton2; +using Singleton1 = ACE_Singleton<int, ACE_MT_SYNCH::MUTEX>; +using Singleton2 = ACE_Singleton<int, ACE_MT_SYNCH::RECURSIVE_MUTEX>; int main () { diff --git a/ACE/tests/Svc_Handler_Test.cpp b/ACE/tests/Svc_Handler_Test.cpp index 459900efb4a..0b1973d4f47 100644 --- a/ACE/tests/Svc_Handler_Test.cpp +++ b/ACE/tests/Svc_Handler_Test.cpp @@ -20,7 +20,7 @@ #include "ace/Svc_Handler.h" #include "ace/Synch_Traits.h" -typedef ACE_Buffered_Svc_Handler <ACE_FILE_IO, ACE_NULL_SYNCH> SVC_HANDLER; +using SVC_HANDLER = ACE_Buffered_Svc_Handler<ACE_FILE_IO, ACE_NULL_SYNCH>; static void run_test (SVC_HANDLER &svc_handler, diff --git a/ACE/tests/Thread_Mutex_Test.cpp b/ACE/tests/Thread_Mutex_Test.cpp index ce31f88090a..b8b0485b56b 100644 --- a/ACE/tests/Thread_Mutex_Test.cpp +++ b/ACE/tests/Thread_Mutex_Test.cpp @@ -32,7 +32,7 @@ typedef ACE_Process_Mutex ACE_TEST_MUTEX; #else # include "ace/Thread_Mutex.h" - typedef ACE_Thread_Mutex ACE_TEST_MUTEX; + using ACE_TEST_MUTEX = ACE_Thread_Mutex; #endif #if !defined (ACE_HAS_MUTEX_TIMEOUTS) diff --git a/ACE/tests/Thread_Pool_Reactor_Resume_Test.cpp b/ACE/tests/Thread_Pool_Reactor_Resume_Test.cpp index a4691f8fc3d..16835222354 100644 --- a/ACE/tests/Thread_Pool_Reactor_Resume_Test.cpp +++ b/ACE/tests/Thread_Pool_Reactor_Resume_Test.cpp @@ -43,7 +43,7 @@ #if defined (ACE_HAS_THREADS) && !defined ACE_LACKS_ACCEPT #include "Thread_Pool_Reactor_Resume_Test.h" -typedef ACE_Strategy_Acceptor <Request_Handler, ACE_SOCK_ACCEPTOR> ACCEPTOR; +using ACCEPTOR = ACE_Strategy_Acceptor<Request_Handler, ACE_SOCK_Acceptor>; // Accepting end point. This is actually "localhost:10010", but some // platform couldn't resolve the name so we use the IP address diff --git a/ACE/tests/Thread_Pool_Reactor_Test.cpp b/ACE/tests/Thread_Pool_Reactor_Test.cpp index 15d718d6c1e..07c134f96fd 100644 --- a/ACE/tests/Thread_Pool_Reactor_Test.cpp +++ b/ACE/tests/Thread_Pool_Reactor_Test.cpp @@ -46,7 +46,7 @@ #if defined (ACE_HAS_THREADS) && !defined ACE_LACKS_ACCEPT #include "Thread_Pool_Reactor_Test.h" -typedef ACE_Strategy_Acceptor <Request_Handler, ACE_SOCK_ACCEPTOR> ACCEPTOR; +using ACCEPTOR = ACE_Strategy_Acceptor<Request_Handler, ACE_SOCK_Acceptor>; // Accepting end point. This is actually "localhost:10010", but some // platform couldn't resolve the name so we use the IP address diff --git a/ACE/tests/Thread_Timer_Queue_Adapter_Test.cpp b/ACE/tests/Thread_Timer_Queue_Adapter_Test.cpp index c43357fdb5f..f932dbd2ad5 100644 --- a/ACE/tests/Thread_Timer_Queue_Adapter_Test.cpp +++ b/ACE/tests/Thread_Timer_Queue_Adapter_Test.cpp @@ -52,9 +52,7 @@ class CCustomEventHandlerUpcall { public: - typedef ACE_Timer_Queue_T<ICustomEventHandler*, - CCustomEventHandlerUpcall, - ACE_Null_Mutex> TTimerQueue; + using TTimerQueue = ACE_Timer_Queue_T<ICustomEventHandler *, CCustomEventHandlerUpcall, ACE_Null_Mutex>; /// Default constructor CCustomEventHandlerUpcall() @@ -162,14 +160,9 @@ class CTestEventHandler : public ICustomEventHandler }; // Used for the actual timer queue thread adapter -typedef ACE_Timer_Wheel_T <ICustomEventHandler*, - CCustomEventHandlerUpcall, - ACE_Null_Mutex> TTimerWheel; -typedef ACE_Timer_Wheel_Iterator_T <ICustomEventHandler*, - CCustomEventHandlerUpcall, - ACE_Null_Mutex> TTimerWheelIterator; -typedef ACE_Thread_Timer_Queue_Adapter<TTimerWheel, - ICustomEventHandler*> TTimerWheelThreadAdapter; +using TTimerWheel = ACE_Timer_Wheel_T<ICustomEventHandler *, CCustomEventHandlerUpcall, ACE_Null_Mutex>; +using TTimerWheelIterator = ACE_Timer_Wheel_Iterator_T<ICustomEventHandler *, CCustomEventHandlerUpcall, ACE_Null_Mutex>; +using TTimerWheelThreadAdapter = ACE_Thread_Timer_Queue_Adapter<TTimerWheel, ICustomEventHandler *>; #endif /* ACE_HAS_THREADS */ diff --git a/ACE/tests/Timer_Queue_Reference_Counting_Test.cpp b/ACE/tests/Timer_Queue_Reference_Counting_Test.cpp index 13050ab67e1..94f7f395e85 100644 --- a/ACE/tests/Timer_Queue_Reference_Counting_Test.cpp +++ b/ACE/tests/Timer_Queue_Reference_Counting_Test.cpp @@ -249,7 +249,7 @@ cancellation_test<TIMER_QUEUE>::cancellation_test (const char *timer_queue_type) } } -typedef int (*Expire_Function) (ACE_Timer_Queue &timer_queue); +using Expire_Function = int (*)(ACE_Timer_Queue &); int invoke_expire (ACE_Timer_Queue &timer_queue) diff --git a/ACE/tests/Timer_Queue_Test.cpp b/ACE/tests/Timer_Queue_Test.cpp index 0cfad45cc1e..dd78a5840a9 100644 --- a/ACE/tests/Timer_Queue_Test.cpp +++ b/ACE/tests/Timer_Queue_Test.cpp @@ -684,11 +684,7 @@ run_main (int argc, ACE_TCHAR *argv[]) -1); // new (optimized) version - typedef ACE_Timer_Heap_T<ACE_Event_Handler *, - ACE_Event_Handler_Handle_Timeout_Upcall, - ACE_SYNCH_RECURSIVE_MUTEX, - ACE_HR_Time_Policy> - timer_heap_hr_type; + using timer_heap_hr_type = ACE_Timer_Heap_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall, ACE_MT_SYNCH::RECURSIVE_MUTEX, ACE_HR_Time_Policy>; ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new timer_heap_hr_type, ACE_TEXT ("ACE_Timer_Heap (high-res timer)"), diff --git a/ACE/tests/Unbounded_Set_Test.cpp b/ACE/tests/Unbounded_Set_Test.cpp index b551735de33..8c9e18875f8 100644 --- a/ACE/tests/Unbounded_Set_Test.cpp +++ b/ACE/tests/Unbounded_Set_Test.cpp @@ -100,7 +100,7 @@ run_main (int, ACE_TCHAR *[]) // Test assigment of sets. // To do that, we also test some of the iterator methods. - typedef ACE_Unbounded_Set<MyNode> MySet; + using MySet = ACE_Unbounded_Set<MyNode>; MySet ubs2 = ubs; // Test a typedef of a set. if (ubs2.size() != ubs.size()) { diff --git a/ACE/tests/Vector_Test.cpp b/ACE/tests/Vector_Test.cpp index cac2f398faa..50b9a08f038 100644 --- a/ACE/tests/Vector_Test.cpp +++ b/ACE/tests/Vector_Test.cpp @@ -15,9 +15,9 @@ #include "ace/Vector_T.h" -typedef size_t DATA; -typedef ACE_Vector<DATA> VECTOR; -typedef ACE_Vector<DATA>::Iterator ITERATOR; +using DATA = size_t; +using VECTOR = ACE_Vector<DATA>; +using ITERATOR = ACE_Vector<DATA>::Iterator; const size_t TOP = 100; const size_t LEFT = 10; |