diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-12 22:18:54 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-12 22:18:54 +0000 |
commit | f5a5e479a712bef0eb49ebb62ba0f2804a978935 (patch) | |
tree | 1e546aa945d0579c894d6c23ff169a18613013f9 | |
parent | 454f363e26c15ce9377d901a9c62d04ce61ef0d7 (diff) | |
download | ATCD-f5a5e479a712bef0eb49ebb62ba0f2804a978935.tar.gz |
Removed the simple test because the nestea test was added.
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/Simple_Object.idl | 16 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/client.cpp | 22 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/client.dsp | 204 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/client_impl.cpp | 197 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/client_impl.h | 75 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/server.cpp | 37 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/server.dsp | 232 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/server_impl.cpp | 237 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/server_impl.h | 81 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/simple_object_impl.cpp | 51 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/simple_object_impl.h | 79 |
11 files changed, 0 insertions, 1231 deletions
diff --git a/TAO/orbsvcs/tests/ImplRepo/Simple_Object.idl b/TAO/orbsvcs/tests/ImplRepo/Simple_Object.idl deleted file mode 100644 index 34fffdef395..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/Simple_Object.idl +++ /dev/null @@ -1,16 +0,0 @@ -// $Id$ - -interface simple_object - // = TITLE - // Defines an interface that encapsulates operations that cube - // numbers. - // - // = DESCRIPTION - // This interface encapsulates an operation that cubes a long. -{ - long simple_method (in long l); - // cube a long - - void shutdown (); - // shutdown the application. -}; diff --git a/TAO/orbsvcs/tests/ImplRepo/client.cpp b/TAO/orbsvcs/tests/ImplRepo/client.cpp deleted file mode 100644 index b0bb4f77765..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/client.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// $Id$ - -#include "client_impl.h" - -ACE_RCSID(ImplRepo, client, "$Id$") - -// This function runs the test. - -int -main (int argc, char **argv) -{ - Client_i client; - - ACE_DEBUG ((LM_DEBUG, - "\n\tSimple_Client\n\n")); - - if (client.init (argc, argv) == -1) - return 1; - else - return client.run (); -} - diff --git a/TAO/orbsvcs/tests/ImplRepo/client.dsp b/TAO/orbsvcs/tests/ImplRepo/client.dsp deleted file mode 100644 index 0b09c6ff220..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/client.dsp +++ /dev/null @@ -1,204 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ImplRepoTest Client" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=ImplRepoTest 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="ImplRepoTest Client - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ImplRepoTest Client - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "ImplRepoTest 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)" == "ImplRepoTest 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)" == "ImplRepoTest 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 /incremental:no /debug /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "ImplRepoTest Client - Win32 Release"
-# Name "ImplRepoTest 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_impl.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Simple_ObjectC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Simple_ObjectS.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_impl.h
-# End Source File
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter ".idl"
-# Begin Source File
-
-SOURCE=.\Simple_Object.idl
-
-!IF "$(CFG)" == "ImplRepoTest Client - Win32 Release"
-
-USERDEP__SIMPL="..\..\..\..\bin\Release\tao_idl.exe"
-# Begin Custom Build - Invoking TAO_IDL Compiler
-InputPath=.\Simple_Object.idl
-InputName=Simple_Object
-
-BuildCmds= \
- ..\..\..\..\bin\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)" == "ImplRepoTest Client - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__SIMPL="..\..\..\..\bin\tao_idl.exe"
-# Begin Custom Build - Invoking TAO_IDL Compiler
-InputPath=.\Simple_Object.idl
-InputName=Simple_Object
-
-BuildCmds= \
- ..\..\..\..\bin\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/orbsvcs/tests/ImplRepo/client_impl.cpp b/TAO/orbsvcs/tests/ImplRepo/client_impl.cpp deleted file mode 100644 index 7d8b4a32c09..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/client_impl.cpp +++ /dev/null @@ -1,197 +0,0 @@ -// $Id$ - -#include "client_impl.h" -#include "ace/Get_Opt.h" -#include "ace/Read_Buffer.h" - -ACE_RCSID(ImplRepo, client_impl, "$Id$") - -// Constructor. -Client_i::Client_i (void) - : server_key_ (ACE_OS::strdup ("key0")), - loop_count_ (10), - shutdown_ (0), - server_ (simple_object::_nil ()) -{ -} - -// 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_); - this->server_key_ = ior_buffer.read (); - - if (this->server_key_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to allocate memory to read ior: %p\n"), - -1); - - ACE_OS::close (f_handle_); - return 0; -} - -// Parses the command line arguments and returns an error status. - -int -Client_i::parse_args (void) -{ - ACE_Get_Opt get_opts (argc_, argv_, "dn:f:x"); - int c; - int result; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag - TAO_debug_level++; - break; - case 'n': // loop count - this->loop_count_ = (u_int) ACE_OS::atoi (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 'x': - this->shutdown_ = 1; - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - " [-n loopcount]" - " [-f server-obj-ref-key-file]" - " [-x]" - "\n", - this->argv_ [0]), - -1); - } - - // Indicates successful parsing of command line. - return 0; -} - -// calculate the cube from a long - -void -Client_i::cube_long (int i) -{ - // Cube a long. - CORBA::Long ret_long; - ACE_OS::sleep (2); - - TAO_TRY - { - ret_long = this->server_->simple_method (i, TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "The cube of %d is %d\n", i, ret_long)); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("from cube_long"); - return; - } - TAO_ENDTRY; - - CORBA::Long arg_long = i * i * i; - - if (arg_long != ret_long) - { - ACE_ERROR ((LM_ERROR, - "** cube_long (%ld) ERROR (--> %ld)\n", - ret_long, - arg_long)); - } -} - - -// Execute client example code. - -int -Client_i::run () -{ - u_int i; - - for (i = 1; i <= this->loop_count_; i++) - this->cube_long (i); - - if (this->shutdown_) - this->server_->shutdown (this->env_); - - return 0; -} - -Client_i::~Client_i (void) -{ - // Free resources - // Close the ior files - CORBA::release (this->server_); - - if (this->server_key_ != 0) - ACE_OS::free (this->server_key_); -} - - -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_, - "internet", - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Parse command line and verify parameters. - if (this->parse_args () == -1) - return -1; - - if (this->server_key_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "%s: no server key specified\n", - this->argv_[0]), - -1); - - CORBA::Object_var server_object = - this->orb_->string_to_object (this->server_key_, TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->server_ = simple_object::_narrow (server_object.in(), TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (server_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid server key <%s>\n", - this->server_key_), - -1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Client_i::init"); - return -1; - } - TAO_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/tests/ImplRepo/client_impl.h b/TAO/orbsvcs/tests/ImplRepo/client_impl.h deleted file mode 100644 index cd207856036..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/client_impl.h +++ /dev/null @@ -1,75 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/Simple -// -// = FILENAME -// client_impl.h -// -// = DESCRIPTION -// This class implements a simple CORBA client. -// -// = AUTHORS -// Darrell Brunsch <brunsch@cs.wustl.edu> -// -// ============================================================================ - -#include "Simple_ObjectC.h" -#include "tao/corba.h" - -class Client_i -{ - // = TITLE - // Simple Client Implementation - // - // = DESCRIPTION - // Class wrapper for a client which gets the server IOR and then makes - // several calls to the server before optionally shutting it down. -public: - // = Constructor and destructor. - Client_i (void); - ~Client_i (void); - - int run (); - // Execute client example code. - - int init (int argc, char **argv); - // Initialize the client communication endpoint with server. - -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. - - void cube_long (int i); - // calculate the cube from a long. - - int argc_; - // # of arguments on the command line. - - char **argv_; - // arguments from command line. - - char *server_key_; - // Key of the obj ref of the server. - - u_int loop_count_; - // Number of times to do the cube operations. - - int shutdown_; - // Flag for server shutdown. - - CORBA::Environment env_; - // Environment variable. - - simple_object_ptr server_; - // Server object ptr. - - CORBA::ORB_var orb_; - // Remember our orb. -}; diff --git a/TAO/orbsvcs/tests/ImplRepo/server.cpp b/TAO/orbsvcs/tests/ImplRepo/server.cpp deleted file mode 100644 index 741e14b9996..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/server.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// $Id$ - -#include "server_impl.h" - -ACE_RCSID(ImplRepo, server, "$Id$") - -int -main (int argc, char *argv[]) -{ - Server_i server; - - ACE_DEBUG ((LM_DEBUG, "\n\tSimple_Server\n\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/orbsvcs/tests/ImplRepo/server.dsp b/TAO/orbsvcs/tests/ImplRepo/server.dsp deleted file mode 100644 index 2683f99e63f..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/server.dsp +++ /dev/null @@ -1,232 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ImplRepoTest Server" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=ImplRepoTest Server - 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 "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="ImplRepoTest Server - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ImplRepoTest Server - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "ImplRepoTest 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)" == "ImplRepoTest 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)" == "ImplRepoTest 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 /incremental:no /debug /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "ImplRepoTest Server - Win32 Release"
-# Name "ImplRepoTest 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=.\server.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\server_impl.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\simple_object_impl.cpp
-# End Source File
-# End Group
-# Begin Group "Generated Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\..\ImplRepo_Service\ImplRepoC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\ImplRepo_Service\ImplRepoS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\ImplRepo_Service\PingC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\ImplRepo_Service\PingS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Simple_ObjectC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Simple_ObjectS.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_impl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\simple_object_impl.h
-# End Source File
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter ".idl"
-# Begin Source File
-
-SOURCE=.\Simple_Object.idl
-
-!IF "$(CFG)" == "ImplRepoTest Server - Win32 Release"
-
-USERDEP__SIMPL="..\..\..\..\bin\Release\tao_idl.exe"
-# Begin Custom Build - Invoking TAO_IDL Compiler
-InputPath=.\Simple_Object.idl
-InputName=Simple_Object
-
-BuildCmds= \
- ..\..\..\..\bin\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)" == "ImplRepoTest Server - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__SIMPL="..\..\..\..\bin\tao_idl.exe"
-# Begin Custom Build - Invoking TAO_IDL Compiler
-InputPath=.\Simple_Object.idl
-InputName=Simple_Object
-
-BuildCmds= \
- ..\..\..\..\bin\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/orbsvcs/tests/ImplRepo/server_impl.cpp b/TAO/orbsvcs/tests/ImplRepo/server_impl.cpp deleted file mode 100644 index 29192f73845..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/server_impl.cpp +++ /dev/null @@ -1,237 +0,0 @@ -// $Id$ - -#include "server_impl.h" -#include "../../ImplRepo_Service/ImplRepoC.h" -#include "ace/Get_Opt.h" -#include "ace/Read_Buffer.h" - -ACE_RCSID(ImplRepo, server_impl, "$Id$") - -Server_i::Server_i (void) - : ior_output_file_ (0), - register_ (0), - use_ir_ (1) -{ -} - -int -Server_i::parse_args (void) -{ - ACE_Get_Opt get_opts (this->argc_, this->argv_, "do:f:ri"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag. - TAO_debug_level++; - break; - case 'r': - this->register_ = 1; - break; - case 'i': - this->use_ir_ = 0; - this->server_impl.use_ir_ = 0; - 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: - // @@ Update me. - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - " [-o] <ior_output_file>" - "\n", - argv_ [0]), - 1); - } - - // Indicates successful parsing of command line. - return 0; -} - -int -Server_i::init (int argc, char** argv, CORBA::Environment& env) -{ - TAO_TRY - { - // 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, "simpserv", TAO_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init_child_poa"), -1); - - TAO_CHECK_ENV; - - this->argc_ = argc; - this->argv_ = argv; - - int retval = this->parse_args (); - - if (retval != 0) - return retval; - - CORBA::String_var server_str = - this->orb_manager_.activate_under_child_poa ("server", - &this->server_impl, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::String_var ping_str = - this->orb_manager_.activate_under_child_poa ("ping", - &this->ping_impl, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->use_ir_) - { - this->read_ir_ior (); - - if (this->register_ == 1) - this->register_with_ir (); - - CORBA::Object_var server_object = - this->orb_manager_.orb ()->string_to_object (server_str, env); - - Implementation_Repository::INET_Addr server_addr; - ACE_INET_Addr my_addr = TAO_ORB_Core_instance ()->addr (); - server_addr.port_ = my_addr.get_port_number (); - - CORBA::Object_var ping_object = - this->orb_manager_.orb ()->string_to_object (ping_str, env); - - // Talk to the Implementation Repository if we are already registered - CORBA::Object_var implrepo_object = - this->orb_manager_.orb ()->string_to_object (this->ir_server_key_, TAO_TRY_ENV); - TAO_CHECK_ENV; - - Implementation_Repository *ImplRepo = - Implementation_Repository::_narrow (implrepo_object.in(), TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (implrepo_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid implrepo key <%s>\n", - this->ir_server_key_), - -1); - - - Implementation_Repository::INET_Addr new_addr = - ImplRepo->server_is_running ("simpserv", - server_addr, - ping_object, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - IIOP_Object *iiop_obj = ACE_dynamic_cast (IIOP_Object *, server_object->_stubobj ()); - // @@ Only same host for now - iiop_obj->profile.port = new_addr.port_; - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "The IOR is: <%s>\n", this->orb_manager_.orb ()->object_to_string (server_object, TAO_TRY_ENV))); - - if (this->ior_output_file_) - { - ACE_OS::fprintf (this->ior_output_file_, "%s", this->orb_manager_.orb ()->object_to_string (server_object, TAO_TRY_ENV)); - ACE_OS::fclose (this->ior_output_file_); - } - } - else - { - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "The IOR is: <%s>\n", server_str.in())); - - if (this->ior_output_file_) - { - ACE_OS::fprintf (this->ior_output_file_, "%s", server_str.in()); - ACE_OS::fclose (this->ior_output_file_); - } - } - - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Server_i::init"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -int -Server_i::run (CORBA::Environment& env) -{ - if (this->register_ != 1) - if (this->orb_manager_.run (env) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Server_i::run"), -1); - return 0; -} - -int -Server_i::register_with_ir (void) -{ - TAO_TRY - { - CORBA::Object_var implrepo_object = - this->orb_manager_.orb ()->string_to_object (this->ir_server_key_, TAO_TRY_ENV); - TAO_CHECK_ENV; - - Implementation_Repository *ImplRepo = - Implementation_Repository::_narrow (implrepo_object.in(), TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (implrepo_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid implrepo key <%s>\n", - this->ir_server_key_), - -1); - - Implementation_Repository::Process_Options proc_opts; - - proc_opts.command_line_ = CORBA::string_dup ("server -o svr.ior -ORBobjrefstyle url"); - proc_opts.environment_ = CORBA::string_dup (""); - proc_opts.working_directory_ = CORBA::string_dup (""); - - ImplRepo->register_server ("simpserv", proc_opts, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Server_i::register_with_ir"); - return -1; - } - TAO_ENDTRY; - return 0; -} - -Server_i::~Server_i (void) -{ -} - -int -Server_i::read_ir_ior (void) -{ - // Open the file for reading. - ACE_HANDLE f_handle_ = ACE_OS::open ("implrepo.ior", 0); - - if (f_handle_ == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to open %s for writing: implrepo.ior\n"), - -1); - ACE_Read_Buffer ior_buffer (f_handle_); - this->ir_server_key_ = ior_buffer.read (); - - if (this->ir_server_key_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to allocate memory to read ior: %p\n"), - -1); - - ACE_OS::close (f_handle_); - return 0; -} diff --git a/TAO/orbsvcs/tests/ImplRepo/server_impl.h b/TAO/orbsvcs/tests/ImplRepo/server_impl.h deleted file mode 100644 index e105379504c..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/server_impl.h +++ /dev/null @@ -1,81 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/Simple -// -// = FILENAME -// server_impl.h -// -// = DESCRIPTION -// Class which implements a CORBA server which sets up the simple object -// implementation and the orb. -// -// = AUTHORS -// Darrell Brunsch <brunsch@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (SERVER_IMPL_H) -#define SERVER_IMPL_H - -#include "simple_object_impl.h" -#include "tao/TAO.h" - -class Server_i -{ - // = TITLE - // CORBA Server Implementation - // - // = DESCRIPTION - // -public: - // = Initialization and termination methods. - Server_i (void); - // Default 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: - Simple_i server_impl; - Ping_i ping_impl; - - int read_ir_ior (void); - - int register_with_ir (void); - - int parse_args (void); - // Parses the commandline arguments. - - TAO_ORB_Manager orb_manager_; - // The ORB manager. - - char *ir_server_key_; - - FILE *ior_output_file_; - // File where the IOR of the server object is stored. - - int register_; - // Flag to indicate whether ImplRepo registration should take - // place - - int use_ir_; - // Flag to indicate whether the IR should be used or not. - - int argc_; - // Number of command line arguments. - - char **argv_; - // The command line arguments. -}; - -#endif /* SERVER_IMPL_H */ diff --git a/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.cpp b/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.cpp deleted file mode 100644 index e98291a19ee..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// $Id$ - -#include "simple_object_impl.h" -#include "tao/corba.h" - -ACE_RCSID(ImplRepo, simple_object_impl, "$Id$") - -// Constructor - -Simple_i::Simple_i (const char *) -: use_ir_ (1) -{ -} - - -// Destructor - -Simple_i::~Simple_i (void) -{ -} - -// Cube a long - -CORBA::Long -Simple_i::simple_method (CORBA::Long l, CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, "Simple Method\n")); - ACE_UNUSED_ARG (env); - TAO_ORB_Core_instance ()->orb ()->shutdown (); - return l * l * l; -} - -// Shutdown. - -void Simple_i::shutdown (CORBA::Environment &env) -{ - ACE_UNUSED_ARG (env); - - ACE_DEBUG ((LM_DEBUG, "%s\n", "Simple_i is shutting down")); - -// if (this->use_ir_ == 1) - // TAO_ORB_Core_instance ()->orb ()->shutdown (); -} - -void Ping_i::ping (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, "Pinged!\n")); - - ACE_UNUSED_ARG (env); - // Does nothing, just returns. -} diff --git a/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.h b/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.h deleted file mode 100644 index 126fa02b25c..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.h +++ /dev/null @@ -1,79 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/Simple -// -// = FILENAME -// simple_object_impl.h -// -// = DESCRIPTION -// This class implements the Simple Object object. -// -// = AUTHOR -// Darrell Brunsch <brunsch@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (SIMPLE_OBJECT_IMPL_H) -#define SIMPLE_OBJECT_IMPL_H - -#include "Simple_ObjectS.h" -#include "../../ImplRepo_Service/PingS.h" - -// Forward declarations. -class Simple_i; - -// Typedefs. -typedef Simple_i *Simple_i_ptr; -typedef Simple_i_ptr Simple_i_ref; - -class Simple_i: public POA_simple_object -{ - // = TITLE - // Simple Object Implementation - // - // = DESCRIPTION - // Implementation of a simple object that has two methods, one that - // returns the cube of a long, another that shuts down the server. -public: - Simple_i (const char *obj_name = 0); - // Constructor - - ~Simple_i (void); - // Destructor - - virtual CORBA::Long simple_method (CORBA::Long l, - CORBA::Environment &env); - // Just cubes the long parameter - - virtual void shutdown (CORBA::Environment &env); - // Shutdown routine. - - int use_ir_; - // Should we shutdown after each call? If using the Impl Repo, then yes. - -}; - -// Forward declarations. -class Ping_i; - -// Typedefs. -typedef Ping_i *Ping_i_ptr; -typedef Ping_i_ptr Ping_i_ref; - -class Ping_i: public POA_Ping_Object - // = TITLE - // Ping Object Implementation - // - // = DESCRIPTION - // Implementation Repository uses this to check to see if the server - // is still running. -{ -public: - virtual void ping (CORBA::Environment &env); -}; - -#endif /* SIMPLE_OBJECT_IMPL_H */ |