diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:21 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:21 +0000 |
commit | 3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (patch) | |
tree | 197c810e5f5bce17b1233a7cb8d7b50c0bcd25e2 /TAO/tao/Utils/ORB_Destroyer.h | |
parent | 6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (diff) | |
download | ATCD-3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c.tar.gz |
Repo restructuring
Diffstat (limited to 'TAO/tao/Utils/ORB_Destroyer.h')
-rw-r--r-- | TAO/tao/Utils/ORB_Destroyer.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/TAO/tao/Utils/ORB_Destroyer.h b/TAO/tao/Utils/ORB_Destroyer.h new file mode 100644 index 00000000000..920ba64d3e5 --- /dev/null +++ b/TAO/tao/Utils/ORB_Destroyer.h @@ -0,0 +1,62 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file ORB_Destroyer.h + * + * $Id$ + * + * @author Marina Spivak <marina@atdesk.com> + */ +//============================================================================= +#ifndef TAO_UTILS_ORB_DESTROYER_H +#define TAO_UTILS_ORB_DESTROYER_H +#include /**/ "ace/pre.h" +#include "tao/Utils/utils_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/ORB.h" +#include "ace/Auto_Functor.h" + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace TAO +{ + namespace Utils + { + + /** + * @struct ORB_Destroyer_Functor + * + * @brief Implements a functor for the ORB_Destroyer class. + */ + struct TAO_UTILS_Export ORB_Destroyer_Functor + { + typedef CORBA::ORB_ptr argument; + + /// Destroy the ORB + void operator() (CORBA::ORB_ptr orb) + ACE_THROW_SPEC (()); + }; + + /** + * @class ORB_Destroyer + * + * @brief Helper class to destroy an ORB. + * + */ + typedef ACE_Utils::Auto_Functor< + CORBA::ORB, + ORB_Destroyer_Functor> + ORB_Destroyer; + + } // namespace Utils +} // namespace TAO + +TAO_END_VERSIONED_NAMESPACE_DECL + +#include /**/ "ace/post.h" +#endif /* TAO_UTILS_ORB_DESTROYER_H*/ |