Initial Patch of Auction House bot rev. 135
[auctionmangos.git] / dep / ACE_wrappers / ace / Service_Gestalt.inl
blobd7de81361ecde11ff7b95cd20f7b52723ce41e16
1 // -*- C++ -*-
2 //
3 // $Id: Service_Gestalt.inl 81388 2008-04-23 14:02:05Z johnnyw $
6 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
9 // This is the primary entry point into the ACE_Service_Config (the
10 // constructor just handles simple initializations).
12 ACE_INLINE int
13 ACE_Service_Gestalt::open (const ACE_TCHAR program_name[],
14                           const ACE_TCHAR *logger_key,
15                           bool ignore_static_svcs,
16                           bool ignore_default_svc_conf,
17                           bool ignore_debug_flag)
19   ACE_TRACE ("ACE_Service_Gestalt::open");
20   this->no_static_svcs_ = ignore_static_svcs;
22   return this->open_i (program_name,
23                        logger_key,
24                        ignore_static_svcs,
25                        ignore_default_svc_conf,
26                        ignore_debug_flag);
29 ACE_INLINE int
30 ACE_Service_Gestalt::open (int argc,
31                           ACE_TCHAR *argv[],
32                           const ACE_TCHAR *logger_key,
33                           bool ignore_static_svcs,
34                           bool ignore_default_svc_conf,
35                           bool ignore_debug_flag)
37   ACE_TRACE ("ACE_Service_Gestalt::open");
39   this->no_static_svcs_ = ignore_static_svcs;
41   if (this->parse_args_i (argc,
42                           argv,
43                           ignore_default_svc_conf) == -1)
44     return -1;
46   return this->open_i (argv == 0 ? 0 : argv[0],
47                        logger_key,
48                        ignore_static_svcs,
49                        ignore_default_svc_conf,
50                        ignore_debug_flag);
53 /// Searches for a service object declaration in the local repo, only
55 ACE_INLINE int
56 ACE_Service_Gestalt::find (const ACE_TCHAR name[],
57                            const ACE_Service_Type **srp,
58                            bool ignore_suspended) const
60   // Closing the gestalt will have disassociated it from the
61   // repository. If the repository used to be owned by the gestalt, it
62   // will also have been destroyed - so just check for repo_ before
63   // doing anything with it.
64   if (this->repo_ != 0)
65     return this->repo_->find (name, srp, ignore_suspended);
67   return 0;
70 ACE_INLINE ACE_Service_Repository*
71 ACE_Service_Gestalt::current_service_repository (void)
73   return this->repo_;
76 ACE_END_VERSIONED_NAMESPACE_DECL