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

Cache_Map_Manager_T.i

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 //$Id: Cache_Map_Manager_T.i,v 1.1.1.2 2001/12/04 14:32:59 chad Exp $
00003 
00004 #if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
00005 
00006 #define ACE_T1 class KEY, class VALUE, class MAP, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES
00007 #define ACE_T2 KEY, VALUE, MAP, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES
00008 
00009 #else
00010 
00011 #define ACE_T1 class KEY, class VALUE, class MAP, class CACHING_STRATEGY, class ATTRIBUTES
00012 #define ACE_T2 KEY, VALUE, MAP, CACHING_STRATEGY, ATTRIBUTES
00013 
00014 #endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
00015 
00016 template <ACE_T1> ACE_INLINE int
00017 ACE_Cache_Map_Manager<ACE_T2>::purge (void)
00018 {
00019   return this->caching_strategy ().caching_utility ().clear_cache (this->map_,
00020                                                                    this->caching_strategy ().purge_percent ());
00021 }
00022 
00023 template <ACE_T1> ACE_INLINE size_t
00024 ACE_Cache_Map_Manager<ACE_T2>::current_size (void) const
00025 {
00026   return this->map_.current_size ();
00027 }
00028 
00029 template <ACE_T1> ACE_INLINE size_t
00030 ACE_Cache_Map_Manager<ACE_T2>::total_size (void) const
00031 {
00032   return this->map_.total_size ();
00033 }
00034 
00035 template <ACE_T1> ACE_INLINE MAP &
00036 ACE_Cache_Map_Manager<ACE_T2>::map (void)
00037 {
00038   return this->map_;
00039 }
00040 
00041 template <ACE_T1> ACE_INLINE CACHING_STRATEGY &
00042 ACE_Cache_Map_Manager<ACE_T2>::caching_strategy (void)
00043 {
00044   return this->caching_strategy_;
00045 }
00046 
00047 #if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
00048 
00049 template <ACE_T1> ACE_INLINE ACE_Cache_Map_Iterator<KEY, VALUE, ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>
00050 ACE_Cache_Map_Manager<ACE_T2>::begin (void)
00051 {
00052   return ITERATOR (this->map_.begin ());
00053 }
00054 
00055 template <ACE_T1> ACE_INLINE ACE_Cache_Map_Iterator<KEY, VALUE, ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>
00056 ACE_Cache_Map_Manager<ACE_T2>::end (void)
00057 {
00058   return ITERATOR (this->map_.end ());
00059 }
00060 
00061 template <ACE_T1> ACE_INLINE ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>
00062 ACE_Cache_Map_Manager<ACE_T2>::rbegin (void)
00063 {
00064   return REVERSE_ITERATOR (this->map_.rbegin ());
00065 }
00066 template <ACE_T1> ACE_INLINE ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>
00067 ACE_Cache_Map_Manager<ACE_T2>::rend (void)
00068 {
00069   return REVERSE_ITERATOR (this->map_.rend ());
00070 }
00071 
00072 #undef ACE_T1
00073 #undef ACE_T2
00074 
00075 ////////////////////////////////////////////////////////////////////////////////
00076 
00077 #define ACE_T1 class KEY, class VALUE, class IMPLEMENTATION, class CACHING_STRATEGY, class ATTRIBUTES
00078 #define ACE_T2 KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES
00079 
00080 template <ACE_T1> ACE_INLINE
00081 ACE_Cache_Map_Iterator<ACE_T2>::ACE_Cache_Map_Iterator (const ACE_Cache_Map_Iterator <ACE_T2> &rhs)
00082   : iterator_implementation_ (rhs.iterator_implementation_)
00083 {
00084 }
00085 
00086 template <ACE_T1> ACE_INLINE
00087 ACE_Cache_Map_Iterator<ACE_T2>::~ACE_Cache_Map_Iterator (void)
00088 {
00089 }
00090 
00091 template <ACE_T1> ACE_INLINE ACE_Cache_Map_Iterator<ACE_T2> &
00092 ACE_Cache_Map_Iterator<ACE_T2>::operator= (const ACE_Cache_Map_Iterator<ACE_T2> &rhs)
00093 {
00094   this->iterator_implementation_ = rhs.iterator_implementation_;
00095   return *this;
00096 }
00097 
00098 template <ACE_T1> ACE_INLINE int
00099 ACE_Cache_Map_Iterator<ACE_T2>::operator== (const ACE_Cache_Map_Iterator<ACE_T2> &rhs) const
00100 {
00101   return this->iterator_implementation_ == rhs.iterator_implementation_;
00102 }
00103 
00104 template <ACE_T1> ACE_INLINE int
00105 ACE_Cache_Map_Iterator<ACE_T2>::operator!= (const ACE_Cache_Map_Iterator<ACE_T2> &rhs) const
00106 {
00107   return this->iterator_implementation_ != rhs.iterator_implementation_;
00108 }
00109 
00110 template <ACE_T1> ACE_INLINE ACE_Reference_Pair<KEY, VALUE>
00111 ACE_Cache_Map_Iterator<ACE_T2>::operator* (void) const
00112 {
00113   value_type retn ((*this->iterator_implementation_).ext_id_,
00114                    (*this->iterator_implementation_).int_id_.first ());
00115   return retn;
00116 }
00117 
00118 template <ACE_T1> ACE_INLINE
00119 ACE_Cache_Map_Iterator<ACE_T2> &
00120 ACE_Cache_Map_Iterator<ACE_T2>::operator++ (void)
00121 {
00122   ++this->iterator_implementation_;
00123   return *this;
00124 }
00125 
00126 template <ACE_T1> ACE_INLINE
00127 ACE_Cache_Map_Iterator<ACE_T2>
00128 ACE_Cache_Map_Iterator<ACE_T2>::operator++ (int)
00129 {
00130   ACE_Cache_Map_Iterator<ACE_T2> retn = *this;
00131   ++this->iterator_implementation_;
00132   return retn;
00133 }
00134 
00135 template <ACE_T1> ACE_INLINE
00136 ACE_Cache_Map_Iterator<ACE_T2> &
00137 ACE_Cache_Map_Iterator<ACE_T2>::operator-- (void)
00138 {
00139   --this->iterator_implementation_;
00140   return *this;
00141 }
00142 
00143 template <ACE_T1> ACE_INLINE
00144 ACE_Cache_Map_Iterator<ACE_T2>
00145 ACE_Cache_Map_Iterator<ACE_T2>::operator-- (int)
00146 {
00147   ACE_Cache_Map_Iterator<ACE_T2> retn = *this;
00148   --this->iterator_implementation_;
00149   return retn;
00150 }
00151 
00152 
00153 template <ACE_T1> ACE_INLINE void
00154 ACE_Cache_Map_Iterator<ACE_T2>::dump (void) const
00155 {
00156   this->iterator_implementation_.dump ();
00157 }
00158 
00159 template <ACE_T1> ACE_INLINE
00160 ACE_Cache_Map_Iterator<ACE_T2>::ACE_Cache_Map_Iterator (const IMPLEMENTATION &iterator_impl)
00161   : iterator_implementation_ (iterator_impl)
00162 {
00163 }
00164 
00165 template <ACE_T1> ACE_INLINE IMPLEMENTATION &
00166 ACE_Cache_Map_Iterator<ACE_T2>::iterator_implementation (void)
00167 {
00168   return this->iterator_implementation_;
00169 }
00170 
00171 #undef ACE_T1
00172 #undef ACE_T2
00173 
00174 ////////////////////////////////////////////////////////////////////////////////
00175 
00176 #define ACE_T1 class KEY, class VALUE, class REVERSE_IMPLEMENTATION, class CACHING_STRATEGY, class ATTRIBUTES
00177 #define ACE_T2 KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES
00178 
00179 template <ACE_T1> ACE_INLINE
00180 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::ACE_Cache_Map_Reverse_Iterator (const ACE_Cache_Map_Reverse_Iterator <ACE_T2> &rhs)
00181   : reverse_iterator_implementation_ (rhs.reverse_iterator_implementation_)
00182 {
00183 }
00184 
00185 template <ACE_T1> ACE_INLINE
00186 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::~ACE_Cache_Map_Reverse_Iterator (void)
00187 {
00188 }
00189 
00190 template <ACE_T1> ACE_INLINE ACE_Cache_Map_Reverse_Iterator<ACE_T2> &
00191 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator= (const ACE_Cache_Map_Reverse_Iterator<ACE_T2> &rhs)
00192 {
00193   this->reverse_iterator_implementation_ = rhs.reverse_iterator_implementation_;
00194   return *this;
00195 }
00196 
00197 template <ACE_T1> ACE_INLINE int
00198 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator== (const ACE_Cache_Map_Reverse_Iterator<ACE_T2> &rhs) const
00199 {
00200   return this->reverse_iterator_implementation_ == rhs.reverse_iterator_implementation_;
00201 }
00202 
00203 template <ACE_T1> ACE_INLINE int
00204 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator!= (const ACE_Cache_Map_Reverse_Iterator<ACE_T2> &rhs) const
00205 {
00206   return this->reverse_iterator_implementation_ != rhs.reverse_iterator_implementation_;
00207 }
00208 
00209 template <ACE_T1> ACE_INLINE ACE_Reference_Pair<KEY, VALUE>
00210 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator* (void) const
00211 {
00212   value_type retv ((*this->reverse_iterator_implementation_).ext_id_,
00213                    (*this->reverse_iterator_implementation_).int_id_.first ());
00214   return retv;
00215 }
00216 
00217 template <ACE_T1> ACE_INLINE
00218 ACE_Cache_Map_Reverse_Iterator<ACE_T2> &
00219 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator++ (void)
00220 {
00221   ++this->reverse_iterator_implementation_;
00222   return *this;
00223 }
00224 
00225 template <ACE_T1> ACE_INLINE
00226 ACE_Cache_Map_Reverse_Iterator<ACE_T2>
00227 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator++ (int)
00228 {
00229   ACE_Cache_Map_Reverse_Iterator<ACE_T2> retn = *this;
00230   ++this->reverse_iterator_implementation_;
00231   return retn;
00232 }
00233 
00234 template <ACE_T1> ACE_INLINE
00235 ACE_Cache_Map_Reverse_Iterator<ACE_T2> &
00236 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator-- (void)
00237 {
00238   --this->reverse_iterator_implementation_;
00239   return *this;
00240 }
00241 
00242 template <ACE_T1> ACE_INLINE
00243 ACE_Cache_Map_Reverse_Iterator<ACE_T2>
00244 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator-- (int)
00245 {
00246   ACE_Cache_Map_Reverse_Iterator<ACE_T2> retn = *this;
00247   --this->reverse_iterator_implementation_;
00248   return retn;
00249 }
00250 
00251 
00252 template <ACE_T1> ACE_INLINE void
00253 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::dump (void) const
00254 {
00255   this->reverse_iterator_implementation_.dump ();
00256 }
00257 
00258 template <ACE_T1> ACE_INLINE
00259 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::ACE_Cache_Map_Reverse_Iterator (const REVERSE_IMPLEMENTATION &iterator_impl)
00260   : reverse_iterator_implementation_(iterator_impl)
00261 {
00262 }
00263 
00264 template <ACE_T1> ACE_INLINE REVERSE_IMPLEMENTATION &
00265 ACE_Cache_Map_Reverse_Iterator<ACE_T2>::iterator_implementation (void)
00266 {
00267   return this->reverse_iterator_implementation_;
00268 }
00269 
00270 #endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
00271 
00272 #undef ACE_T1
00273 #undef ACE_T2

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