Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Naming_Context.cpp

Go to the documentation of this file.
00001 #include "ace_pch.h"
00002 // $Id: Naming_Context.cpp,v 1.1.1.4.2.1 2003/03/13 19:44:21 chad Exp $
00003 
00004 #include "ace/Get_Opt.h"
00005 #include "ace/Naming_Context.h"
00006 #include "ace/Remote_Name_Space.h"
00007 #include "ace/Local_Name_Space_T.h"
00008 #include "ace/Registry_Name_Space.h"
00009 #include "ace/Memory_Pool.h"
00010 #include "ace/RW_Process_Mutex.h"
00011 
00012 ACE_RCSID(ace, Naming_Context, "$Id: Naming_Context.cpp,v 1.1.1.4.2.1 2003/03/13 19:44:21 chad Exp $")
00013 
00014 // Make life easier later on...
00015 
00016 typedef ACE_Local_Name_Space <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> LOCAL_NAME_SPACE;
00017 typedef ACE_Local_Name_Space <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> LITE_LOCAL_NAME_SPACE;
00018 
00019 // The following Factory is used by the ACE_Service_Config and
00020 // svc.conf file to dynamically initialize the state of the Name
00021 // Server client.
00022 
00023 ACE_FACTORY_DEFINE (ACE, ACE_Naming_Context)
00024 ACE_STATIC_SVC_DEFINE (ACE_Naming_Context,
00025                        ACE_LIB_TEXT ("ACE_Naming_Context"),
00026                        ACE_SVC_OBJ_T,
00027                        &ACE_SVC_NAME (ACE_Naming_Context),
00028                        ACE_Service_Type::DELETE_THIS |
00029                        ACE_Service_Type::DELETE_OBJ,
00030                        0)
00031 ACE_STATIC_SVC_REQUIRE (ACE_Naming_Context)
00032 
00033 // The ACE_Naming_Context static service object is now defined
00034 // by the ACE_Object_Manager, in Object_Manager.cpp.
00035 
00036 int
00037 ACE_Naming_Context::info (ACE_TCHAR **strp,
00038                           size_t length) const
00039 {
00040   ACE_TRACE ("ACE_Naming_Context::info");
00041   ACE_UNUSED_ARG (length);
00042   ACE_TCHAR buf[BUFSIZ];
00043 
00044   ACE_OS::sprintf (buf,
00045                    ACE_LIB_TEXT ("%s\t#%s\n"),
00046                    ACE_LIB_TEXT ("ACE_Naming_Context"),
00047                    ACE_LIB_TEXT ("Proxy for making calls to a Name Server"));
00048 
00049   if (*strp == 0 && (*strp = ACE_OS_String::strdup (buf)) == 0)
00050     return -1;
00051   else
00052     ACE_OS_String::strsncpy (*strp, buf, length);
00053   return ACE_static_cast (int, ACE_OS_String::strlen (buf));
00054 }
00055 
00056 int
00057 ACE_Naming_Context::local (void)
00058 {
00059   ACE_TRACE ("ACE_Naming_Context::local");
00060   return ACE_OS::strcmp (this->netnameserver_host_,
00061                          ACE_LIB_TEXT ("localhost")) == 0
00062     || ACE_OS::strcmp (this->netnameserver_host_,
00063                        this->hostname_) == 0;
00064 }
00065 
00066 int
00067 ACE_Naming_Context::open (Context_Scope_Type scope_in, int lite)
00068 {
00069   ACE_TRACE ("ACE_Naming_Context::open");
00070   ACE_OS::hostname (this->hostname_,
00071                     (sizeof this->hostname_ / sizeof (ACE_TCHAR)));
00072 
00073   this->netnameserver_host_ =
00074     this->name_options_->nameserver_host ();
00075   this->netnameserver_port_ =
00076     this->name_options_->nameserver_port ();
00077 
00078   // Perform factory operation to select appropriate type of
00079   // Name_Space subclass.
00080 
00081 #if (defined (ACE_WIN32) && defined (UNICODE))
00082 // This only works on Win32 platforms when UNICODE is turned on
00083 
00084   if (this->name_options_->use_registry ())
00085     // Use ACE_Registry
00086     ACE_NEW_RETURN (this->name_space_,
00087                     ACE_Registry_Name_Space (this->name_options_),
00088                     -1);
00089 #endif /* ACE_WIN32 && UNICODE */
00090   if (!this->name_options_->use_registry ())
00091     if (scope_in == ACE_Naming_Context::NET_LOCAL && this->local () == 0)
00092       {
00093         // Use NET_LOCAL name space, set up connection with remote server.
00094         ACE_NEW_RETURN (this->name_space_,
00095                         ACE_Remote_Name_Space (this->netnameserver_host_,
00096                                                (u_short) this->netnameserver_port_),
00097                         -1);
00098       }
00099     else   // Use NODE_LOCAL or PROC_LOCAL name space.
00100       {
00101         if (lite)
00102           ACE_NEW_RETURN (this->name_space_,
00103                           LITE_LOCAL_NAME_SPACE (scope_in,
00104                                                  this->name_options_),
00105                           -1);
00106         else
00107           ACE_NEW_RETURN (this->name_space_,
00108                           LOCAL_NAME_SPACE (scope_in,
00109                                             this->name_options_),
00110                           -1);
00111       }
00112 
00113   if (ACE_LOG_MSG->op_status () != 0 || this->name_space_ == 0)
00114     ACE_ERROR_RETURN ((LM_ERROR,
00115                        ACE_LIB_TEXT ("NAME_SPACE::NAME_SPACE\n")),
00116                       -1);
00117   return 0;
00118 }
00119 
00120 int
00121 ACE_Naming_Context::close_down (void)
00122 {
00123   ACE_TRACE ("ACE_Naming_Context::close_down");
00124 
00125   delete this->name_options_;
00126   this->name_options_ = 0;
00127 
00128   return this->close ();
00129 }
00130 
00131 int
00132 ACE_Naming_Context::close (void)
00133 {
00134   ACE_TRACE ("ACE_Naming_Context::close");
00135 
00136   delete this->name_space_;
00137   this->name_space_ = 0;
00138 
00139   return 0;
00140 }
00141 
00142 ACE_Naming_Context::ACE_Naming_Context (void)
00143   : name_options_ (0),
00144     name_space_ (0)
00145 {
00146   ACE_TRACE ("ACE_Naming_Context::ACE_Naming_Context");
00147 
00148   ACE_NEW (this->name_options_,
00149            ACE_Name_Options);
00150 }
00151 
00152 ACE_Naming_Context::ACE_Naming_Context (Context_Scope_Type scope_in,
00153                                         int lite)
00154   : name_options_ (0),
00155     name_space_ (0)
00156 {
00157   ACE_TRACE ("ACE_Naming_Context::ACE_Naming_Context");
00158 
00159   ACE_NEW (this->name_options_,
00160            ACE_Name_Options);
00161 
00162   // Initialize.
00163   if (this->open (scope_in, lite) == -1)
00164     ACE_ERROR ((LM_ERROR,
00165                 ACE_LIB_TEXT ("%p\n"),
00166                 ACE_LIB_TEXT ("ACE_Naming_Context::ACE_Naming_Context")));
00167 }
00168 
00169 ACE_Name_Options *
00170 ACE_Naming_Context::name_options (void)
00171 {
00172   return this->name_options_;
00173 }
00174 
00175 int
00176 ACE_Naming_Context::bind (const ACE_NS_WString &name_in,
00177                           const ACE_NS_WString &value_in,
00178                           const char *type_in)
00179 {
00180   ACE_TRACE ("ACE_Naming_Context::bind");
00181   return this->name_space_->bind (name_in, value_in, type_in);
00182 }
00183 
00184 int
00185 ACE_Naming_Context::bind (const char *name_in,
00186                           const char *value_in,
00187                           const char *type_in)
00188 {
00189   ACE_TRACE ("ACE_Naming_Context::bind");
00190   return this->bind (ACE_NS_WString (name_in),
00191                      ACE_NS_WString (value_in),
00192                      type_in);
00193 }
00194 
00195 int
00196 ACE_Naming_Context::rebind (const ACE_NS_WString &name_in,
00197                             const ACE_NS_WString &value_in,
00198                             const char *type_in)
00199 {
00200   ACE_TRACE ("ACE_Naming_Context::rebind");
00201   return this->name_space_->rebind (name_in,
00202                                     value_in,
00203                                     type_in);
00204 }
00205 
00206 int
00207 ACE_Naming_Context::rebind (const char *name_in,
00208                             const char *value_in,
00209                             const char *type_in)
00210 {
00211   ACE_TRACE ("ACE_Naming_Context::rebind");
00212   return rebind (ACE_NS_WString (name_in),
00213                  ACE_NS_WString (value_in),
00214                  type_in);
00215 }
00216 
00217 int
00218 ACE_Naming_Context::resolve (const ACE_NS_WString &name_in,
00219                              ACE_NS_WString &value_out,
00220                              char *&type_out)
00221 {
00222   ACE_TRACE ("ACE_Naming_Context::resolve");
00223   return this->name_space_->resolve (name_in,
00224                                      value_out,
00225                                      type_out);
00226 }
00227 
00228 int
00229 ACE_Naming_Context::resolve (const char *name_in,
00230                              ACE_NS_WString &value_out,
00231                              char *&type_out)
00232 {
00233   ACE_TRACE ("ACE_Naming_Context::resolve");
00234   return this->resolve (ACE_NS_WString (name_in),
00235                         value_out,
00236                         type_out);
00237 }
00238 
00239 int
00240 ACE_Naming_Context::resolve (const char *name_in,
00241                              char *&value_out,
00242                              char *&type_out)
00243 {
00244   ACE_TRACE ("ACE_Naming_Context::resolve");
00245   ACE_NS_WString val_str;
00246 
00247   if (this->resolve (ACE_NS_WString (name_in),
00248                      val_str,
00249                      type_out) == -1)
00250     return -1;
00251 
00252   // Note that <char_rep> *allocates* the memory!  Thus, caller is
00253   // responsible for deleting it!
00254   value_out = val_str.char_rep ();
00255 
00256   return value_out == 0 ? -1 : 0;
00257 }
00258 
00259 int
00260 ACE_Naming_Context::unbind (const ACE_NS_WString &name_in)
00261 {
00262   ACE_TRACE ("ACE_Naming_Context::unbind");
00263   return this->name_space_->unbind (name_in);
00264 }
00265 
00266 int
00267 ACE_Naming_Context::unbind (const char *name_in)
00268 {
00269   ACE_TRACE ("ACE_Naming_Context::unbind");
00270   return this->unbind (ACE_NS_WString (name_in));
00271 }
00272 
00273 int
00274 ACE_Naming_Context::list_names (ACE_PWSTRING_SET &set_out,
00275                                 const ACE_NS_WString &pattern_in)
00276 {
00277   ACE_TRACE ("ACE_Naming_Context::list_names");
00278   return this->name_space_->list_names (set_out,
00279                                         pattern_in);
00280 }
00281 
00282 int
00283 ACE_Naming_Context::list_names (ACE_PWSTRING_SET &set_out,
00284                                 const char *pattern_in)
00285 {
00286   ACE_TRACE ("ACE_Naming_Context::list_names");
00287   return this->list_names (set_out,
00288                            ACE_NS_WString (pattern_in));
00289 }
00290 
00291 int
00292 ACE_Naming_Context::list_values (ACE_PWSTRING_SET &set_out,
00293                                  const ACE_NS_WString &pattern_in)
00294 {
00295   ACE_TRACE ("ACE_Naming_Context::list_values");
00296   return this->name_space_->list_values (set_out,
00297                                          pattern_in);
00298 }
00299 
00300 int
00301 ACE_Naming_Context::list_values (ACE_PWSTRING_SET &set_out,
00302                                  const char *pattern_in)
00303 {
00304   ACE_TRACE ("ACE_Naming_Context::list_values");
00305   return this->list_values (set_out,
00306                             ACE_NS_WString (pattern_in));
00307 }
00308 
00309 int
00310 ACE_Naming_Context::list_types (ACE_PWSTRING_SET &set_out,
00311                                  const ACE_NS_WString &pattern_in)
00312 {
00313   ACE_TRACE ("ACE_Naming_Context::list_types");
00314   return this->name_space_->list_types (set_out,
00315                                         pattern_in);
00316 }
00317 
00318 int
00319 ACE_Naming_Context::list_types (ACE_PWSTRING_SET &set_out,
00320                                  const char *pattern_in)
00321 {
00322   ACE_TRACE ("ACE_Naming_Context::list_types");
00323   return this->list_types (set_out,
00324                            ACE_NS_WString (pattern_in));
00325 }
00326 
00327 int
00328 ACE_Naming_Context::list_name_entries (ACE_BINDING_SET &set_out,
00329                                        const ACE_NS_WString &pattern_in)
00330 {
00331   ACE_TRACE ("ACE_Naming_Context::list_name_entries");
00332   return this->name_space_->list_name_entries (set_out,
00333                                                pattern_in);
00334 }
00335 
00336 int
00337 ACE_Naming_Context::list_name_entries (ACE_BINDING_SET &set_out,
00338                                        const char *pattern_in)
00339 {
00340   ACE_TRACE ("ACE_Naming_Context::list_name_entries");
00341   return this->list_name_entries (set_out,
00342                                   ACE_NS_WString (pattern_in));
00343 }
00344 
00345 int
00346 ACE_Naming_Context::list_value_entries (ACE_BINDING_SET &set_out,
00347                                         const ACE_NS_WString &pattern_in)
00348 {
00349   ACE_TRACE ("ACE_Naming_Context::list_value_entries");
00350   return this->name_space_->list_value_entries (set_out,
00351                                                 pattern_in);
00352 }
00353 
00354 int
00355 ACE_Naming_Context::list_value_entries (ACE_BINDING_SET &set_out,
00356                                         const char *pattern_in)
00357 {
00358   ACE_TRACE ("ACE_Naming_Context::list_value_entries");
00359   return this->list_value_entries (set_out,
00360                                    ACE_NS_WString (pattern_in));
00361 }
00362 
00363 int
00364 ACE_Naming_Context::list_type_entries (ACE_BINDING_SET &set_out,
00365                                        const ACE_NS_WString &pattern_in)
00366 {
00367   ACE_TRACE ("ACE_Naming_Context::list_type_entries");
00368   return this->name_space_->list_type_entries (set_out,
00369                                                pattern_in);
00370 }
00371 
00372 int
00373 ACE_Naming_Context::list_type_entries (ACE_BINDING_SET &set_out,
00374                                        const char *pattern_in)
00375 {
00376   ACE_TRACE ("ACE_Naming_Context::list_type_entries");
00377   return this->list_type_entries (set_out,
00378                                   ACE_NS_WString (pattern_in));
00379 }
00380 
00381 ACE_Naming_Context::~ACE_Naming_Context (void)
00382 {
00383   ACE_TRACE ("ACE_Naming_Context::~ACE_Naming_Context");
00384 
00385   this->close_down ();
00386 }
00387 
00388 void
00389 ACE_Naming_Context::dump ()
00390 {
00391   ACE_TRACE ("ACE_Naming_Context::dump");
00392   this->name_space_->dump();
00393 }
00394 
00395 int
00396 ACE_Naming_Context::init (int argc, ACE_TCHAR *argv[])
00397 {
00398   if (ACE::debug ())
00399     ACE_DEBUG ((LM_DEBUG,
00400                 ACE_LIB_TEXT ("ACE_Naming_Context::init\n")));
00401   this->name_options_->parse_args (argc, argv);
00402   return this->open (this->name_options_->context ());
00403 }
00404 
00405 int
00406 ACE_Naming_Context::fini (void)
00407 {
00408   if (ACE::debug ())
00409     ACE_DEBUG ((LM_DEBUG,
00410                 ACE_LIB_TEXT ("ACE_Naming_Context::fini\n")));
00411   this->close_down ();
00412   return 0;
00413 }
00414 
00415 ACE_Name_Options::ACE_Name_Options (void)
00416   : debugging_ (0),
00417     verbosity_ (0),
00418     use_registry_ (0),
00419     nameserver_port_ (ACE_DEFAULT_SERVER_PORT),
00420     nameserver_host_ (ACE_OS::strdup (ACE_DEFAULT_SERVER_HOST)),
00421     process_name_ (0),
00422     database_ (ACE_OS::strdup (ACE_DEFAULT_LOCALNAME)),
00423     base_address_ (ACE_DEFAULT_BASE_ADDR)
00424 {
00425   ACE_TRACE ("ACE_Name_Options::ACE_Name_Options");
00426 
00427 #if defined (ACE_DEFAULT_NAMESPACE_DIR)
00428   this->namespace_dir_ = ACE_OS::strdup (ACE_DEFAULT_NAMESPACE_DIR);
00429 #else /* ACE_DEFAULT_NAMESPACE_DIR */
00430   size_t pathsize = (MAXPATHLEN + 1) * sizeof (ACE_TCHAR);
00431   this->namespace_dir_ = ACE_static_cast (ACE_TCHAR *, ACE_OS::malloc (pathsize));
00432 
00433   if (ACE_Lib_Find::get_temp_dir (this->namespace_dir_, MAXPATHLEN) == -1)
00434     {
00435       ACE_ERROR ((LM_ERROR,
00436                   ACE_LIB_TEXT ("Temporary path too long, ")
00437                   ACE_LIB_TEXT ("defaulting to current directory\n")));
00438       ACE_OS::strcat (this->namespace_dir_, ACE_LIB_TEXT ("."));
00439       ACE_OS::strcat (this->namespace_dir_, ACE_DIRECTORY_SEPARATOR_STR);
00440     }
00441 #endif /* ACE_DEFAULT_NAMESPACE_DIR */
00442 }
00443 
00444 ACE_Name_Options::~ACE_Name_Options (void)
00445 {
00446   ACE_TRACE ("ACE_Name_Options::~ACE_Name_Options");
00447 
00448   ACE_OS::free ((void *) this->nameserver_host_);
00449   ACE_OS::free ((void *) this->namespace_dir_ );
00450   ACE_OS::free ((void *) this->process_name_ );
00451   ACE_OS::free ((void *) this->database_ );
00452 }
00453 
00454 void
00455 ACE_Name_Options::nameserver_port (int port)
00456 {
00457   ACE_TRACE ("ACE_Name_Options::nameserver_port");
00458   this->nameserver_port_ = port;
00459 }
00460 
00461 int
00462 ACE_Name_Options::nameserver_port (void)
00463 {
00464   ACE_TRACE ("ACE_Name_Options::nameserver_port");
00465   return this->nameserver_port_;
00466 }
00467 
00468 void
00469 ACE_Name_Options::namespace_dir (const ACE_TCHAR *dir)
00470 {
00471   ACE_TRACE ("ACE_Name_Options::namespace_dir");
00472   ACE_OS::free ((void *) this->namespace_dir_ );
00473   this->namespace_dir_ = ACE_OS::strdup (dir);
00474 }
00475 
00476 void
00477 ACE_Name_Options::process_name (const ACE_TCHAR *pname)
00478 {
00479   ACE_TRACE ("ACE_Name_Options::process_name");
00480   const ACE_TCHAR *t = ACE::basename (pname, ACE_DIRECTORY_SEPARATOR_CHAR);
00481   ACE_OS::free ((void *) this->process_name_ );
00482   this->process_name_ = ACE_OS::strdup (t);
00483 }
00484 
00485 void
00486 ACE_Name_Options::nameserver_host (const ACE_TCHAR *host)
00487 {
00488   ACE_TRACE ("ACE_Name_Options::nameserver_host");
00489   ACE_OS::free ((void *) this->nameserver_host_);
00490   this->nameserver_host_ = ACE_OS::strdup (host);
00491 }
00492 
00493 const ACE_TCHAR *
00494 ACE_Name_Options::nameserver_host (void)
00495 {
00496   ACE_TRACE ("ACE_Name_Options::nameserver_host");
00497   return this->nameserver_host_;
00498 }
00499 
00500 const ACE_TCHAR *
00501 ACE_Name_Options::database (void)
00502 {
00503   ACE_TRACE ("ACE_Name_Options::database");
00504   return this->database_;
00505 }
00506 
00507 void
00508 ACE_Name_Options::database (const ACE_TCHAR *db)
00509 {
00510   ACE_TRACE ("ACE_Name_Options::database");
00511   ACE_OS::free ((void *) this->database_);
00512   this->database_ = ACE_OS::strdup (db);
00513 }
00514 
00515 char *
00516 ACE_Name_Options::base_address (void)
00517 {
00518   ACE_TRACE ("ACE_Name_Options::base_address");
00519   return this->base_address_;
00520 }
00521 
00522 void
00523 ACE_Name_Options::base_address (char *base_address)
00524 {
00525   ACE_TRACE ("ACE_Name_Options::base_address");
00526   // HP-UX 11, aC++ has a bug with 64-bit pointer initialization from
00527   // a literal.  To work around it, assign the literal to a long, then
00528   // to the pointer.  This is allegedly fixed in aC++ A.03.10.
00529 #if defined (__hpux) && defined(__LP64__)
00530   long temp = ACE_DEFAULT_BASE_ADDRL;
00531   base_address = (char *) temp;
00532 #endif /* defined (__hpux) && defined(__LP64__) */
00533   this->base_address_ = base_address;
00534 }
00535 
00536 ACE_Naming_Context::Context_Scope_Type
00537 ACE_Name_Options::context (void)
00538 {
00539   ACE_TRACE ("ACE_Name_Options::context");
00540   return this->context_;
00541 }
00542 
00543 void
00544 ACE_Name_Options::context (ACE_Naming_Context::Context_Scope_Type context)
00545 {
00546   ACE_TRACE ("ACE_Name_Options::context");
00547   this->context_ = context;
00548 }
00549 
00550 const ACE_TCHAR *
00551 ACE_Name_Options::process_name (void)
00552 {
00553   ACE_TRACE ("ACE_Name_Options::process_name");
00554   return this->process_name_;
00555 }
00556 
00557 const ACE_TCHAR *
00558 ACE_Name_Options::namespace_dir (void)
00559 {
00560   ACE_TRACE ("ACE_Name_Options::namespace_dir");
00561   return this->namespace_dir_;
00562 }
00563 
00564 int
00565 ACE_Name_Options::debug (void)
00566 {
00567   ACE_TRACE ("ACE_Name_Options::debug");
00568   return this->debugging_;
00569 }
00570 
00571 int
00572 ACE_Name_Options::use_registry (void)
00573 {
00574   ACE_TRACE ("ACE_Name_Options::use_registry");
00575   return this->use_registry_;
00576 }
00577 
00578 void
00579 ACE_Name_Options::use_registry (int x)
00580 {
00581   ACE_TRACE ("ACE_Name_Options::use_registry");
00582   this->use_registry_ = x;
00583 }
00584 
00585 int
00586 ACE_Name_Options::verbose (void)
00587 {
00588   ACE_TRACE ("ACE_Name_Options::verbose");
00589   return this->verbosity_;
00590 }
00591 
00592 void
00593 ACE_Name_Options::parse_args (int argc, ACE_TCHAR *argv[])
00594 {
00595   ACE_TRACE ("ACE_Name_Options::parse_args");
00596   ACE_LOG_MSG->open (argv[0]);
00597   this->process_name (argv[0]);
00598 
00599   // Default is to use the PROC_LOCAL context...
00600   this->context (ACE_Naming_Context::PROC_LOCAL);
00601 
00602   // Make the database name the same as the process name by default
00603   // (note that this makes a copy of the process_name_ so that we can
00604   // clean it up in the destructor).
00605   this->database (this->process_name ());
00606 
00607   ACE_Get_Opt get_opt (argc, argv, ACE_LIB_TEXT ("b:c:dh:l:P:p:s:T:vr"));
00608 
00609   for (int c; (c = get_opt ()) != -1; )
00610     switch (c)
00611       {
00612       case 'c':
00613         {
00614           if (ACE_OS::strcmp (get_opt.opt_arg (), ACE_LIB_TEXT ("PROC_LOCAL")) == 0)
00615             this->context (ACE_Naming_Context::PROC_LOCAL);
00616           else if (ACE_OS::strcmp (get_opt.opt_arg (), ACE_LIB_TEXT ("NODE_LOCAL")) == 0)
00617             this->context (ACE_Naming_Context::NODE_LOCAL);
00618           else if (ACE_OS::strcmp (get_opt.opt_arg (), ACE_LIB_TEXT ("NET_LOCAL")) == 0)
00619             this->context (ACE_Naming_Context::NET_LOCAL);
00620         }
00621         break;
00622       case 'd':
00623         this->debugging_ = 1;
00624         break;
00625       case 'r':
00626         this->use_registry_ = 1;
00627         break;
00628       case 'h':
00629         this->nameserver_host (get_opt.opt_arg ());
00630         break;
00631       case 'l':
00632         this->namespace_dir (get_opt.opt_arg ());
00633         break;
00634       case 'P':
00635         this->process_name (get_opt.opt_arg ());
00636         break;
00637       case 'p':
00638         this->nameserver_port (ACE_OS::atoi (get_opt.opt_arg ()));
00639         break;
00640       case 's':
00641         this->database (get_opt.opt_arg ());
00642         break;
00643       case 'b':
00644         this->base_address
00645           (ACE_static_cast (char *, ACE_OS::atop (get_opt.opt_arg ())));
00646         break;
00647       case 'T':
00648         if (ACE_OS::strcasecmp (get_opt.opt_arg (), ACE_LIB_TEXT ("ON")) == 0)
00649           ACE_Trace::start_tracing ();
00650         else if (ACE_OS::strcasecmp (get_opt.opt_arg (), ACE_LIB_TEXT ("OFF")) == 0)
00651           ACE_Trace::stop_tracing ();
00652         break;
00653       case 'v':
00654         this->verbosity_ = 1;
00655         break;
00656       default:
00657         ACE_OS::fprintf (stderr, "%s\n"
00658                          "\t[-d] (enable debugging)\n"
00659                          "\t[-h nameserver host]\n"
00660                          "\t[-l namespace directory]\n"
00661                          "\t[-P processname]\n"
00662                          "\t[-p nameserver port]\n"
00663                          "\t[-s database name]\n"
00664                          "\t[-b base address]\n"
00665                          "\t[-v] (verbose) \n"
00666                          "\t[-r] (use Win32 Registry) \n",
00667                          argv[0]);
00668         /* NOTREACHED */
00669         break;
00670       }
00671 }
00672 
00673 #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
00674 template class ACE_Local_Name_Space <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>;
00675 template class ACE_Local_Name_Space <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>;
00676 template class ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>;
00677 template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>;
00678 template class ACE_Malloc_T<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex, ACE_Control_Block>;
00679 template class ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex, ACE_Control_Block>;
00680 template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> >;
00681 template class ACE_Allocator_Adapter<ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> >;
00682 template class ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >;
00683 template class ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >;
00684 #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
00685 #pragma instantiate ACE_Local_Name_Space <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>
00686 #pragma instantiate ACE_Local_Name_Space <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>
00687 #pragma instantiate ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>
00688 #pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>
00689 #pragma instantiate ACE_Malloc_T<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex, ACE_Control_Block>
00690 #pragma instantiate ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex, ACE_Control_Block>
00691 #pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> >
00692 #pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> >
00693 #pragma instantiate ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >
00694 #pragma instantiate ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >
00695 #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

Generated on Mon Jun 16 11:20:28 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002