summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2002-11-05 13:26:27 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2002-11-05 13:26:27 +0000
commitf2e507390e3b998b9f918870249640f6e9132d7d (patch)
tree3b99c898ae72ff036f1bc024b99dc4fcf3ac8d2e
parentf2312152344f89a30586b9bf7149fa9707446b61 (diff)
downloadATCD-f2e507390e3b998b9f918870249640f6e9132d7d.tar.gz
ChangeLogTag:Tue Nov 5 05:12:16 2002 Ossama Othman <ossama@uci.edu>
-rw-r--r--ChangeLog25
-rw-r--r--ChangeLogs/ChangeLog-03a25
-rw-r--r--ace/Acceptor.h25
-rw-r--r--ace/Connector.h32
-rw-r--r--ace/Strategies_T.h126
5 files changed, 200 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f7d69dcac6..6217c2e8870 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+Tue Nov 5 05:12:16 2002 Ossama Othman <ossama@uci.edu>
+
+ * ace/Acceptor.h:
+ * ace/Connector.h:
+ * ace/Strategies_T.h:
+
+ Added missing STL-style template traits found in C++NPv2
+ including the following:
+
+ addr_type
+ acceptor_type
+ connector_type
+ handler_type
+ stream_type
+ base_type
+ accept_strategy_type
+ connect_strategy_type
+ creation_strategy_type
+ concurrency_strategy_type
+ recycling_strategy_type
+ scheduling_strategy_type
+
+ where applicable. The old traits are still available and remain
+ unchanged.
+
Tue Nov 5 05:54:16 UTC 2002 Don Hinton <dhinton@ieee.org>
* tests/Multicast_Test.cpp: Fixed typo in pragma instantiation,
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 7f7d69dcac6..6217c2e8870 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,28 @@
+Tue Nov 5 05:12:16 2002 Ossama Othman <ossama@uci.edu>
+
+ * ace/Acceptor.h:
+ * ace/Connector.h:
+ * ace/Strategies_T.h:
+
+ Added missing STL-style template traits found in C++NPv2
+ including the following:
+
+ addr_type
+ acceptor_type
+ connector_type
+ handler_type
+ stream_type
+ base_type
+ accept_strategy_type
+ connect_strategy_type
+ creation_strategy_type
+ concurrency_strategy_type
+ recycling_strategy_type
+ scheduling_strategy_type
+
+ where applicable. The old traits are still available and remain
+ unchanged.
+
Tue Nov 5 05:54:16 UTC 2002 Don Hinton <dhinton@ieee.org>
* tests/Multicast_Test.cpp: Fixed typo in pragma instantiation,
diff --git a/ace/Acceptor.h b/ace/Acceptor.h
index 2c6f3da238e..e04604ca697 100644
--- a/ace/Acceptor.h
+++ b/ace/Acceptor.h
@@ -248,6 +248,25 @@ class ACE_Strategy_Acceptor
{
public:
+ // Useful STL-style traits.
+ typedef ACE_Creation_Strategy<SVC_HANDLER>
+ creation_strategy_type;
+ typedef ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>
+ accept_strategy_type;
+ typedef ACE_Concurrency_Strategy<SVC_HANDLER>
+ concurrency_strategy_type;
+ typedef ACE_Scheduling_Strategy<SVC_HANDLER> scheduling_strategy_type;
+ typedef ACE_Acceptor <SVC_HANDLER, ACE_PEER_ACCEPTOR_2>
+ base_type;
+
+ // = Define some useful (old style) traits.
+ typedef ACE_Creation_Strategy<SVC_HANDLER> CREATION_STRATEGY;
+ typedef ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> ACCEPT_STRATEGY;
+ typedef ACE_Concurrency_Strategy<SVC_HANDLER> CONCURRENCY_STRATEGY;
+ typedef ACE_Scheduling_Strategy<SVC_HANDLER> SCHEDULING_STRATEGY;
+
+
+
/// Default constructor.
ACE_Strategy_Acceptor (const ACE_TCHAR service_name[] = 0,
const ACE_TCHAR service_description[] = 0,
@@ -410,12 +429,6 @@ protected:
// = These data members are "logically private" but are put in the
// protected part in case subclasses want to access them.
- // = Define some useful typedefs.
- typedef ACE_Creation_Strategy<SVC_HANDLER> CREATION_STRATEGY;
- typedef ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> ACCEPT_STRATEGY;
- typedef ACE_Concurrency_Strategy<SVC_HANDLER> CONCURRENCY_STRATEGY;
- typedef ACE_Scheduling_Strategy<SVC_HANDLER> SCHEDULING_STRATEGY;
-
// = Strategy objects.
/// Creation strategy for an Acceptor.
diff --git a/ace/Connector.h b/ace/Connector.h
index 2d41b629946..47f5e6cd9bc 100644
--- a/ace/Connector.h
+++ b/ace/Connector.h
@@ -38,6 +38,7 @@ template <class SVC_HANDLER>
class ACE_Svc_Tuple
{
public:
+
// = Initialization methods.
ACE_Svc_Tuple (SVC_HANDLER *,
ACE_HANDLE,
@@ -389,6 +390,27 @@ class ACE_Strategy_Connector
: public ACE_Connector <SVC_HANDLER, ACE_PEER_CONNECTOR_2>
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_Creation_Strategy<SVC_HANDLER>
+ creation_strategy_type;
+ typedef ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>
+ connect_strategy_type;
+ typedef ACE_Concurrency_Strategy<SVC_HANDLER>
+ concurrency_strategy_type;
+ typedef ACE_Connector <SVC_HANDLER, ACE_PEER_CONNECTOR_2>
+ base_type;
+
+ // = Define some useful (old style) traits.
+ typedef ACE_Creation_Strategy<SVC_HANDLER>
+ CREATION_STRATEGY;
+ typedef ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>
+ CONNECT_STRATEGY;
+ typedef ACE_Concurrency_Strategy<SVC_HANDLER>
+ CONCURRENCY_STRATEGY;
+ typedef ACE_Connector <SVC_HANDLER, ACE_PEER_CONNECTOR_2>
+ SUPER;
+
/**
* Initialize a connector. <flags> indicates how <SVC_HANDLER>'s
* should be initialized prior to being activated. Right now, the
@@ -429,16 +451,6 @@ public:
/// Close down the Connector
virtual int close (void);
- // = Define some useful typedefs traits.
- typedef ACE_Creation_Strategy<SVC_HANDLER>
- CREATION_STRATEGY;
- typedef ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>
- CONNECT_STRATEGY;
- typedef ACE_Concurrency_Strategy<SVC_HANDLER>
- CONCURRENCY_STRATEGY;
- typedef ACE_Connector <SVC_HANDLER, ACE_PEER_CONNECTOR_2>
- SUPER;
-
// = Strategies accessors
virtual ACE_Creation_Strategy<SVC_HANDLER> *creation_strategy (void) const;
virtual ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2> *connect_strategy (void) const;
diff --git a/ace/Strategies_T.h b/ace/Strategies_T.h
index eade82c392e..6891d1d4b88 100644
--- a/ace/Strategies_T.h
+++ b/ace/Strategies_T.h
@@ -1,4 +1,4 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
//=============================================================================
/**
@@ -12,6 +12,7 @@
#ifndef ACE_STRATEGIES_T_H
#define ACE_STRATEGIES_T_H
+
#include "ace/pre.h"
#include "ace/Hash_Map_Manager.h"
@@ -45,6 +46,12 @@ template<class SVC_HANDLER>
class ACE_Recycling_Strategy
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_TYPENAME SVC_HANDLER::addr_type addr_type;
+ typedef SVC_HANDLER handler_type;
+ typedef ACE_TYPENAME SVC_HANDLER::stream_type stream_type;
+
/// Virtual Destructor
virtual ~ACE_Recycling_Strategy (void);
@@ -74,6 +81,12 @@ template <class SVC_HANDLER>
class ACE_Creation_Strategy
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_TYPENAME SVC_HANDLER::addr_type addr_type;
+ typedef SVC_HANDLER handler_type;
+ typedef ACE_TYPENAME SVC_HANDLER::stream_type stream_type;
+
// = Initialization and termination methods.
/// Default constructor.
@@ -125,6 +138,10 @@ template <class SVC_HANDLER>
class ACE_Singleton_Strategy : public ACE_Creation_Strategy<SVC_HANDLER>
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_Creation_Strategy<SVC_HANDLER> base_type;
+
// = Initialization and termination methods.
ACE_Singleton_Strategy (SVC_HANDLER * = 0,
ACE_Thread_Manager * = 0);
@@ -161,6 +178,10 @@ template <class SVC_HANDLER>
class ACE_DLL_Strategy : public ACE_Creation_Strategy<SVC_HANDLER>
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_Creation_Strategy<SVC_HANDLER> base_type;
+
// = Intialization and termination methods.
/// "Do-nothing" constructor.
@@ -227,6 +248,12 @@ template <class SVC_HANDLER>
class ACE_Concurrency_Strategy
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_TYPENAME SVC_HANDLER::addr_type addr_type;
+ typedef SVC_HANDLER handler_type;
+ typedef ACE_TYPENAME SVC_HANDLER::stream_type stream_type;
+
/// Constructor
ACE_Concurrency_Strategy (int flags = 0);
@@ -268,6 +295,10 @@ template <class SVC_HANDLER>
class ACE_Reactive_Strategy : public ACE_Concurrency_Strategy <SVC_HANDLER>
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_Concurrency_Strategy<SVC_HANDLER> base_type;
+
// = Intialization and termination methods.
/// "Do-nothing constructor"
ACE_Reactive_Strategy (int flags = 0);
@@ -324,6 +355,10 @@ template <class SVC_HANDLER>
class ACE_Thread_Strategy : public ACE_Concurrency_Strategy<SVC_HANDLER>
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_Concurrency_Strategy<SVC_HANDLER> base_type;
+
// = Intialization and termination methods.
/// "Do-nothing constructor"
ACE_Thread_Strategy (int flags = 0);
@@ -387,6 +422,10 @@ template <class SVC_HANDLER>
class ACE_Process_Strategy : public ACE_Concurrency_Strategy<SVC_HANDLER>
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_Concurrency_Strategy<SVC_HANDLER> base_type;
+
// = Intialization and termination methods.
/// Initialize the strategy. If <avoid_zombies> is non-0 then set a
@@ -455,6 +494,13 @@ template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
class ACE_Accept_Strategy
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_PEER_ACCEPTOR_ADDR addr_type;
+ typedef ACE_PEER_ACCEPTOR acceptor_type;
+ typedef SVC_HANDLER handler_type;
+ typedef ACE_TYPENAME SVC_HANDLER::stream_type stream_type;
+
// = Initialization and termination methods.
/// Default constructor.
ACE_Accept_Strategy (ACE_Reactor *reactor = ACE_Reactor::instance ());
@@ -515,6 +561,13 @@ template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1>
class ACE_Connect_Strategy
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_PEER_CONNECTOR_ADDR addr_type;
+ typedef ACE_PEER_CONNECTOR connector_type;
+ typedef SVC_HANDLER handler_type;
+ typedef ACE_TYPENAME SVC_HANDLER::stream_type stream_type;
+
// = Initialization and termination methods.
/// Default constructor.
ACE_Connect_Strategy (void);
@@ -574,6 +627,12 @@ template <class SVC_HANDLER>
class ACE_Scheduling_Strategy
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_TYPENAME SVC_HANDLER::addr_type addr_type;
+ typedef SVC_HANDLER handler_type;
+ typedef ACE_TYPENAME SVC_HANDLER::stream_type stream_type;
+
// = Initialization and termination methods.
/// Constructor
@@ -604,9 +663,14 @@ public:
* the Event_Handlers in a Reactor in one fell swoop.
*/
template <class SVC_HANDLER>
-class ACE_Schedule_All_Reactive_Strategy : public ACE_Scheduling_Strategy<SVC_HANDLER>
+class ACE_Schedule_All_Reactive_Strategy
+ : public ACE_Scheduling_Strategy<SVC_HANDLER>
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_Scheduling_Strategy<SVC_HANDLER> base_type;
+
// = Initialization and termination methods.
/// Constructor
ACE_Schedule_All_Reactive_Strategy (SVC_HANDLER * = 0);
@@ -638,9 +702,14 @@ protected:
* the Event_Handlers controlled by a Thread_Manager in one fell swoop.
*/
template <class SVC_HANDLER>
-class ACE_Schedule_All_Threaded_Strategy : public ACE_Scheduling_Strategy<SVC_HANDLER>
+class ACE_Schedule_All_Threaded_Strategy
+ : public ACE_Scheduling_Strategy<SVC_HANDLER>
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_Scheduling_Strategy<SVC_HANDLER> base_type;
+
// = Initialization and termination methods.
/// Constructor
ACE_Schedule_All_Threaded_Strategy (SVC_HANDLER * = 0);
@@ -677,6 +746,10 @@ template <class SVC_HANDLER>
class ACE_NOOP_Creation_Strategy : public ACE_Creation_Strategy<SVC_HANDLER>
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_Creation_Strategy<SVC_HANDLER> base_type;
+
/// This is a no-op.
virtual int make_svc_handler (SVC_HANDLER *&);
};
@@ -693,9 +766,14 @@ public:
* svc_handler more than once.
*/
template <class SVC_HANDLER>
-class ACE_NOOP_Concurrency_Strategy : public ACE_Concurrency_Strategy<SVC_HANDLER>
+class ACE_NOOP_Concurrency_Strategy
+ : public ACE_Concurrency_Strategy<SVC_HANDLER>
{
public:
+
+ // Useful STL-style traits.
+ typedef ACE_Concurrency_Strategy<SVC_HANDLER> base_type;
+
// = Factory method.
/// This is a no-op.
virtual int activate_svc_handler (SVC_HANDLER *svc_handler,
@@ -744,10 +822,34 @@ protected:
* It's added value is re-use of established connections.
*/
template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX>
-class ACE_Cached_Connect_Strategy : public ACE_Connection_Recycling_Strategy, public ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>
+class ACE_Cached_Connect_Strategy
+ : public ACE_Connection_Recycling_Strategy,
+ public ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>
{
public:
+ // Useful STL-style traits.
+ typedef ACE_Creation_Strategy<SVC_HANDLER>
+ creation_strategy_type;
+ typedef ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>
+ connect_strategy_type;
+ typedef ACE_Concurrency_Strategy<SVC_HANDLER>
+ concurrency_strategy_type;
+ typedef ACE_Recycling_Strategy<SVC_HANDLER> recycling_strategy_type;
+
+ // = Define some useful (old style) traits.
+ typedef ACE_Creation_Strategy<SVC_HANDLER>
+ CREATION_STRATEGY;
+ typedef ACE_Concurrency_Strategy<SVC_HANDLER>
+ CONCURRENCY_STRATEGY;
+ typedef ACE_Recycling_Strategy<SVC_HANDLER>
+ RECYCLING_STRATEGY;
+
+ // = Super class
+ typedef ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>
+ CONNECT_STRATEGY;
+
+
typedef ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX> SELF;
/// Constructor
@@ -836,18 +938,6 @@ public:
virtual int cleanup_hint (const void *recycling_act,
void **act_holder = 0);
- // = Define some useful typedefs.
- typedef ACE_Creation_Strategy<SVC_HANDLER>
- CREATION_STRATEGY;
- typedef ACE_Concurrency_Strategy<SVC_HANDLER>
- CONCURRENCY_STRATEGY;
- typedef ACE_Recycling_Strategy<SVC_HANDLER>
- RECYCLING_STRATEGY;
-
- // = Super class
- typedef ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>
- CONNECT_STRATEGY;
-
// = Typedefs for managing the map
typedef ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>
REFCOUNTED_HASH_RECYCLABLE_ADDRESS;
@@ -976,4 +1066,6 @@ protected:
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
#include "ace/post.h"
+
+
#endif /* ACE_STRATEGIES_T_H */