Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Framework_Component_T.h
blobe23f11889f5f059fb3baa1cbeb16d11d9bf9d646
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Framework_Component_T.h
7 * @author Don Hinton <dhinton@ieee.org>
8 */
9 //=============================================================================
11 #ifndef ACE_FRAMEWORK_COMPONENT_T_H
12 #define ACE_FRAMEWORK_COMPONENT_T_H
13 #include /**/ "ace/pre.h"
14 #include "ace/Framework_Component.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 # pragma once
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
22 /**
23 * @class ACE_Framework_Component_T
25 * @brief This class inherits the interface of the abstract
26 * ACE_Framework_Component class and is instantiated with the
27 * implementation of the concrete component class @c class Concrete.
29 * This design is similar to the Adapter and Decorator patterns
30 * from the ``Gang of Four'' book. Note that @c class Concrete
31 * need not inherit from a common class since ACE_Framework_Component
32 * provides the uniform virtual interface! (implementation based on
33 * ACE_Dumpable_Adapter in <ace/Dump_T.h>.
35 template <class Concrete>
36 class ACE_Framework_Component_T : public ACE_Framework_Component
38 public:
39 /// Constructor.
40 ACE_Framework_Component_T (Concrete *concrete);
42 /// Destructor.
43 ~ACE_Framework_Component_T ();
45 /// Close the contained singleton.
46 void close_singleton ();
48 ACE_ALLOC_HOOK_DECLARE;
51 ACE_END_VERSIONED_NAMESPACE_DECL
53 /// This macro should be called in the instance() method
54 /// of the Concrete class that will be managed. Along
55 /// with the appropriate template instantiation.
56 #define ACE_REGISTER_FRAMEWORK_COMPONENT(CLASS, INSTANCE) \
57 ACE_Framework_Repository::instance ()->register_component \
58 (new ACE_Framework_Component_T<CLASS> (INSTANCE));
60 #include "ace/Framework_Component_T.cpp"
62 #include /**/ "ace/post.h"
63 #endif /* ACE_FRAMEWORK_COMPONENT_T_H */