summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-12-05 20:48:14 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-12-05 20:48:14 +0000
commitf4fbf7c940c8605cefd1162d7f7a222e5cba85a7 (patch)
treef5a5377681f6c7af33bc38dfd565502eb7b60dbf /examples
parent350716e60453b2f555774f8fe1159ae1a52ba202 (diff)
downloadATCD-f4fbf7c940c8605cefd1162d7f7a222e5cba85a7.tar.gz
ChangeLogTag:Wed Dec 5 12:37:56 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'examples')
-rw-r--r--examples/CORBA/Makefile65
-rw-r--r--examples/CORBA/Test.idl8
-rw-r--r--examples/CORBA/Test_i.cpp12
-rw-r--r--examples/CORBA/Test_i.h19
-rw-r--r--examples/CORBA/client.cpp27
-rw-r--r--examples/CORBA/server.cpp39
-rw-r--r--examples/Reactor/Multicast/Log_Wrapper.cpp19
-rw-r--r--examples/Reactor/Multicast/Log_Wrapper.h2
8 files changed, 10 insertions, 181 deletions
diff --git a/examples/CORBA/Makefile b/examples/CORBA/Makefile
deleted file mode 100644
index 316fe5e1c99..00000000000
--- a/examples/CORBA/Makefile
+++ /dev/null
@@ -1,65 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id: Makefile 1.1 10/18/96
-#
-# Makefile for the ACE_MT_CORBA_Handler tests
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-SRC = Test_i.cpp client.cpp server.cpp
-
-SVR_OBJS = TestS.o Test_i.o server.o
-CLT_OBJS = TestC.o client.o
-
-LDLIBS =
-
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Orbix related macros and target settings.
-#----------------------------------------------------------------------------
-
-ORBIX_BINDIR = $(ORBIX_ROOT)/bin
-ORBIX_LIBDIR = $(ORBIX_ROOT)/lib
-ORBIX_INCDIR = $(ORBIX_ROOT)/include
-
-CPPFLAGS += -DEXCEPTIONS -I$(ORBIX_INCDIR) -DWANT_ORBIX_FDS
-LDFLAGS += -L$(ORBIX_LIBDIR) -R $(ORBIX_LIBDIR)
-
-IDLFLAGS = -s S.cpp -c C.cpp -B
-
-#----------------------------------------------------------------------------
-# Local targets
-#----------------------------------------------------------------------------
-
-all: client server
-
-client: $(addprefix $(VDIR),$(CLT_OBJS))
- $(LINK.cc) -o client $(addprefix $(VDIR),$(CLT_OBJS)) $(LDFLAGS) -lITsrvmt $(VLDLIBS)
-
-server: $(addprefix $(VDIR),$(SVR_OBJS))
- $(LINK.cc) -o server $(addprefix $(VDIR),$(SVR_OBJS)) $(LDFLAGS) -lITsrvmt $(VLDLIBS)
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/examples/CORBA/Test.idl b/examples/CORBA/Test.idl
deleted file mode 100644
index d5ae1850e4a..00000000000
--- a/examples/CORBA/Test.idl
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-interface Test
-// @(#)Test.idl 1.1 10/18/96
-
-{
- void method (in long input1);
-};
diff --git a/examples/CORBA/Test_i.cpp b/examples/CORBA/Test_i.cpp
deleted file mode 100644
index 03c969a6a0d..00000000000
--- a/examples/CORBA/Test_i.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// $Id$
-
-#include "Test_i.h"
-
-ACE_RCSID(CORBA, Test_i, "$Id$")
-
-void
-Test_i::method (long input,
- ACE_CORBA_1 (Environment) &)
-{
- ACE_DEBUG ((LM_DEBUG, "received a number %d\n", input));
-}
diff --git a/examples/CORBA/Test_i.h b/examples/CORBA/Test_i.h
deleted file mode 100644
index 01fe82c75f1..00000000000
--- a/examples/CORBA/Test_i.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "ace/Log_Msg.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "Test.hh"
-
-class Test_i
-{
-public:
- virtual void method (long input,
- ACE_CORBA_1 (Environment) &IT_env = ACE_CORBA_1 (default_environment));
-};
-
-DEF_TIE_Test (Test_i)
diff --git a/examples/CORBA/client.cpp b/examples/CORBA/client.cpp
deleted file mode 100644
index 620bcf978af..00000000000
--- a/examples/CORBA/client.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// $Id$
-
-#include "Test.hh"
-
-ACE_RCSID(CORBA, client, "$Id$")
-
-int
-main (int argc, char *argv[])
-{
- char *host = argc == 2 ? argv[1] : ACE_DEFAULT_SERVER_HOST;
-
- Test_var my_test;
-
- TRY {
- my_test = Test::_bind ("", host, IT_X);
- my_test->method (5);
- } CATCHANY {
- cerr << IT_X << endl;
- return -1;
- } ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG, "everything works!\n"));
-
- // Memory for my_test is automatically released by destructor of
- // smart pointer.
- return 0;
-}
diff --git a/examples/CORBA/server.cpp b/examples/CORBA/server.cpp
deleted file mode 100644
index c7f9abee77c..00000000000
--- a/examples/CORBA/server.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id$
-
-#include "ace/Service_Config.h"
-#include "ace/CORBA_Handler.h"
-#include "Test_i.h"
-
-ACE_RCSID(CORBA, server, "$Id$")
-
-#if defined (ACE_HAS_ORBIX) && (ACE_HAS_ORBIX != 0)
-
-#if defined (ACE_HAS_MT_ORBIX) && (ACE_HAS_MT_ORBIX != 0)
-typedef ACE_MT_CORBA_Handler CORBA_HANDLER;
-#else
-typedef ACE_ST_CORBA_Handler CORBA_HANDLER;
-#endif /* ACE_HAS_MT_ORBIX */
-
-int
-main (int argc, char *argv[])
-{
- ACE_Service_Config daemon;
-
- char pwd[BUFSIZ];
- char app[BUFSIZ];
-
- ACE_OS::getcwd (pwd, sizeof pwd);
- ACE_OS::sprintf (app, "%s/%s", pwd, argv[0]);
-
- if (CORBA_HANDLER::instance ()->activate_service (Test_IMPL, 0, app) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "Could not activate services for supplier\n"), -1);
-
- TIE_Test (Test_i) test (new Test_i);
-
- for (;;)
- if (CORBA_HANDLER::instance ()->reactor ()->handle_events () == -1)
- break;
-
- return 0;
-}
-#endif /* ACE_HAS_ORBIX */
diff --git a/examples/Reactor/Multicast/Log_Wrapper.cpp b/examples/Reactor/Multicast/Log_Wrapper.cpp
index dc0744dabe9..60ffa40fd1d 100644
--- a/examples/Reactor/Multicast/Log_Wrapper.cpp
+++ b/examples/Reactor/Multicast/Log_Wrapper.cpp
@@ -12,26 +12,26 @@ Log_Wrapper::Log_Wrapper (void)
this->log_msg_.app_id = ACE_OS::getpid ();
}
-Log_Wrapper::~Log_Wrapper (void)
+Log_Wrapper::~Log_Wrapper (void)
{
}
// Set the log_msg_ host address.
int
-Log_Wrapper::open (const int port, const char *mcast_addr)
+Log_Wrapper::open (const int port, const char *mcast_addr)
{
struct hostent *host_info;
ACE_utsname host_data;
- if (ACE_OS::uname (&host_data) < 0)
+ if (ACE_OS::uname (&host_data) < 0)
return -1;
-
- if ((host_info = ACE_OS::gethostbyname (host_data.nodename)) == NULL)
+
+ if ((host_info = ACE_OS::gethostbyname (host_data.nodename)) == NULL)
return -1;
- else
- ACE_OS::memcpy ((char *) &this->log_msg_.host,
- (char *) host_info->h_addr,
+ else
+ ACE_OS::memcpy ((char *) &this->log_msg_.host,
+ (char *) host_info->h_addr,
host_info->h_length);
// This starts out initialized to all zeros!
@@ -50,7 +50,7 @@ Log_Wrapper::open (const int port, const char *mcast_addr)
int
Log_Wrapper::log_message (Log_Priority type, char *message)
-{
+{
sequence_number_++;
this->log_msg_.type = type;
@@ -69,4 +69,3 @@ Log_Wrapper::log_message (Log_Priority type, char *message)
// success.
return 0;
}
-
diff --git a/examples/Reactor/Multicast/Log_Wrapper.h b/examples/Reactor/Multicast/Log_Wrapper.h
index c6f05912067..10458f706bc 100644
--- a/examples/Reactor/Multicast/Log_Wrapper.h
+++ b/examples/Reactor/Multicast/Log_Wrapper.h
@@ -35,7 +35,7 @@ public:
};
int open (const int port, const char* mcast_addr);
- // get an object reference from an orbixd
+ // Subscribe to a given UDP multicast group
int log_message (Log_Priority type, char *message);
// send a string to the logger