00001 // -*- C++ -*- 00002 // 00003 // Service_Repository.inl,v 4.4 2006/05/24 23:22:16 jeliazkov_i Exp 00004 00005 // Returns a count of the number of currently valid entries (counting 00006 // both resumed and suspended entries). 00007 00008 #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) 00009 #include "ace/Guard_T.h" 00010 #include "ace/Thread_Mutex.h" 00011 #endif /* ACE_MT_SAFE */ 00012 00013 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00014 00015 ACE_INLINE size_t 00016 ACE_Service_Repository::current_size (void) const 00017 { 00018 ACE_TRACE ("ACE_Service_Repository::current_size"); 00019 ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, 00020 ace_mon, 00021 (ACE_Recursive_Thread_Mutex &) this->lock_, 0)); 00022 return this->current_size_; 00023 } 00024 00025 // Returns a count of the total number of possible entries in the 00026 // table. 00027 00028 ACE_INLINE size_t 00029 ACE_Service_Repository::total_size (void) const 00030 { 00031 ACE_TRACE ("ACE_Service_Repository::total_size"); 00032 ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, 00033 ace_mon, 00034 (ACE_Recursive_Thread_Mutex &) this->lock_, 0)); 00035 return this->total_size_; 00036 } 00037 00038 ACE_INLINE int 00039 ACE_Service_Repository_Iterator::done (void) const 00040 { 00041 ACE_TRACE ("ACE_Service_Repository_Iterator::done"); 00042 00043 return this->next_ >= this->svc_rep_.current_size_; 00044 } 00045 00046 ACE_INLINE 00047 ACE_Service_Repository_Iterator::~ACE_Service_Repository_Iterator (void) 00048 { 00049 } 00050 00051 ACE_END_VERSIONED_NAMESPACE_DECL