diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:11 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:11 +0000 |
commit | 6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (patch) | |
tree | da50d054f9c761c3f6a5923f6979e93306c56d68 /TAO/tao/Cleanup_Func_Registry.cpp | |
parent | 0e555b9150d38e3b3473ba325b56db2642e6352b (diff) | |
download | ATCD-6b846cf03c0bcbd8c276cb0af61a181e5f98eaae.tar.gz |
Repo restructuring
Diffstat (limited to 'TAO/tao/Cleanup_Func_Registry.cpp')
-rw-r--r-- | TAO/tao/Cleanup_Func_Registry.cpp | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/TAO/tao/Cleanup_Func_Registry.cpp b/TAO/tao/Cleanup_Func_Registry.cpp deleted file mode 100644 index 9b89b0f32d8..00000000000 --- a/TAO/tao/Cleanup_Func_Registry.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "tao/Cleanup_Func_Registry.h" - -#if !defined (__ACE_INLINE__) -# include "tao/Cleanup_Func_Registry.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Log_Msg.h" - -ACE_RCSID (tao, - Cleanup_Func_Registry, - "$Id$") - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL - -int -TAO_Cleanup_Func_Registry::register_cleanup_function ( - ACE_CLEANUP_FUNC func, - size_t &slot_id) -{ - size_t const slot = this->cleanup_funcs_.size (); - - if (this->cleanup_funcs_.size (slot + 1) != 0) - return -1; - - this->cleanup_funcs_[slot] = func; - slot_id = slot; - - return 0; -} - -void -TAO_Cleanup_Func_Registry::cleanup (ACE_Array_Base<void *> &ts_objects) -{ - size_t const len = ts_objects.size (); - - // The allocated slot may never have been used. It is therefore - // possible that the TSS array size may be less than the cleanup - // function size. However, there is still a one-to-one - // correspondence between cleanup_func[foo] and ts_object[foo]. - - ACE_ASSERT (len <= this->cleanup_funcs_.size ()); - - /// Cleanup each TSS object. - for (size_t i = 0; i < len; ++i) - { - ACE_CLEANUP_FUNC destructor = this->cleanup_funcs_[i]; - if (destructor != 0) - destructor (ts_objects[i], 0); - } -} - -TAO_END_VERSIONED_NAMESPACE_DECL |