diff options
author | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-09-25 14:50:35 +0000 |
---|---|---|
committer | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-09-25 14:50:35 +0000 |
commit | e8d586bcbfce0796c32729f8234a74ca44a5a5c4 (patch) | |
tree | 356d769b03b841385f42657ccfeada07ce730320 /ace/Service_Repository.h | |
parent | e63d4e617c903edc335ef8b246371e71f8d203f2 (diff) | |
download | ATCD-bug2612-ace.tar.gz |
ChangeLogTag: Fri Sep 22 21:02:58 UTC 2006 Iliyan Jeliazkov <iliyan@ociweb.com>bug2612-ace
Diffstat (limited to 'ace/Service_Repository.h')
-rw-r--r-- | ace/Service_Repository.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/ace/Service_Repository.h b/ace/Service_Repository.h index bbeafbe3602..8cd55344d29 100644 --- a/ace/Service_Repository.h +++ b/ace/Service_Repository.h @@ -27,6 +27,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Service_Type; +class ACE_DLL; #define ACE_Component_Repository ACE_Service_Repository /** @@ -132,12 +133,40 @@ public: ACE_ALLOC_HOOK_DECLARE; private: + + friend class ACE_Service_Type_Dynamic_Guard; + + /// Remove an existing service record. It requires @a sr != 0, which + /// receives the service record pointer and the caller is + /// responsible for properly disposing of it. + int remove_i (const ACE_TCHAR[], ACE_Service_Type **sr); + /// Locates <service_name>. Must be called without locks being /// held... + int find_i (const ACE_TCHAR service_name[], const ACE_Service_Type ** = 0, int ignore_suspended = 1) const; + /// @brief Relocate (static) services to another DLL. + /// + /// If any have been registered in the context of a "forward + /// declaration" guard, those really aren't static services. Their + /// code is in the DLL's code segment, or in one of the dependent + /// DLLs. Therefore, such services need to be associated with the + /// proper DLL in order to prevent failures upon finalization. The + /// method locks the repo. + /// + /// Works by having the service type keep a reference to a specific + /// DLL. No locking, caller makes sure calling it is safe. You can + /// forcefully relocate any DLLs in the given range, not only the + /// static ones - but that will cause Very Bad Things (tm) to happen. + + int relocate_i (size_t begin, + size_t end, + const ACE_DLL &adll, + bool static_only = true); + /// Contains all the configured services. const ACE_Service_Type **service_vector_; @@ -178,6 +207,8 @@ public: /// Destructor. ~ACE_Service_Repository_Iterator (void); + +public: // = Iteration methods. /// Pass back the <next_item> that hasn't been seen in the repository. @@ -199,9 +230,10 @@ public: private: bool valid (void) const; - ACE_Service_Repository_Iterator (const ACE_Service_Repository_Iterator&); private: + ACE_Service_Repository_Iterator (const ACE_Service_Repository_Iterator&); + /// Reference to the Service Repository we are iterating over. ACE_Service_Repository &svc_rep_; |