diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-08-16 15:10:18 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-08-16 15:10:18 +0000 |
commit | bbd109640d28074f80c3971b2b6d1883e9c6ddf4 (patch) | |
tree | e2850f2f5e3029317dda4233179cf792edeaa1dc | |
parent | 50887b7ab365f7114480839a0210c714c17d4296 (diff) | |
download | ATCD-bbd109640d28074f80c3971b2b6d1883e9c6ddf4.tar.gz |
*** empty log message ***
-rw-r--r-- | ace/Auto_Ptr.cpp | 4 | ||||
-rw-r--r-- | ace/Auto_Ptr.h | 15 | ||||
-rw-r--r-- | ace/Auto_Ptr.i | 10 | ||||
-rw-r--r-- | ace/ReactorEx.cpp | 2 | ||||
-rw-r--r-- | ace/Service_Config.cpp | 8 | ||||
-rw-r--r-- | ace/Service_Object.h | 2 | ||||
-rw-r--r-- | examples/Threads/future1.cpp | 6 | ||||
-rw-r--r-- | examples/Threads/future2.cpp | 10 | ||||
-rw-r--r-- | 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<class X> void @@ -29,6 +31,8 @@ ACE_Auto_Basic_Ptr<X>::remove (X *& x) delete tp; } +#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ + ACE_ALLOC_HOOK_DEFINE(ACE_Auto_Basic_Array_Ptr) template<class X> 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 X> 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 X> -class ACE_Auto_Ptr : public ACE_Auto_Basic_Ptr <X> +class auto_ptr : public ACE_Auto_Basic_Ptr <X> // = 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 X> 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 X> class ACE_Auto_Array_Ptr : public ACE_Auto_Basic_Array_Ptr<X> // = 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<class X> ACE_INLINE void ACE_Auto_Basic_Ptr<X>::operator= (ACE_Auto_Basic_Ptr<X> &rhs) { @@ -65,19 +67,21 @@ ACE_Auto_Basic_Ptr<X>::reset (X *p) } template<class X> ACE_INLINE -ACE_Auto_Ptr<X>::ACE_Auto_Ptr (X *p) +auto_ptr<X>::auto_ptr (X *p) : ACE_Auto_Basic_Ptr<X> (p) { ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::ACE_Auto_Basic_Ptr"); } template<class X> ACE_INLINE X * -ACE_Auto_Ptr<X>::operator-> () const +auto_ptr<X>::operator-> () const { - ACE_TRACE ("ACE_Auto_Ptr<X>::operator->"); + ACE_TRACE ("auto_ptr<X>::operator->"); return p_; } +#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ + template<class X> ACE_INLINE ACE_Auto_Basic_Array_Ptr<X>::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 <ACE_Auto_Event> event = 0; + auto_ptr <ACE_Auto_Event> event = 0; // Look up the repository to see if the <Event_Handler> 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<ACE_Obstack> holder (ace_obstack); + auto_ptr<ACE_Obstack> holder (ace_obstack); ace_yyparse (); @@ -670,7 +670,7 @@ template class ACE_Unbounded_Set<ACE_Static_Svc_Descriptor *>; template class ACE_Unbounded_Set_Iterator<ACE_Static_Svc_Descriptor *>; template class ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex>; template class ACE_Allocator_Adapter<ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> >; -template class ACE_Auto_Ptr<ACE_Obstack>; +template class auto_ptr<ACE_Obstack>; template class ACE_Auto_Basic_Ptr<ACE_Obstack>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Node<ACE_Static_Svc_Descriptor *> @@ -678,7 +678,7 @@ template class ACE_Auto_Basic_Ptr<ACE_Obstack>; #pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Static_Svc_Descriptor *> #pragma instantiate ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> #pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> > -#pragma instantiate ACE_Auto_Ptr<ACE_Obstack> +#pragma instantiate auto_ptr<ACE_Obstack> #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Obstack> #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 - // <ACE_Auto_Ptr>. It is used in conjunction with statically linked + // <auto_ptr>. It is used in conjunction with statically linked // <ACE_Service_Objects>, 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 <call>). - ACE_Auto_Ptr<ACE_Method_Object> mo (this->activation_queue_.dequeue ()); + auto_ptr<ACE_Method_Object> mo (this->activation_queue_.dequeue ()); ACE_DEBUG ((LM_DEBUG, "(%t) calling method object\n")); // Call it. @@ -393,7 +393,7 @@ template class ACE_Future<const char *>; template class ACE_Future<u_long>; template class ACE_Future_Rep<char const *>; template class ACE_Future_Rep<u_long>; -template class ACE_Auto_Ptr<ACE_Method_Object>; +template class auto_ptr<ACE_Method_Object>; template class ACE_Auto_Basic_Ptr<ACE_Method_Object>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Atomic_Op<ACE_Thread_Mutex, int> @@ -401,7 +401,7 @@ template class ACE_Auto_Basic_Ptr<ACE_Method_Object>; #pragma instantiate ACE_Future<u_long> #pragma instantiate ACE_Future_Rep<char const *> #pragma instantiate ACE_Future_Rep<u_long> -#pragma instantiate ACE_Auto_Ptr<ACE_Method_Object> +#pragma instantiate auto_ptr<ACE_Method_Object> #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Method_Object> #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 <call>). - ACE_Auto_Ptr<ACE_Method_Object> mo (this->activation_queue_.dequeue ()); + auto_ptr<ACE_Method_Object> 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<ACE_Method_Object> mo (new Method_Object_name (this, new_future)); + auto_ptr<ACE_Method_Object> 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<ACE_Method_Object> mo + auto_ptr<ACE_Method_Object> 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<char *>; template class ACE_Future<u_long>; template class ACE_Future_Rep<char *>; template class ACE_Future_Rep<u_long>; -template class ACE_Auto_Ptr<ACE_Method_Object>; +template class auto_ptr<ACE_Method_Object>; template class ACE_Auto_Basic_Ptr<ACE_Method_Object>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Atomic_Op<ACE_Thread_Mutex, int> @@ -523,7 +523,7 @@ template class ACE_Auto_Basic_Ptr<ACE_Method_Object>; #pragma instantiate ACE_Future<u_long> #pragma instantiate ACE_Future_Rep<char *> #pragma instantiate ACE_Future_Rep<u_long> -#pragma instantiate ACE_Auto_Ptr<ACE_Method_Object> +#pragma instantiate auto_ptr<ACE_Method_Object> #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Method_Object> #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 <call>). - ACE_Auto_Ptr<ACE_Method_Object> mo (this->activation_queue_.dequeue ()); + auto_ptr<ACE_Method_Object> mo (this->activation_queue_.dequeue ()); ACE_DEBUG ((LM_DEBUG, "(%t) calling method object\n")); // Call it. @@ -302,7 +302,7 @@ template class ACE_Future<u_long>; template class ACE_Future_Rep<char const *>; template class ACE_Future_Rep<int>; template class ACE_Future_Rep<u_long>; -template class ACE_Auto_Ptr<ACE_Method_Object>; +template class auto_ptr<ACE_Method_Object>; template class ACE_Auto_Basic_Ptr<ACE_Method_Object>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Future<const char *> @@ -311,7 +311,7 @@ template class ACE_Auto_Basic_Ptr<ACE_Method_Object>; #pragma instantiate ACE_Future_Rep<char const *> #pragma instantiate ACE_Future_Rep<int> #pragma instantiate ACE_Future_Rep<u_long> -#pragma instantiate ACE_Auto_Ptr<ACE_Method_Object> +#pragma instantiate auto_ptr<ACE_Method_Object> #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Method_Object> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ |