From bbd109640d28074f80c3971b2b6d1883e9c6ddf4 Mon Sep 17 00:00:00 2001 From: schmidt Date: Sat, 16 Aug 1997 15:10:18 +0000 Subject: *** empty log message *** --- ace/Auto_Ptr.cpp | 4 ++++ ace/Auto_Ptr.h | 15 +++++++++------ ace/Auto_Ptr.i | 10 +++++++--- ace/ReactorEx.cpp | 2 +- ace/Service_Config.cpp | 8 ++++---- ace/Service_Object.h | 2 +- examples/Threads/future1.cpp | 6 +++--- examples/Threads/future2.cpp | 10 +++++----- tests/Future_Test.cpp | 6 +++--- 9 files changed, 37 insertions(+), 26 deletions(-) diff --git a/ace/Auto_Ptr.cpp b/ace/Auto_Ptr.cpp index 0f6461280c1..718ce217760 100644 --- a/ace/Auto_Ptr.cpp +++ b/ace/Auto_Ptr.cpp @@ -11,6 +11,8 @@ #include "ace/Auto_Ptr.i" #endif /* __ACE_INLINE__ */ +#if defined (ACE_HAS_STANDARD_CPP_LIBRARY) + ACE_ALLOC_HOOK_DEFINE(ACE_Auto_Basic_Ptr) template void @@ -29,6 +31,8 @@ ACE_Auto_Basic_Ptr::remove (X *& x) delete tp; } +#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ + ACE_ALLOC_HOOK_DEFINE(ACE_Auto_Basic_Array_Ptr) template void diff --git a/ace/Auto_Ptr.h b/ace/Auto_Ptr.h index 6565f5a767b..fefc955421b 100644 --- a/ace/Auto_Ptr.h +++ b/ace/Auto_Ptr.h @@ -21,10 +21,12 @@ #include "ace/ACE.h" +#if !defined (ACE_HAS_STANDARD_CPP_LIBRARY) + template class ACE_Auto_Basic_Ptr // = TITLE - // Implements the draft C++ standard ACE_Auto_Ptr abstraction. + // Implements the draft C++ standard auto_ptr abstraction. // This class allows one to work on non-object (basic) types { public: @@ -53,22 +55,23 @@ protected: }; template -class ACE_Auto_Ptr : public ACE_Auto_Basic_Ptr +class auto_ptr : public ACE_Auto_Basic_Ptr // = TITLE - // Implements the draft C++ standard ACE_Auto_Ptr abstraction. + // Implements the draft C++ standard auto_ptr abstraction. { public: // = Initialization and termination methods - ACE_Auto_Ptr (X *p = 0); + auto_ptr (X *p = 0); X *operator-> () const; }; +#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ template class ACE_Auto_Basic_Array_Ptr // = TITLE - // Implements an extension to the draft C++ standard ACE_Auto_Ptr + // Implements an extension to the draft C++ standard auto_ptr // abstraction. This class allows one to work on non-object // (basic) types { @@ -102,7 +105,7 @@ protected: template class ACE_Auto_Array_Ptr : public ACE_Auto_Basic_Array_Ptr // = TITLE - // Implements an extension to the draft C++ standard ACE_Auto_Ptr + // Implements an extension to the draft C++ standard auto_ptr // abstraction. { public: diff --git a/ace/Auto_Ptr.i b/ace/Auto_Ptr.i index 7d8b76b9e80..cd0b3f9a29a 100644 --- a/ace/Auto_Ptr.i +++ b/ace/Auto_Ptr.i @@ -3,6 +3,8 @@ // Auto_Ptr.i +#if defined (ACE_HAS_STANDARD_CPP_LIBRARY) + template ACE_INLINE void ACE_Auto_Basic_Ptr::operator= (ACE_Auto_Basic_Ptr &rhs) { @@ -65,19 +67,21 @@ ACE_Auto_Basic_Ptr::reset (X *p) } template ACE_INLINE -ACE_Auto_Ptr::ACE_Auto_Ptr (X *p) +auto_ptr::auto_ptr (X *p) : ACE_Auto_Basic_Ptr (p) { ACE_TRACE ("ACE_Auto_Basic_Ptr::ACE_Auto_Basic_Ptr"); } template ACE_INLINE X * -ACE_Auto_Ptr::operator-> () const +auto_ptr::operator-> () const { - ACE_TRACE ("ACE_Auto_Ptr::operator->"); + ACE_TRACE ("auto_ptr::operator->"); return p_; } +#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ + template ACE_INLINE ACE_Auto_Basic_Array_Ptr::ACE_Auto_Basic_Array_Ptr (X *p) : p_ (p) diff --git a/ace/ReactorEx.cpp b/ace/ReactorEx.cpp index 6c2028a6690..aeb364407dd 100644 --- a/ace/ReactorEx.cpp +++ b/ace/ReactorEx.cpp @@ -822,7 +822,7 @@ ACE_ReactorEx::register_handler_i (ACE_HANDLE event_handle, long new_network_events = 0; int delete_event = 0; - ACE_Auto_Ptr event = 0; + auto_ptr event = 0; // Look up the repository to see if the is already // there. diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp index 7f702ef1d2b..693bf4a9934 100644 --- a/ace/Service_Config.cpp +++ b/ace/Service_Config.cpp @@ -343,11 +343,11 @@ ACE_Service_Config::process_directives (void) ace_yyerrno = 0; ace_yylineno = 1; - // Use an ACE_Auto_Ptr to make sure that we release this memory + // Use an auto_ptr to make sure that we release this memory // regardless of how we exit... ACE_NEW_RETURN (ace_obstack, ACE_Obstack, -1); - ACE_Auto_Ptr holder (ace_obstack); + auto_ptr holder (ace_obstack); ace_yyparse (); @@ -670,7 +670,7 @@ template class ACE_Unbounded_Set; template class ACE_Unbounded_Set_Iterator; template class ACE_Malloc; template class ACE_Allocator_Adapter >; -template class ACE_Auto_Ptr; +template class auto_ptr; template class ACE_Auto_Basic_Ptr; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Node @@ -678,7 +678,7 @@ template class ACE_Auto_Basic_Ptr; #pragma instantiate ACE_Unbounded_Set_Iterator #pragma instantiate ACE_Malloc #pragma instantiate ACE_Allocator_Adapter > -#pragma instantiate ACE_Auto_Ptr +#pragma instantiate auto_ptr #pragma instantiate ACE_Auto_Basic_Ptr #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/ace/Service_Object.h b/ace/Service_Object.h index 65ab7fe1db3..ac7131b8266 100644 --- a/ace/Service_Object.h +++ b/ace/Service_Object.h @@ -94,7 +94,7 @@ class ACE_Export ACE_Service_Object_Ptr // // = DESCRIPTION // This class is similar to the Standard C++ Library class - // . It is used in conjunction with statically linked + // . It is used in conjunction with statically linked // , as shown in the // ./netsvcs/server/main.cpp example. { diff --git a/examples/Threads/future1.cpp b/examples/Threads/future1.cpp index 2f204b90369..79f36cb5b80 100644 --- a/examples/Threads/future1.cpp +++ b/examples/Threads/future1.cpp @@ -203,7 +203,7 @@ Scheduler::svc (void) { // Dequeue the next method object (we use an auto pointer in // case an exception is thrown in the ). - ACE_Auto_Ptr mo (this->activation_queue_.dequeue ()); + auto_ptr mo (this->activation_queue_.dequeue ()); ACE_DEBUG ((LM_DEBUG, "(%t) calling method object\n")); // Call it. @@ -393,7 +393,7 @@ template class ACE_Future; template class ACE_Future; template class ACE_Future_Rep; template class ACE_Future_Rep; -template class ACE_Auto_Ptr; +template class auto_ptr; template class ACE_Auto_Basic_Ptr; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Atomic_Op @@ -401,7 +401,7 @@ template class ACE_Auto_Basic_Ptr; #pragma instantiate ACE_Future #pragma instantiate ACE_Future_Rep #pragma instantiate ACE_Future_Rep -#pragma instantiate ACE_Auto_Ptr +#pragma instantiate auto_ptr #pragma instantiate ACE_Auto_Basic_Ptr #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/examples/Threads/future2.cpp b/examples/Threads/future2.cpp index 52f68f4ac8d..a879d196fb4 100644 --- a/examples/Threads/future2.cpp +++ b/examples/Threads/future2.cpp @@ -209,7 +209,7 @@ Scheduler::svc (void) { // Dequeue the next method object (we use an auto pointer in // case an exception is thrown in the ). - ACE_Auto_Ptr mo (this->activation_queue_.dequeue ()); + auto_ptr mo (this->activation_queue_.dequeue ()); ACE_DEBUG ((LM_DEBUG, " (%t) calling method object\n")); // Call it. @@ -264,7 +264,7 @@ Scheduler::name (void) // This scheduler is inactive... so we execute the user // request right away... - ACE_Auto_Ptr mo (new Method_Object_name (this, new_future)); + auto_ptr mo (new Method_Object_name (this, new_future)); mo->call (); // Smart pointer destructor automatically deletes mo. @@ -289,7 +289,7 @@ Scheduler::work (u_long newparam, int newcount) if (this->thr_count () == 0) { - ACE_Auto_Ptr mo + auto_ptr mo (new Method_Object_work (this, newparam, newcount, new_future)); mo->call (); // Smart pointer destructor automatically deletes it. @@ -515,7 +515,7 @@ template class ACE_Future; template class ACE_Future; template class ACE_Future_Rep; template class ACE_Future_Rep; -template class ACE_Auto_Ptr; +template class auto_ptr; template class ACE_Auto_Basic_Ptr; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Atomic_Op @@ -523,7 +523,7 @@ template class ACE_Auto_Basic_Ptr; #pragma instantiate ACE_Future #pragma instantiate ACE_Future_Rep #pragma instantiate ACE_Future_Rep -#pragma instantiate ACE_Auto_Ptr +#pragma instantiate auto_ptr #pragma instantiate ACE_Auto_Basic_Ptr #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/tests/Future_Test.cpp b/tests/Future_Test.cpp index ef84ba32a2a..e46102f6559 100644 --- a/tests/Future_Test.cpp +++ b/tests/Future_Test.cpp @@ -220,7 +220,7 @@ Scheduler::svc (void) { // Dequeue the next method object (we use an auto pointer in // case an exception is thrown in the ). - ACE_Auto_Ptr mo (this->activation_queue_.dequeue ()); + auto_ptr mo (this->activation_queue_.dequeue ()); ACE_DEBUG ((LM_DEBUG, "(%t) calling method object\n")); // Call it. @@ -302,7 +302,7 @@ template class ACE_Future; template class ACE_Future_Rep; template class ACE_Future_Rep; template class ACE_Future_Rep; -template class ACE_Auto_Ptr; +template class auto_ptr; template class ACE_Auto_Basic_Ptr; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Future @@ -311,7 +311,7 @@ template class ACE_Auto_Basic_Ptr; #pragma instantiate ACE_Future_Rep #pragma instantiate ACE_Future_Rep #pragma instantiate ACE_Future_Rep -#pragma instantiate ACE_Auto_Ptr +#pragma instantiate auto_ptr #pragma instantiate ACE_Auto_Basic_Ptr #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ -- cgit v1.2.1