diff options
Diffstat (limited to 'TAO/tests/Simple/grid')
-rw-r--r-- | TAO/tests/Simple/grid/Client_i.cpp | 242 | ||||
-rw-r--r-- | TAO/tests/Simple/grid/Client_i.h | 93 | ||||
-rw-r--r-- | TAO/tests/Simple/grid/Grid.dsw | 41 | ||||
-rw-r--r-- | TAO/tests/Simple/grid/Grid.idl | 53 | ||||
-rw-r--r-- | TAO/tests/Simple/grid/Grid_i.cpp | 184 | ||||
-rw-r--r-- | TAO/tests/Simple/grid/Grid_i.h | 112 | ||||
-rw-r--r-- | TAO/tests/Simple/grid/Makefile | 83 | ||||
-rw-r--r-- | TAO/tests/Simple/grid/Server_i.cpp | 114 | ||||
-rw-r--r-- | TAO/tests/Simple/grid/Server_i.h | 63 | ||||
-rw-r--r-- | TAO/tests/Simple/grid/client.cpp | 20 | ||||
-rw-r--r-- | TAO/tests/Simple/grid/client.dsp | 201 | ||||
-rwxr-xr-x | TAO/tests/Simple/grid/run_test.pl | 23 | ||||
-rw-r--r-- | TAO/tests/Simple/grid/server.cpp | 40 | ||||
-rw-r--r-- | TAO/tests/Simple/grid/server.dsp | 205 |
14 files changed, 0 insertions, 1474 deletions
diff --git a/TAO/tests/Simple/grid/Client_i.cpp b/TAO/tests/Simple/grid/Client_i.cpp deleted file mode 100644 index 4ee6d2c0f3c..00000000000 --- a/TAO/tests/Simple/grid/Client_i.cpp +++ /dev/null @@ -1,242 +0,0 @@ -// -*- C++ -*- -// $Id$ -#include "Client_i.h" -#include "ace/Get_Opt.h" -#include "ace/Read_Buffer.h" - -// Constructor. -Client_i::Client_i (void) - : ior_ (0), - shutdown_ (0), - server_ (), - height_ (0), - width_ (0), - grid_ (0), - setx_ (0), - sety_ (0), - setvalue_ (0) -{ - // no-op -} - -// Reads the Server factory ior from a file - -int -Client_i::read_ior (char *filename) -{ - // Open the file for reading. - ACE_HANDLE f_handle = ACE_OS::open (filename, 0); - - if (f_handle == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to open %s for writing: %p\n", - filename), - -1); - - ACE_Read_Buffer ior_buffer (f_handle); - char *data = ior_buffer.read (); - - if (data == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to read ior: %p\n"), - -1); - - this->ior_ = ACE_OS::strdup (data); - ior_buffer.alloc ()->free (data); - - ACE_OS::close (f_handle); - - return 0; -} - -// Parses the command line arguments and returns an error status. - -int -Client_i::parse_args (void) -{ - // Gets the command line options - // The string enclosed in " " essentially tells us - // what to expect from the command line options. - ACE_Get_Opt get_opts (argc_, argv_, "df:sk:w:h:x:y:v:"); - int c = 0; - int result = 0; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag - TAO_debug_level++; - break; - case 'k': // ior provide on command line - this->ior_ = ACE_OS::strdup (get_opts.optarg); - break; - case 'f': // read the IOR from the file. - result = this->read_ior (get_opts.optarg); - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to read ior from %s : %p\n", - get_opts.optarg), - -1); - break; - case 'h': // Height of the grid. - height_ = (u_int) ACE_OS::atoi (get_opts.optarg); - break; - case 'w': // Width of the grid. - width_ = (u_int) ACE_OS::atoi (get_opts.optarg); - break; - case 'x': // A x value of the grid where a value needs - // to be stored. - setx_ = (u_int) ACE_OS::atoi (get_opts.optarg); - break; - case 'y': // A y value of the grid where a value needs - // to be stored. - sety_ = (u_int) ACE_OS::atoi (get_opts.optarg); - break; - case 'v': // A value that needs to be stored a grid[x][y]. - setvalue_ = (u_int) ACE_OS::atoi (get_opts.optarg); - break; - case 's': // Shutdown server. - this->shutdown_ = 1; - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - " [-f ior-file]" - " [-w width]" - " [-h height]" - " [-k ior]" - " [-s]" - " [-x cell location]" - " [-y cell location]" - " [-v value ]" - "\n", - this->argv_ [0]), - -1); - } - if (setx_ == 0 ) - setx_ = Grid::DEFAULT_LOCATION; - if (sety_ == 0 ) - sety_ = Grid::DEFAULT_LOCATION; - if (setvalue_ == 0 ) - setvalue_ = Grid::DEFAULT_VALUE; - - // Indicates successful parsing of command line. - return 0; -} - -// Get the Grid on the server - -void -Client_i::test_grid (void) -{ - // Make the RMI. - TAO_TRY - { - this->grid_ = this->server_->make_grid (width_, - height_, - this->env_); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG, - "\nMade the grid succesfully\n")); - // Set a value for a grid. - this->grid_->set (setx_, - sety_, - setvalue_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG, - "\n\t Setting a value for the grid")); - - // Get the value of the grid - CORBA::Long ret_val = this->grid_->get (setx_, - sety_, - TAO_TRY_ENV); - ACE_ASSERT (ret_val == setvalue_); - TAO_CHECK_ENV; - } - TAO_CATCH (CORBA::UserException, range_ex) - { - ACE_UNUSED_ARG (range_ex); - TAO_TRY_ENV.print_exception (" From set and get grid "); - } - TAO_CATCH (CORBA::SystemException, memex) - { - ACE_UNUSED_ARG (memex); - TAO_TRY_ENV.print_exception (" Cannot make grid as Memory exhausted"); - } - TAO_ENDTRY; -} - -// Execute client example code. - -int -Client_i::run (void) -{ - // Make the grid. - this->test_grid (); - - // Destroy the grid. - this->grid_->destroy (); - - // Shutdown the server - if (this->shutdown_) - this->server_->shutdown (this->env_); - - return 0; -} - -Client_i::~Client_i (void) -{ - ACE_OS::free (this->ior_); -} - -int -Client_i::init (int argc, char **argv) -{ - this->argc_ = argc; - this->argv_ = argv; - - TAO_TRY - { - // Retrieve the ORB. - this->orb_ = CORBA::ORB_init (this->argc_, - this->argv_, - 0, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Parse command line and verify parameters. - if (this->parse_args () == -1) - return -1; - - if (this->ior_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "%s: no ior specified\n", - this->argv_[0]), - -1); - - CORBA::Object_var server_object = - this->orb_->string_to_object (this->ior_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (server_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid ior <%s>\n", - this->ior_), - -1); - this->server_ = Grid_Factory::_narrow (server_object.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Client_i::init"); - return -1; - } - TAO_ENDTRY; - - return 0; -} diff --git a/TAO/tests/Simple/grid/Client_i.h b/TAO/tests/Simple/grid/Client_i.h deleted file mode 100644 index 4455c6c73b1..00000000000 --- a/TAO/tests/Simple/grid/Client_i.h +++ /dev/null @@ -1,93 +0,0 @@ -// -*- C++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/Simple -// -// = FILENAME -// Client_i.h -// -// = DESCRIPTION -// This class implements a simple CORBA client that access a Grid -// server. -// -// = AUTHORS -// -// ============================================================================ - -# include "GridC.h" - -class Client_i -{ - // = TITLE - // Simple Client implementation. - // - // = DESCRIPTION - // Class wrapper for a client that gets the server IOR and then - // makes several calls to the server before optionally shutting - // it down. - -public: - // = Initialization and termination methods. - Client_i (void); - // Constructor. - - ~Client_i (void); - // Destructor. - - int run (void); - // Execute client example code. - - int init (int argc, char *argv[]); - // Initialize the client communication endpoint with server. - - void test_grid (void); - // Make the grid. - -private: - int read_ior (char *filename); - // Function to read the server IOR from a file. - - int parse_args (void); - // Parses the arguments passed on the command line. - - int argc_; - // # of arguments on the command line. - - char **argv_; - // arguments from command line. - - char *ior_; - // IOR of the obj ref of the server. - - int shutdown_; - // Flag for server shutdown. - - CORBA::Environment env_; - // Environment variable. - - Grid_Factory_var server_; - // Server object ptr. - - Grid_ptr grid_; - // Pointer to the grid - - CORBA::Short height_; - // Height of the grid. - - CORBA::Short width_; - // Width of the grid. - - CORBA::Short setx_; - // Cell identifier in which a value meeds to be stored. - - CORBA::Short sety_; - // Cell identifier in which a value meeds to be stored. - - CORBA::Long setvalue_; - // The value that needs to be stored in the cell. - - CORBA::ORB_var orb_; - // Remember our orb. -}; diff --git a/TAO/tests/Simple/grid/Grid.dsw b/TAO/tests/Simple/grid/Grid.dsw deleted file mode 100644 index 9e4d88b6e73..00000000000 --- a/TAO/tests/Simple/grid/Grid.dsw +++ /dev/null @@ -1,41 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Grid Client"=.\client.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "Grid Server"=.\server.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/tests/Simple/grid/Grid.idl b/TAO/tests/Simple/grid/Grid.idl deleted file mode 100644 index 72c360a98e4..00000000000 --- a/TAO/tests/Simple/grid/Grid.idl +++ /dev/null @@ -1,53 +0,0 @@ -// -*- C++ -*- -// $Id$ - -interface Grid -{ - // = TITLE - // Create a <Grid> of type <name> - - attribute short height; - // Height of the grid. - - attribute short width; - // Width of the grid. - - exception RANGE_ERROR - { - // = TITLE - // The range of parameter values do not fall in the expected - // range. - }; - - // = Default LOCATIONS and VALUE for set and get values - // from the grid. - const short DEFAULT_LOCATION = 1; - const short DEFAULT_VALUE = 100; - - void set (in short n, in short m, in long value) - raises (RANGE_ERROR); - // Set the element [n,m] of the grid, to value. - - long get (in short n, in short m) - raises (RANGE_ERROR); - // Return element [n,m] of the grid. - - void destroy (); - // Destroy the grid. -}; - -interface Grid_Factory -{ - // = TITLE - // Create a <Grid_Factory> - - // = Default height and width for a <Grid>. - const short DEFAULT_HEIGHT = 10; - const short DEFAULT_WIDTH = 10; - - Grid make_grid (in short height, in short width); - // Returns a new <Grid> instance. - - void shutdown (); - // Shutdown the application. -}; diff --git a/TAO/tests/Simple/grid/Grid_i.cpp b/TAO/tests/Simple/grid/Grid_i.cpp deleted file mode 100644 index 97b5bca6669..00000000000 --- a/TAO/tests/Simple/grid/Grid_i.cpp +++ /dev/null @@ -1,184 +0,0 @@ -// -*- C++ -*- -// $Id$ -#include "Grid_i.h" -#include "tao/corba.h" - -// Default constructor. -Grid_i::Grid_i (void) - : width_ (0), - height_ (0), - array_ (0) -{ - //no-op -} - -// Constructor. -Grid_i::Grid_i (CORBA::Short x, - CORBA::Short y, - CORBA::Environment &_env) - : width_ (x), - height_ (y) -{ - ACE_NEW_THROW (array_, - CORBA::Long *[y], - CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); - - // Allocate memory for the matrix. - - for (int ctr = 0; ctr < y; ctr++) - ACE_NEW_THROW (array_[ctr], - CORBA::Long[x], - CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); -} - -// Default destructor. - -Grid_i::~Grid_i (void) -{ - // no-op. -} - -// Set a value in the grid. - -void -Grid_i::set (CORBA::Short x, - CORBA::Short y, - CORBA::Long value, - CORBA::Environment &_env) -{ - if (x < 0 - || y < 0 - || x >= width_ - || y >= height_) - { - TAO_THROW (Grid::RANGE_ERROR); - } - else - array_[x][y] = value; -} - -// Get a value from the grid. - -CORBA::Long -Grid_i::get (CORBA::Short x, - CORBA::Short y, - CORBA::Environment &_env) -{ - if (x < 0 - || y < 0 - || x >= width_ - || y >= height_) - { - TAO_THROW_RETURN (Grid::RANGE_ERROR, 0); - } - else - return array_[x][y]; -} - -// Access methods. - -CORBA::Short -Grid_i::width (CORBA::Environment &_env) -{ - return this->width_; -} - -CORBA::Short -Grid_i::height (CORBA::Environment &_env) -{ - return this->height_; -} - -void -Grid_i::width (CORBA::Short x, - CORBA::Environment &_env) -{ - this->width_ = x; -} - -void -Grid_i::height (CORBA::Short y, - CORBA::Environment &_env) -{ - this->height_ = y; -} - -// Destroy the grid - -void -Grid_i::destroy (CORBA::Environment &_env) -{ - // Delete the array. - for (int i = 0; i < height_; i++) - delete [] array_[i]; - - delete [] array_; - - ACE_DEBUG ((LM_DEBUG, - "%s\n", - "Grid has been destroyed")); -} - -// Set the ORB pointer. - -void -Grid_Factory_i::orb (CORBA::ORB_ptr o) -{ - this->orb_ = CORBA::ORB::_duplicate (o); -} - -// Shutdown. - -void -Grid_Factory_i::shutdown (CORBA::Environment &) -{ - ACE_DEBUG ((LM_DEBUG, - "%s\n", - "Grid Factory is shutting down")); - - // Instruct the ORB to shutdown. - this->orb_->shutdown (); -} - -// Constructor -Grid_Factory_i::Grid_Factory_i (void) -{ - // no-op -} - -// Destructor -Grid_Factory_i::~Grid_Factory_i (void) -{ - // no-op -} - -// Make a <Grid>. - -Grid_ptr -Grid_Factory_i::make_grid (CORBA::Short width, - CORBA::Short height, - CORBA::Environment &_env) -{ - Grid_i *grid_ptr = 0; - - ACE_DEBUG ((LM_DEBUG, - "\n\tMaking a new Grid")); - - // Set a default value for width. - if (width <= 0) - width = Grid_Factory::DEFAULT_WIDTH; - - // Set a default value for height. - if (height <= 0) - height = Grid_Factory::DEFAULT_HEIGHT; - - // This attempts to create a new Grid_i and throws an exception and - // returns a null value if it fails - ACE_NEW_THROW_RETURN (grid_ptr, - Grid_i (width, height, _env), - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - Grid::_nil ()); - - // Register the Grid pointer. - return grid_ptr->_this (_env); -} diff --git a/TAO/tests/Simple/grid/Grid_i.h b/TAO/tests/Simple/grid/Grid_i.h deleted file mode 100644 index cd0c34c26a5..00000000000 --- a/TAO/tests/Simple/grid/Grid_i.h +++ /dev/null @@ -1,112 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/Simple/grid -// -// = FILENAME -// Grid_i.h -// -// = DESCRIPTION -// This class implements the Grid IDL interface. -// -// = AUTHOR -// -// ============================================================================ - -#if !defined (GRID_I_H) -#define GRID_I_H - -#include "GridS.h" - -class Grid_i: public POA_Grid -{ - // = TITLE - // Grid object implementation. - // - // = DESCRIPTION - // Grid object implementation -public: - // = Initialization and termination methods. - - Grid_i (void); - // Constructor - - Grid_i (CORBA::Short, - CORBA::Short, - CORBA_Environment &); - // Constructor. - - ~Grid_i (void); - // Destructor - - virtual CORBA::Short width (CORBA_Environment &); - // Returns the width of the grid - - virtual CORBA::Short height (CORBA_Environment &); - // Returns the height of the grid - - virtual void width (CORBA::Short, - CORBA_Environment &); - // Sets the width of the grid. - - virtual void height (CORBA::Short, - CORBA_Environment &); - // Sets the height of the grid. - - virtual void set (CORBA::Short, - CORBA::Short, - CORBA::Long, - CORBA::Environment &); - // Sets the grid value. - - virtual CORBA::Long get (CORBA::Short, - CORBA::Short, - CORBA::Environment &); - // Gets the grid value. - - virtual void destroy (CORBA::Environment &); - // Destroy the grid. - -private: - CORBA::Short width_; - // Width of the grid. - - CORBA::Short height_; - // Height of the grid. - - CORBA::Long **array_; - // Pointer to the matrix. This is organized as an "array of arrays." -}; - -class Grid_Factory_i : public POA_Grid_Factory -{ - // =TITLE - // Create a <Grid>. -public: - // = Initialization and termination methods. - Grid_Factory_i (void); - // Constructor. - - ~Grid_Factory_i (void); - // Destructor. - - virtual Grid_ptr make_grid (CORBA::Short, - CORBA::Short, - CORBA::Environment &_env); - // This function creates and returns a <Grid>. - - virtual void shutdown (CORBA::Environment &env); - // Shutdown the server. - - void orb (CORBA::ORB_ptr o); - // Set the ORB pointer. - -private: - CORBA::ORB_var orb_; - // ORB pointer. -}; - -#endif /* GRID_I_H */ diff --git a/TAO/tests/Simple/grid/Makefile b/TAO/tests/Simple/grid/Makefile deleted file mode 100644 index 528911f75e0..00000000000 --- a/TAO/tests/Simple/grid/Makefile +++ /dev/null @@ -1,83 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif # ! TAO_ROOT - -LDLIBS = -lTAO - -IDL_SRC = GridC.cpp GridS.cpp - -PROG_SRCS = \ - client.cpp \ - Client_i.cpp \ - server.cpp \ - Server_i.cpp \ - Grid_i.cpp \ - -SRC = $(IDL_SRC) $(PROG_SRCS) - -SIMPLE_CLT_OBJS = \ - GridC.o \ - GridS.o \ - Client_i.o \ - client.o -SIMPLE_SVR_OBJS = \ - GridC.o \ - GridS.o \ - Grid_i.o \ - Server_i.o \ - server.o - -BIN = server \ - client -BUILD = $(BIN) -VLDLIBS = $(LDLIBS:%=%$(VAR)) -VBIN = $(BIN:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -LDFLAGS += -L$(TAO_ROOT)/tao -CPPFLAGS += - -.PRECIOUS: GridC.cpp GridC.i GridC.h -.PRECIOUS: GridS.cpp GridS.i GridS.h -.PRECIOUS: GridS_T.cpp GridS_T.i GridS_T.h - -server: $(addprefix $(VDIR),$(SIMPLE_SVR_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -client: $(addprefix $(VDIR),$(SIMPLE_CLT_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -realclean: clean - -/bin/rm -rf GridC.* GridS.* GridS_T.* - -# 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/TAO/tests/Simple/grid/Server_i.cpp b/TAO/tests/Simple/grid/Server_i.cpp deleted file mode 100644 index cd0685e4f90..00000000000 --- a/TAO/tests/Simple/grid/Server_i.cpp +++ /dev/null @@ -1,114 +0,0 @@ -// -*- C++ -*- -// $Id$ -#include "Server_i.h" -#include "ace/Get_Opt.h" - -// Constructor. - -Server_i::Server_i (void) - : ior_output_file_ (0) -{ -} - -// Destructor. -Server_i::~Server_i (void) -{ -} - -// Parse the command-line arguments and set options. - -int -Server_i::parse_args (void) -{ - ACE_Get_Opt get_opts (this->argc_, this->argv_, "do:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag. - TAO_debug_level++; - break; - case 'o': // output the IOR to a file. - this->ior_output_file_ = ACE_OS::fopen (get_opts.optarg, "w"); - if (this->ior_output_file_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to open %s for writing: %p\n", - get_opts.optarg), -1); - break; - case '?': // display help for use of the server. - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - " [-o] <ior_output_file>" - "\n", - argv_ [0]), - 1); - } - - // Indicates successful parsing of command line. - return 0; -} - -// Initialize the server. - -int -Server_i::init (int argc, char *argv[], CORBA::Environment &env) -{ - // Call the init of <TAO_ORB_Manager> to initialize the ORB and - // create a child POA under the root POA. - if (this->orb_manager_.init_child_poa (argc, - argv, - "child_poa", - env) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "init_child_poa"), - -1); - TAO_CHECK_ENV_RETURN (env, -1); - - this->argc_ = argc; - this->argv_ = argv; - - int retval = this->parse_args (); - - if (retval != 0) - return retval; - - CORBA::ORB_var orb = this->orb_manager_.orb (); - - // Stash our ORB pointer for later reference. - this->servant_.orb (orb.in ()); - - // Activate the servant in its own child POA. - CORBA::String_var str = - this->orb_manager_.activate_under_child_poa ("grid", - &this->servant_, - env); - ACE_DEBUG ((LM_DEBUG, - "The IOR is: <%s>\n", - str.in ())); - - if (this->ior_output_file_) - { - ACE_OS::fprintf (this->ior_output_file_, - "%s", - str.in ()); - ACE_OS::fclose (this->ior_output_file_); - } - - return 0; -} - -int -Server_i::run (CORBA::Environment &env) -{ - // Run the main event loop for the ORB. - if (this->orb_manager_.run (env) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Server_i::run"), - -1); - return 0; -} - diff --git a/TAO/tests/Simple/grid/Server_i.h b/TAO/tests/Simple/grid/Server_i.h deleted file mode 100644 index 1cb5f88a2be..00000000000 --- a/TAO/tests/Simple/grid/Server_i.h +++ /dev/null @@ -1,63 +0,0 @@ -// -*- C++ -*- -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/tests/Simple -// -// = FILENAME -// Server_i.h -// -// = DESCRIPTION -// A CORBA server that initializes the grid server implementation -// and the ORB. -// -// = AUTHORS -// -// ============================================================================ - -#if !defined (SERVER_I_H) -#define SERVER_I_H - -#include "Grid_i.h" -#include "tao/TAO.h" - -class Server_i -{ - // = TITLE - // CORBA Server implementation. -public: - // = Initialization and termination methods. - Server_i (void); - // Constructor. - - ~Server_i (void); - // Destructor. - - int init (int argc, char *argv[], CORBA::Environment &env); - // Initialize the Server state - parsing arguments and waiting. - - int run (CORBA::Environment &env); - // Run the orb. - -private: - Grid_Factory_i servant_; - // Servant for the Grid interface. - - int parse_args (void); - // Parses the commandline arguments. - - TAO_ORB_Manager orb_manager_; - // The ORB manager. - - FILE *ior_output_file_; - // File where the IOR of the server object is stored. - - int argc_; - // Number of command line arguments. - - char **argv_; - // The command line arguments. -}; - -#endif /* SERVER_I_H */ diff --git a/TAO/tests/Simple/grid/client.cpp b/TAO/tests/Simple/grid/client.cpp deleted file mode 100644 index 6dcfbf5d7e1..00000000000 --- a/TAO/tests/Simple/grid/client.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// -*- C++ -*- -// $Id$ -#include "Client_i.h" - -// This function runs the grid test. - -int -main (int argc, char **argv) -{ - Client_i client; - - ACE_DEBUG ((LM_DEBUG, - "\n\tGrid client\n\n")); - - if (client.init (argc, argv) == -1) - return -1; - else - return client.run (); -} - diff --git a/TAO/tests/Simple/grid/client.dsp b/TAO/tests/Simple/grid/client.dsp deleted file mode 100644 index 074695c225a..00000000000 --- a/TAO/tests/Simple/grid/client.dsp +++ /dev/null @@ -1,201 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Simple Grid Client" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Simple Grid Client - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "client.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "client.mak" CFG="Simple Grid Client - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Simple Grid Client - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Simple Grid Client - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Simple Grid Client - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\client\Release"
-# PROP BASE Intermediate_Dir ".\client\Release"
-# PROP BASE Target_Dir ".\client"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\client"
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /I "..\..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib TAO.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "Simple Grid Client - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\client\Debug"
-# PROP BASE Intermediate_Dir ".\client\Debug"
-# PROP BASE Target_Dir ".\client"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ".\Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\client"
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\\" /I "..\..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Simple Grid Client - Win32 Release"
-# Name "Simple Grid Client - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\client.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Client_i.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\GridC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\GridS.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\Client_i.h
-# End Source File
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter ".idl"
-# Begin Source File
-
-SOURCE=.\Grid.idl
-
-!IF "$(CFG)" == "Simple Grid Client - Win32 Release"
-
-# Begin Custom Build - Invoking TAO_IDL Compiler
-InputPath=.\Grid.idl
-InputName=Grid
-
-BuildCmds= \
- ..\..\..\tao_idl\Release\tao_idl $(InputName).idl
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "Simple Grid Client - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL Compiler
-InputPath=.\Grid.idl
-InputName=Grid
-
-BuildCmds= \
- ..\..\..\tao_idl\tao_idl $(InputName).idl
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/tests/Simple/grid/run_test.pl b/TAO/tests/Simple/grid/run_test.pl deleted file mode 100755 index fb32f7fe96c..00000000000 --- a/TAO/tests/Simple/grid/run_test.pl +++ /dev/null @@ -1,23 +0,0 @@ -#$Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -use lib "../../../../bin"; -require ACEutils; -require Process; - -$iorfile = "grid.ior"; - -$SV = Process::Create ("server$Process::EXE_EXT", "-o $iorfile "); - -ACE::waitforfile ($iorfile); - -$status = system ("client$Process::EXE_EXT -f $iorfile -s -w 12 -h 12 -x 2 -y 2 -v 2345"); - -$SV->Kill (); $SV->Wait (); - -unlink $iorfile; - -exit $status; diff --git a/TAO/tests/Simple/grid/server.cpp b/TAO/tests/Simple/grid/server.cpp deleted file mode 100644 index 1a3974ee9bc..00000000000 --- a/TAO/tests/Simple/grid/server.cpp +++ /dev/null @@ -1,40 +0,0 @@ -// -*- C++ -*- -// $Id$ -#include "Server_i.h" - -// This is the main driver program for the grid server. - -int -main (int argc, char *argv[]) -{ - Server_i server; - - ACE_DEBUG ((LM_DEBUG, - "\nGrid server\n")); - - TAO_TRY - { - if (server.init (argc, argv, TAO_TRY_ENV) == -1) - return 1; - else - { - server.run (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - } - TAO_CATCH (CORBA::SystemException, sysex) - { - ACE_UNUSED_ARG (sysex); - TAO_TRY_ENV.print_exception ("System Exception"); - return -1; - } - TAO_CATCH (CORBA::UserException, userex) - { - ACE_UNUSED_ARG (userex); - TAO_TRY_ENV.print_exception ("User Exception"); - return -1; - } - TAO_ENDTRY; - - return 0; -} diff --git a/TAO/tests/Simple/grid/server.dsp b/TAO/tests/Simple/grid/server.dsp deleted file mode 100644 index 1daaefd440d..00000000000 --- a/TAO/tests/Simple/grid/server.dsp +++ /dev/null @@ -1,205 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Simple Grid Server" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Simple Grid Server - Win32 Alpha Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "server.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "server.mak" CFG="Simple Grid Server - Win32 Alpha Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Simple Grid Server - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Simple Grid Server - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Simple Grid Server - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\server\Release"
-# PROP BASE Intermediate_Dir ".\server\Release"
-# PROP BASE Target_Dir ".\server"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\server"
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /I "..\..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib TAO.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "Simple Grid Server - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\server\Debug"
-# PROP BASE Intermediate_Dir ".\server\Debug"
-# PROP BASE Target_Dir ".\server"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ".\Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\server"
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\\" /I "..\..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Simple Grid Server - Win32 Release"
-# Name "Simple Grid Server - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\Grid_i.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\GridC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\GridS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\server.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Server_i.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\Server_i.h
-# End Source File
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter ".idl"
-# Begin Source File
-
-SOURCE=.\Grid.idl
-
-!IF "$(CFG)" == "Simple Grid Server - Win32 Release"
-
-# Begin Custom Build - Invoking TAO_IDL Compiler
-InputPath=.\Grid.idl
-InputName=Grid
-
-BuildCmds= \
- ..\..\..\tao_idl\Release\tao_idl $(InputName).idl
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "Simple Grid Server - Win32 Debug"
-
-# Begin Custom Build - Invoking TAO_IDL Compiler
-InputPath=.\Grid.idl
-InputName=Grid
-
-BuildCmds= \
- ..\..\..\tao_idl\tao_idl $(InputName).idl
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
|