Use override/default for RTPortableServer
[ACE_TAO.git] / ACE / ace / Cleanup_Strategies_T.h
blob9ec2afcdb6e1bccad653066b10d6361160b061b7
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Cleanup_Strategies_T.h
7 * @author Kirthika Parameswaran <kirthika@cs.wustl.edu>
8 */
9 //=============================================================================
11 #ifndef CLEANUP_STRATEGIES_H
12 #define CLEANUP_STRATEGIES_H
13 #include /**/ "ace/pre.h"
15 #include /**/ "ace/config-all.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 // For linkers that cant grok long names.
22 #define ACE_Cleanup_Strategy ACLE
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
26 /**
27 * @class ACE_Cleanup_Strategy
29 * @brief Defines a default strategy to be followed for cleaning up
30 * entries from a map which is the container.
32 * By default the entry to be cleaned up is removed from the
33 * container.
35 template <class KEY, class VALUE, class CONTAINER>
36 class ACE_Cleanup_Strategy
38 public:
39 /// Destructor.
40 virtual ~ACE_Cleanup_Strategy ();
42 /// The method which will do the cleanup of the entry in the container.
43 virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value);
46 //////////////////////////////////////////////////////////////////////
47 #define ACE_Recyclable_Handler_Cleanup_Strategy ARHCLE
49 /**
50 * @class ACE_Recyclable_Handler_Cleanup_Strategy
52 * @brief Defines a strategy to be followed for cleaning up
53 * entries which are svc_handlers from a container.
55 * The entry to be cleaned up is removed from the container.
56 * Here, since we are dealing with svc_handlers specifically, we
57 * perform a couple of extra operations. @note To be used when
58 * the handler is recyclable.
60 template <class KEY, class VALUE, class CONTAINER>
61 class ACE_Recyclable_Handler_Cleanup_Strategy : public ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER>
63 public:
64 /// The method which will do the cleanup of the entry in the container.
65 virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value);
68 //////////////////////////////////////////////////////////////////////
69 #define ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy ARRHCLE
71 /**
72 * @class ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy
74 * @brief Defines a strategy to be followed for cleaning up
75 * entries which are svc_handlers from a container.
77 * The entry to be cleaned up is removed from the container.
78 * Here, since we are dealing with recyclable svc_handlers with
79 * addresses which are refcountable specifically, we perform a
80 * couple of extra operations and do so without any locking.
82 template <class KEY, class VALUE, class CONTAINER>
83 class ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy : public ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER>
85 public:
86 /// The method which will do the cleanup of the entry in the container.
87 virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value);
90 //////////////////////////////////////////////////////////////////////
92 /**
93 * @class ACE_Handler_Cleanup_Strategy
95 * @brief Defines a strategy to be followed for cleaning up
96 * entries which are svc_handlers from a container.
98 * The entry to be cleaned up is removed from the container.
99 * Here, since we are dealing with svc_handlers specifically, we
100 * perform a couple of extra operations. @note This cleanup strategy
101 * should be used in the case when the handler has the caching
102 * attributes.
104 template <class KEY, class VALUE, class CONTAINER>
105 class ACE_Handler_Cleanup_Strategy : public ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER>
107 public:
108 /// The method which will do the cleanup of the entry in the container.
109 virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value);
112 //////////////////////////////////////////////////////////////////////
113 #define ACE_Null_Cleanup_Strategy ANCLE
116 * @class ACE_Null_Cleanup_Strategy
118 * @brief Defines a do-nothing implementation of the cleanup strategy.
120 * This class simply does nothing at all! Can be used to nullify
121 * the effect of the Cleanup Strategy.
123 template <class KEY, class VALUE, class CONTAINER>
124 class ACE_Null_Cleanup_Strategy : public ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER>
126 public:
127 /// The dummy cleanup method.
128 virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value);
131 ACE_END_VERSIONED_NAMESPACE_DECL
133 #include "ace/Cleanup_Strategies_T.cpp"
135 #include /**/ "ace/post.h"
136 #endif /* CLEANUP_STRATEGIES_H */