summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-31 01:03:56 +0000
committerpradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-31 01:03:56 +0000
commit1e19cead15011b7374c058c43ebee2c4a74242b1 (patch)
tree8031a33d0a2ecaee20ff856a8ca15c5721bf7d81
parente4e11824fc235f3e8baccdf543913013223abb18 (diff)
downloadATCD-1e19cead15011b7374c058c43ebee2c4a74242b1.tar.gz
*** empty log message ***
-rw-r--r--TAO/examples/Event_Comm/Consumer_Handler.cpp6
-rw-r--r--TAO/examples/Event_Comm/Consumer_Handler.h2
-rw-r--r--TAO/examples/Event_Comm/Consumer_Input_Handler.cpp6
-rw-r--r--TAO/examples/Event_Comm/Event_Comm_i.cpp32
-rw-r--r--TAO/examples/Event_Comm/Makefile12
-rw-r--r--TAO/examples/Event_Comm/Notifier_Handler.cpp4
-rw-r--r--TAO/examples/Event_Comm/Notifier_Handler.h2
-rw-r--r--TAO/examples/Event_Comm/Notifier_Server.cpp3
-rw-r--r--TAO/examples/Event_Comm/Supplier_Input_Handler.cpp4
-rw-r--r--TAO/examples/Event_Comm/supplier.cpp1
10 files changed, 58 insertions, 14 deletions
diff --git a/TAO/examples/Event_Comm/Consumer_Handler.cpp b/TAO/examples/Event_Comm/Consumer_Handler.cpp
index 31118cbf553..6dbd0a1f24c 100644
--- a/TAO/examples/Event_Comm/Consumer_Handler.cpp
+++ b/TAO/examples/Event_Comm/Consumer_Handler.cpp
@@ -5,8 +5,8 @@
ACE_RCSID(Consumer, Consumer_Handler, "$Id$")
Consumer_Handler::Consumer_Handler (void)
-: notifier_ (0),
- receiver_ (0)
+: receiver_ (0),
+ notifier_ (0)
{
// No-Op.
}
@@ -70,6 +70,7 @@ Consumer_Handler::init (int argc, char *argv[])
this->notifier_->subscribe (this->receiver_,
filtering_criteria,
TAO_TRY_ENV);
+ return 0;
}
TAO_CATCHANY
{
@@ -77,6 +78,7 @@ Consumer_Handler::init (int argc, char *argv[])
return -1;
}
TAO_ENDTRY;
+ return 0;
}
int
diff --git a/TAO/examples/Event_Comm/Consumer_Handler.h b/TAO/examples/Event_Comm/Consumer_Handler.h
index aaf35759d2b..4d3cf95a1b2 100644
--- a/TAO/examples/Event_Comm/Consumer_Handler.h
+++ b/TAO/examples/Event_Comm/Consumer_Handler.h
@@ -41,7 +41,7 @@ public:
Consumer_Handler (void);
// Constructor.
- ~Consumer_Handler (void);
+ virtual ~Consumer_Handler (void);
// Destructor
int init (int argc, char *argv[]);
diff --git a/TAO/examples/Event_Comm/Consumer_Input_Handler.cpp b/TAO/examples/Event_Comm/Consumer_Input_Handler.cpp
index 74b870c491b..bd9c91fa72a 100644
--- a/TAO/examples/Event_Comm/Consumer_Input_Handler.cpp
+++ b/TAO/examples/Event_Comm/Consumer_Input_Handler.cpp
@@ -6,9 +6,9 @@
ACE_RCSID(Consumer, Consumer_Input_Handler, "$Id$")
Consumer_Input_Handler::Consumer_Input_Handler (void)
- : receiver_handler_ (0),
- handle_ (0),
- consumer_initiated_shutdown_ (0)
+ :handle_ (0),
+ receiver_handler_ (0),
+ consumer_initiated_shutdown_ (0)
{
// No-Op.
}
diff --git a/TAO/examples/Event_Comm/Event_Comm_i.cpp b/TAO/examples/Event_Comm/Event_Comm_i.cpp
index abd1ae9572d..adf5f58ef47 100644
--- a/TAO/examples/Event_Comm/Event_Comm_i.cpp
+++ b/TAO/examples/Event_Comm/Event_Comm_i.cpp
@@ -87,9 +87,9 @@ Consumer_Entry::regexp (char *regexp)
Consumer_Entry::Consumer_Entry (Event_Comm::Consumer *consumer,
const char *filtering_criteria)
- : consumer_ (consumer),
- filtering_criteria_ (0),
- compiled_regexp_ (0)
+ : filtering_criteria_ (0),
+ compiled_regexp_ (0),
+ consumer_ (consumer)
{
char *compile_buffer = 0;
@@ -395,3 +395,29 @@ Consumer_i::disconnect (const char *reason,
// shutdown the orb.
TAO_ORB_Core_instance ()->orb()->shutdown ();
}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class ACE_Map_Manager<Event_Comm::Consumer *,
+ Consumer_Entry *, ACE_Null_Mutex>;
+template class ACE_Map_Iterator<Event_Comm::Consumer *, Consumer_Entry *,
+ ACE_Null_Mutex>;
+template class ACE_Map_Entry<Event_Comm::Consumer *, Consumer_Entry *>;
+template class ACE_Map_Reverse_Iterator<Event_Comm::Consumer *,
+ Consumer_Entry *, ACE_Null_Mutex>;
+template class ACE_Map_Iterator_Base<Event_Comm::Consumer *,
+ Consumer_Entry *, ACE_Null_Mutex>;
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate template class ACE_Map_Manager<Event_Comm::Consumer *,
+ Consumer_Entry *, ACE_Null_Mutex>;
+#pragma instantiate template class ACE_Map_Iterator<Event_Comm::Consumer *,
+ Consumer_Entry *, ACE_Null_Mutex>;
+#pragma instantiate template class ACE_Map_Entry<Event_Comm::Consumer *,
+ Consumer_Entry *>;
+#pragma instantiate template class ACE_Map_Reverse_Iterator<Event_Comm::Consumer *,
+ Consumer_Entry *, ACE_Null_Mutex>;
+#pragma instantiate ACE_Map_Iterator_Base<Event_Comm::Consumer *,
+ Consumer_Entry *, ACE_Null_Mutex>;
+
+#endif /* ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA */
diff --git a/TAO/examples/Event_Comm/Makefile b/TAO/examples/Event_Comm/Makefile
index 226e8f6f90e..37d12e12ac2 100644
--- a/TAO/examples/Event_Comm/Makefile
+++ b/TAO/examples/Event_Comm/Makefile
@@ -60,6 +60,16 @@ VBIN = $(BIN:%=%$(VAR))
#----------------------------------------------------------------------------
include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
+
+ifeq ($(ACE_HAS_GNUG_PRE_2_8),1)
+
+ # Since older g++ cannot handle nested classes properly, this sample
+ # will not build on g++ prior to 2.8.0.
+ all clean realclean:
+ @echo Event_Comm is not built with older versions of g++
+
+else # ! ACE_HAS_GNUG_PRE_2_8
+
include $(ACE_ROOT)/include/makeinclude/macros.GNU
include $(TAO_ROOT)/rules.tao.GNU
include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
@@ -90,6 +100,8 @@ notifier: $(addprefix $(VDIR),$(NOTIFIER_OBJS))
realclean: clean
-/bin/rm -rf Event_CommS.* Event_CommC.* Event_CommS_T.*
+endif # ! ACE_HAS_GNUG_PRE_2_8
+
# DO NOT DELETE THIS LINE -- g++dep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
diff --git a/TAO/examples/Event_Comm/Notifier_Handler.cpp b/TAO/examples/Event_Comm/Notifier_Handler.cpp
index ca8c154c374..41d1102737c 100644
--- a/TAO/examples/Event_Comm/Notifier_Handler.cpp
+++ b/TAO/examples/Event_Comm/Notifier_Handler.cpp
@@ -79,7 +79,7 @@ Notifier_Handler::init (int argc, char *argv[])
TAO_CHECK_ENV;
- // The CORBA::Object_var object is downcast to Echo_var using
+ // The CORBA::Object_var object is downcast to Notifier_var using
// the <_narrow> method.
this->notifier_ =
Event_Comm::Notifier::_narrow (notifier_obj.in (),
@@ -88,6 +88,7 @@ Notifier_Handler::init (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG,
"Notifier initialized.. \n"));
+ return 0;
}
TAO_CATCHANY
@@ -96,4 +97,5 @@ Notifier_Handler::init (int argc, char *argv[])
return -1;
}
TAO_ENDTRY;
+ return 0;
}
diff --git a/TAO/examples/Event_Comm/Notifier_Handler.h b/TAO/examples/Event_Comm/Notifier_Handler.h
index 15db90b18d9..b253cacebdd 100644
--- a/TAO/examples/Event_Comm/Notifier_Handler.h
+++ b/TAO/examples/Event_Comm/Notifier_Handler.h
@@ -38,7 +38,7 @@ public:
// This constructor gets the notifier object from the Naming
// Service.
- ~Notifier_Handler (void);
+ virtual ~Notifier_Handler (void);
// Destructor.
int init (int argc, char *argv[]);
diff --git a/TAO/examples/Event_Comm/Notifier_Server.cpp b/TAO/examples/Event_Comm/Notifier_Server.cpp
index 57b765540c9..b42483a7fb2 100644
--- a/TAO/examples/Event_Comm/Notifier_Server.cpp
+++ b/TAO/examples/Event_Comm/Notifier_Server.cpp
@@ -1,4 +1,5 @@
#include "Notifier_Server.h"
+#include "Event_CommC.h"
ACE_RCSID(Echo, Server_i, "$Id$")
@@ -65,7 +66,7 @@ Notifier_Server::init_naming_service (CORBA::Environment &TAO_TRY_ENV)
-1);
// Register the object implementation with the POA.
- Notifier_var notifier_obj =
+ Event_Comm::Notifier_var notifier_obj =
this->servant_._this (TAO_TRY_ENV);
TAO_CHECK_ENV;
diff --git a/TAO/examples/Event_Comm/Supplier_Input_Handler.cpp b/TAO/examples/Event_Comm/Supplier_Input_Handler.cpp
index 010dde49075..427939035d2 100644
--- a/TAO/examples/Event_Comm/Supplier_Input_Handler.cpp
+++ b/TAO/examples/Event_Comm/Supplier_Input_Handler.cpp
@@ -7,8 +7,8 @@
ACE_RCSID(Supplier, Supplier_Input_Handler, "$Id$")
Supplier_Input_Handler::Supplier_Input_Handler ()
- : notifier_ (0),
- handle_ (0)
+ : handle_ (0),
+ notifier_ (0)
{
// No-Op.
}
diff --git a/TAO/examples/Event_Comm/supplier.cpp b/TAO/examples/Event_Comm/supplier.cpp
index 1abf04391b0..b0461f0ad1f 100644
--- a/TAO/examples/Event_Comm/supplier.cpp
+++ b/TAO/examples/Event_Comm/supplier.cpp
@@ -91,6 +91,7 @@ Supplier::init (int argc, char *argv[])
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",
"register_handler"), -1);
+ return 0;
}
int