ACE_Service_Type_Factory Class Reference

#include <Service_Gestalt.h>

Collaboration diagram for ACE_Service_Type_Factory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACE_Service_Type_Factory (ACE_TCHAR const *name, int type, ACE_Location_Node *location, int active)
 ~ACE_Service_Type_Factory (void)
ACE_Service_Typemake_service_type (ACE_Service_Gestalt *pcfg) const
ACE_TCHAR const * name (void) const

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.


Private Member Functions

 ACE_Service_Type_Factory (const ACE_Service_Type_Factory &)
ACE_Service_Type_Factoryoperator= (const ACE_Service_Type_Factory &)

Private Attributes

ACE_TString name_
int type_
ACE_Auto_Ptr< ACE_Location_Nodelocation_
int is_active_

Constructor & Destructor Documentation

ACE_Service_Type_Factory::ACE_Service_Type_Factory ACE_TCHAR const *  name,
int  type,
ACE_Location_Node location,
int  active
 

Definition at line 391 of file Service_Gestalt.cpp.

References ACE_TCHAR.

00395   : name_ (name)
00396   , type_ (type)
00397   , location_ (location)
00398   , is_active_ (active)
00399 {
00400 }

ACE_Service_Type_Factory::~ACE_Service_Type_Factory void   ) 
 

Definition at line 403 of file Service_Gestalt.cpp.

00404 {
00405 }

ACE_Service_Type_Factory::ACE_Service_Type_Factory const ACE_Service_Type_Factory  )  [private]
 

Not implemented to enforce no copying


Member Function Documentation

ACE_Service_Type * ACE_Service_Type_Factory::make_service_type ACE_Service_Gestalt pcfg  )  const
 

Definition at line 409 of file Service_Gestalt.cpp.

References ACE_ERROR, ACE_LIB_TEXT, ACE_NEW_RETURN, ACE_Service_Object_Exterminator, ACE_TRACE, ACE_Service_Config::create_service_type_impl(), is_active_, LM_ERROR, and location_.

Referenced by ACE_Service_Gestalt::initialize().

00410 {
00411   ACE_TRACE ("ACE_Service_Type_Factory::make_service_type");
00412 
00413   u_int flags = ACE_Service_Type::DELETE_THIS
00414     | (this->location_->dispose () == 0 ? 0 : ACE_Service_Type::DELETE_OBJ);
00415 
00416   ACE_Service_Object_Exterminator gobbler = 0;
00417 
00418   int yyerrno = 0;
00419   void *sym = this->location_->symbol (cfg, yyerrno, &gobbler);
00420 
00421   if (sym != 0)
00422     {
00423       ACE_Service_Type_Impl *stp
00424         = ACE_Service_Config::create_service_type_impl (this->name (),
00425                                                         this->type_,
00426                                                         sym,
00427                                                         flags,
00428                                                         gobbler);
00429       if (stp == 0)
00430         ++yyerrno;
00431 
00432       ACE_Service_Type *tmp = 0;
00433       ACE_NEW_RETURN (tmp,
00434                       ACE_Service_Type (this->name (),
00435                                         stp,
00436                                         this->location_->dll (),
00437                                         this->is_active_),
00438                       0);
00439       return tmp;
00440     }
00441   else
00442     {
00443 #ifndef ACE_NLOGGING
00444       ACE_ERROR ((LM_ERROR,
00445                   ACE_LIB_TEXT ("(%P|%t) Unable to find service \'%s\'\n"),
00446                   this->name ()));
00447 #endif
00448       ++yyerrno;
00449       return 0;
00450     }
00451 }

ACE_TCHAR const * ACE_Service_Type_Factory::name void   )  const
 

Definition at line 454 of file Service_Gestalt.cpp.

References ACE_String_Base< CHAR >::c_str().

Referenced by ACE_Service_Gestalt::initialize().

00455 {
00456   return name_.c_str ();
00457 }

ACE_Service_Type_Factory& ACE_Service_Type_Factory::operator= const ACE_Service_Type_Factory  )  [private]
 


Member Data Documentation

ACE_Service_Type_Factory::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

Definition at line 437 of file Service_Gestalt.h.

int ACE_Service_Type_Factory::is_active_ [private]
 

Definition at line 454 of file Service_Gestalt.h.

Referenced by make_service_type().

ACE_Auto_Ptr<ACE_Location_Node> ACE_Service_Type_Factory::location_ [private]
 

Definition at line 453 of file Service_Gestalt.h.

Referenced by make_service_type().

ACE_TString ACE_Service_Type_Factory::name_ [private]
 

Definition at line 451 of file Service_Gestalt.h.

int ACE_Service_Type_Factory::type_ [private]
 

Definition at line 452 of file Service_Gestalt.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:29:28 2006 for ACE by doxygen 1.3.6