diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-04-21 16:29:20 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-04-21 16:29:20 +0000 |
commit | f8342c1cae5d6cdd44019dc108b43049bdf42ef0 (patch) | |
tree | 68f88172a83e302343439af630db4597d0214764 /TAO/CIAO/DAnCE/RepositoryManager | |
parent | f56eb6a0c5f7632fdcec55169ebe6a34b85917b1 (diff) | |
download | ATCD-f8342c1cae5d6cdd44019dc108b43049bdf42ef0.tar.gz |
Fri Apr 21 16:24:46 UTC 2006 William R. Otte <wotte@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/CIAO/DAnCE/RepositoryManager')
10 files changed, 37 insertions, 31 deletions
diff --git a/TAO/CIAO/DAnCE/RepositoryManager/PC_Updater.cpp b/TAO/CIAO/DAnCE/RepositoryManager/PC_Updater.cpp index 03d3e99cc87..b80dfa606f1 100644 --- a/TAO/CIAO/DAnCE/RepositoryManager/PC_Updater.cpp +++ b/TAO/CIAO/DAnCE/RepositoryManager/PC_Updater.cpp @@ -44,7 +44,7 @@ using namespace PC_Updater_T; PC_Updater::PC_Updater (const char* server_path, const char* package) : server_path_ (server_path), - file_list_ (&allocator_), + file_list_ (), package_ (package), success_ (true) { @@ -53,7 +53,7 @@ PC_Updater::PC_Updater (const char* server_path, const char* package) PC_Updater::PC_Updater (ACE_CString& server_path, ACE_CString& package) : server_path_ (server_path), - file_list_ (&allocator_), + file_list_ (), package_ (package), success_ (true) { @@ -137,7 +137,7 @@ void PC_Updater::clear_list () void PC_Updater::update (const ::Deployment::SubcomponentInstantiationDescription &sid) { - update_sequence (sid.package, this); + update_sequence (sid.basePackage, this); } // SubcomponentPortEndpoint @@ -185,15 +185,13 @@ void PC_Updater::clear_list () //weird. Need to call next to get current ?!?! const char* name; - const char* ext; name = ACE_OS::strstr (str, iad.location[0]); if (name) { - ext = ACE_OS::strstr (name, "."); - ACE_CString loc (this->server_path_); + loc += name; loc += iad.location[0]; loc += ext; diff --git a/TAO/CIAO/DAnCE/RepositoryManager/PC_Updater.h b/TAO/CIAO/DAnCE/RepositoryManager/PC_Updater.h index a60de14a90a..4396ee22621 100644 --- a/TAO/CIAO/DAnCE/RepositoryManager/PC_Updater.h +++ b/TAO/CIAO/DAnCE/RepositoryManager/PC_Updater.h @@ -1,4 +1,3 @@ - /* -*- C++ -*- */ //======================================================================== @@ -101,7 +100,7 @@ private: ACE_CString server_path_; /// create a doubly link list - ACE_New_Allocator allocator_; + //ACE_New_Allocator allocator_; ACE_Double_Linked_List<ZIP_File_Info> file_list_; ACE_CString package_; diff --git a/TAO/CIAO/DAnCE/RepositoryManager/PC_Updater_T.cpp b/TAO/CIAO/DAnCE/RepositoryManager/PC_Updater_T.cpp index f1b53537735..01fd77a797d 100644 --- a/TAO/CIAO/DAnCE/RepositoryManager/PC_Updater_T.cpp +++ b/TAO/CIAO/DAnCE/RepositoryManager/PC_Updater_T.cpp @@ -1,4 +1,5 @@ // $Id$ + #ifndef PC_UPDATER_T_C #define PC_UPDATER_T_C #include "PC_Updater.h" diff --git a/TAO/CIAO/DAnCE/RepositoryManager/README.txt b/TAO/CIAO/DAnCE/RepositoryManager/README.txt index e4cd2fa6397..ee8eb6bcdce 100644 --- a/TAO/CIAO/DAnCE/RepositoryManager/README.txt +++ b/TAO/CIAO/DAnCE/RepositoryManager/README.txt @@ -1,28 +1,28 @@ This is the README file for the Repository Manager (RM). -In order to be able to compile the RM you need to have ZZIP lib because the Repository +In order to be able to compile the RM you need to have ZZIP lib because the Repository Manager (RM) uses it to read the contents of CCM packages. ZZIP itself is a C++ wrapper around ZLIB, thus you will also need ZLIB. In order to compile the RM successfully you will need to do the following: - + 1. Download ZLIB and ZZIP-LIB 2. Compile the multi-threaded versions of these libraries -3. [on Windows] create a separate directory for each library; create an include and a lib +3. [on Windows] create a separate directory for each library; create an include and a lib subdirectory within them. Then copy the libraries files in the library subdirectory. -Copy zlib.h in the zlib_path/include and copy zziplib.h, zzip-conf.h and zzip-msvc.h +Copy zlib.h in the zlib_path/include and copy zziplib.h, zzip-conf.h and zzip-msvc.h (for Windows platforms; Linux might have its own file!!!). This step might be easier if you find a binary package of the libraries and just install it. -4. Set $ZLIB_ROOT and $ZZIP_ROOT to point to the directories where you placed the +4. Set $ZLIB_ROOT and $ZZIP_ROOT to point to the directories where you placed the libraries and the include files. 5. Turn on zzip and zlib in default.features for MPC. 6. MPC will handle the rest. -Things to watch out for: -On Windows make sure that you are linking the right ZIP libraries -together with the rest of the libraries, i.e. if you are building the debug version of ACE, +Things to watch out for: +On Windows make sure that you are linking the right ZIP libraries +together with the rest of the libraries, i.e. if you are building the debug version of ACE, TAO and CIAO, then use the debug version of the ZIP libraries. Otherwise the RM will compile -but it will not work properly. +but it will not work properly. to compile the idl with the tao_idl compiler: diff --git a/TAO/CIAO/DAnCE/RepositoryManager/RM_Helper.h b/TAO/CIAO/DAnCE/RepositoryManager/RM_Helper.h index fb2f8a61db0..2314295ee78 100644 --- a/TAO/CIAO/DAnCE/RepositoryManager/RM_Helper.h +++ b/TAO/CIAO/DAnCE/RepositoryManager/RM_Helper.h @@ -1,4 +1,3 @@ - /* -*- C++ -*- */ //============================================================================= diff --git a/TAO/CIAO/DAnCE/RepositoryManager/RMadmin.cpp b/TAO/CIAO/DAnCE/RepositoryManager/RMadmin.cpp index 678dda90812..60d90c29bc9 100644 --- a/TAO/CIAO/DAnCE/RepositoryManager/RMadmin.cpp +++ b/TAO/CIAO/DAnCE/RepositoryManager/RMadmin.cpp @@ -1,4 +1,3 @@ - /* -*- C++ -*- */ /*** diff --git a/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager.cpp b/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager.cpp index b8a94492920..813ee79f1cd 100644 --- a/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager.cpp +++ b/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager.cpp @@ -1,4 +1,3 @@ - /* -*- C++ -*- */ //====================================================================== diff --git a/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager.mpc b/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager.mpc index b1300b1f92e..159066e31ec 100644 --- a/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager.mpc +++ b/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager.mpc @@ -6,8 +6,11 @@ project (RepositoryManager) : ciao_server_dnc, ciao_config_handlers, zzip, zlib { + includes += $(CIAO_ROOT)/tools/Config_Handlers //to circumvent an improper include resolution + //in the Package_Handlers/PC_Intf.h exename = RepositoryManagerDeamon requires += zzip zlib + libs += Package_Config_Handlers IDL_Files { RepositoryManagerDaemon.idl diff --git a/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.cpp b/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.cpp index a529c07f84a..d7e953a777a 100644 --- a/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.cpp +++ b/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.cpp @@ -1,5 +1,3 @@ -// $Id$ - //==================================================================== /** * @file RepositoryManager_Impl.cpp @@ -30,11 +28,12 @@ #include "ace/Malloc_Allocator.h" //for ACE_New_Allocator //for the PackageConfiguration parsing -#include "Config_Handlers/STD_PC_Intf.h" +//#include "Config_Handlers/Package_Handlers/PC_Intf.h" #include "ciao/Deployment_DataC.h" #include "ciao/Packaging_DataC.h" #include "Config_Handlers/Utils/XML_Helper.h" -#include "xercesc/dom/DOM.hpp" +#include "Config_Handlers/Package_Handlers/PCD_Handler.h" +//#include "xercesc/dom/DOM.hpp" #include "RM_Helper.h" //to be able to externalize/internalize a PackageConfiguration #include "ace/Message_Block.h" //for ACE_Message_Block @@ -712,9 +711,8 @@ CIAO_RepositoryManagerDaemon_i::retrieve_PC_from_package (char* package) //parse the PCD to make sure that there are no package errors ACE_TRY { - CIAO::Config_Handlers::STD_PC_Intf intf (pcd_name.c_str ()); - - pc = intf.get_PC (); + //CIAO::Config_Handlers::STD_PC_Intf intf (pcd_name.c_str ()); + //pc = intf.get_PC (); } ACE_CATCHALL { @@ -791,9 +789,21 @@ CIAO_RepositoryManagerDaemon_i::retrieve_PC_from_descriptors (const char* pc_nam //parse the PCD to make sure that there are no package errors ACE_TRY { - CIAO::Config_Handlers::STD_PC_Intf intf (pc_name); + //CIAO::Config_Handlers::STD_PC_Intf intf (pc_name); + //pc = intf.get_PC (); + if (xercesc::DOMDocument *doc = CIAO::Config_Handlers::XML_HELPER->create_dom (pc_name)) + { + { + //Read in the XSC type structure from the DOMDocument - pc = intf.get_PC (); + //Convert the XSC to an IDL datatype + CIAO::Config_Handlers::Packaging::PCD_Handler::package_config (pc_name, pc); + std::cout << "Instance document import succeeded. Dumping contents to file\n"; + } + + //Cleanliness is next to Godliness + delete doc; + } } ACE_CATCHALL { diff --git a/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.h b/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.h index 6538f254a9d..4f5f2b4efd0 100644 --- a/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.h +++ b/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.h @@ -1,4 +1,3 @@ - /* -*- C++ -*- */ //====================================================================== @@ -31,7 +30,6 @@ //uncomment this line to turn on the code that relates to interface types //#define ASSEMBLY_INTERFACE_SUPPORT 1 - #include "RepositoryManagerDaemonS.h" #include "ace/Hash_Map_Manager.h" //for the ACE_Hash_Map_Manager |