|
25 | 25 | is empty or full. In a multi-threading context, it is often reasonable for a
|
26 | 26 | manipulator to block if it cannot complete a requested operation, and to wait
|
27 | 27 | for the collection state to change. For instance, when called for an empty
|
28 |
| - collection, 'bdlcc_Queue<T>::popFront()' will block and then wait until an |
| 28 | + collection, 'bdlcc::Queue<T>::popFront()' will block and then wait until an |
29 | 29 | element is available to satisfy the request.
|
30 | 30 |
|
31 | 31 | In general, components in 'bdlcc' support this blocking behavior where it
|
|
145 | 145 |
|
146 | 146 | /'bdlcc_objectcatalog'
|
147 | 147 | / - - - - - - - - - -
|
148 |
| - The {'bdlcc_objectcatalog'} component provides a thread-safe, indexable |
| 148 | + The 'bdlcc_objectcatalog' component provides a thread-safe, indexable |
149 | 149 | catalog of object. Clients instantiate a template class,
|
150 |
| - 'bdlcc_ObjectCatalog<T>', where type 'T' is the data type of elements that the |
151 |
| - catalog will hold. Type 'T' must be defined to be copyable either by a copy |
152 |
| - constructor or by 'T::operator=()'; class 'bdlcc_ObjectCatalog' places no |
153 |
| - additional requirements on 'T'. |
154 |
| - |
155 |
| - When clients add elements to a 'bdlcc_ObjectCatalog', the 'add' method returns |
156 |
| - a handle which can be used to refer to the element until the element is |
157 |
| - 'remove'd. Addition is not guaranteed to succeed and the return vaslue must |
158 |
| - be checked. An element can be accessed through its handle by using the 'find' |
159 |
| - function and passing a buffer for holding the value. Passing a null buffer |
160 |
| - can be used for testing whether the handle is still valid (i.e., refers to an |
161 |
| - element that has not yet been removed from the catalog). |
162 |
| - |
163 |
| - The 'bdlcc_ObjectCatalog' is designed to support direct access to individual |
164 |
| - queued elements based upon their 'Handle'. This means that 'bdlcc_Catalog' |
165 |
| - can support frequent additions and removals more efficiently than traditional |
166 |
| - queue structures designed for sequential access. |
167 |
| - |
168 |
| -/'bdlcc_pool' |
169 |
| -/- - - - - - |
170 |
| - The {'bdlcc_pool'} component provides a thread-safe memory pool of objects |
171 |
| - from a parameterized type 'T'. Clients instantiate a 'bdlcc_ObjectPool<T>' |
172 |
| - where the type 'T' has no requirements. The pool owns the memory and objects |
173 |
| - it contains. An object pool manages creation of its objects via a |
174 |
| - user-installed functor (given to the pool constructor), and provides automatic |
175 |
| - destruction of its objects either upon the 'destroyObject' method, or upon the |
176 |
| - pool destruction. An object can be obtained from the pool by calling the |
177 |
| - 'getObject' method, and can be released back to the pool for further use |
178 |
| - within 'getObject' by calling the 'releaseObject' method. |
| 150 | + 'bdlcc::ObjectCatalog<T>', where type 'T' is the data type of elements that |
| 151 | + the catalog will hold. Type 'T' must be defined to be copyable either by a |
| 152 | + copy constructor or by 'T::operator=()'; class 'bdlcc::ObjectCatalog' places |
| 153 | + no additional requirements on 'T'. |
| 154 | + |
| 155 | + When clients add elements to a 'bdlcc::ObjectCatalog', the 'add' method |
| 156 | + returns a handle which can be used to refer to the element until the element |
| 157 | + is 'remove'd. Addition is not guaranteed to succeed and the return vaslue |
| 158 | + must be checked. An element can be accessed through its handle by using the |
| 159 | + 'find' function and passing a buffer for holding the value. Passing a null |
| 160 | + buffer can be used for testing whether the handle is still valid (i.e., refers |
| 161 | + to an element that has not yet been removed from the catalog). |
| 162 | + |
| 163 | + The 'bdlcc::ObjectCatalog' is designed to support direct access to individual |
| 164 | + queued elements based upon their 'Handle'. This means that |
| 165 | + 'bdlcc::ObjectCatalog' can support frequent additions and removals more |
| 166 | + efficiently than traditional queue structures designed for sequential access. |
| 167 | + |
| 168 | +/'bdlcc_objectpool' |
| 169 | +/ - - - - - - - - - |
| 170 | + The 'bdlcc_objectpool' component provides a thread-safe memory pool of |
| 171 | + objects from a parameterized type 'T'. Clients instantiate a |
| 172 | + 'bdlcc::ObjectPool<T>' where the type 'T' has no requirements. The pool owns |
| 173 | + the memory and objects it contains. An object pool manages creation of its |
| 174 | + objects via a user-installed functor (given to the pool constructor), and |
| 175 | + provides automatic destruction of its objects either upon the 'destroyObject' |
| 176 | + method, or upon the pool destruction. An object can be obtained from the pool |
| 177 | + by calling the 'getObject' method, and can be released back to the pool for |
| 178 | + further use within 'getObject' by calling the 'releaseObject' method. |
179 | 179 |
|
180 | 180 | An object pool is most useful when the objects are equivalent (i.e., any
|
181 | 181 | object in the pool can be used to satisfy an object request) and object
|
|
186 | 186 |
|
187 | 187 | /'bdlcc_queue'
|
188 | 188 | /- - - - - - -
|
189 |
| - The {'bdlcc_queue'} component provides an in-place, indexable, double-ended |
190 |
| - queue. Clients instantiate a template class, 'bdlcc_Queue<T>', where type 'T' |
191 |
| - is the data type of elements that the queue will hold. Type 'T' must be |
| 189 | + The 'bdlcc_queue' component provides an in-place, indexable, double-ended |
| 190 | + queue. Clients instantiate a template class, 'bdlcc::Queue<T>', where type |
| 191 | + 'T' is the data type of elements that the queue will hold. Type 'T' must be |
192 | 192 | defined to be copyable either by a copy constructor or by 'T::operator=()';
|
193 |
| - class 'bdlcc_Queue' Places no additional requirements on 'T'. |
| 193 | + class 'bdlcc::Queue' Places no additional requirements on 'T'. |
194 | 194 |
|
195 | 195 | /'bdlcc_timequeue'
|
196 | 196 | / - - - - - - - -
|
197 |
| - The {'bdlcc_timequeue'} component provides an in-place, indexable queue, |
| 197 | + The 'bdlcc_timequeue' component provides an in-place, indexable queue, |
198 | 198 | managed in time order. Clients instantiate a template class,
|
199 |
| - 'bdlcc_TimeQueue<T>', where type 'T' is the data type of elements that the |
| 199 | + 'bdlcc::TimeQueue<T>', where type 'T' is the data type of elements that the |
200 | 200 | queue will hold. Type 'T' must be defined to be copyable either by a copy
|
201 |
| - constructor or by 'T::operator=()'; class 'bdlcc_TimeQueue' places no |
| 201 | + constructor or by 'T::operator=()'; class 'bdlcc::TimeQueue' places no |
202 | 202 | additional requirements on 'T'.
|
203 | 203 |
|
204 |
| - When clients add elements to a 'bdlcc_TimeQueue', they provide both the |
| 204 | + When clients add elements to a 'bdlcc::TimeQueue', they provide both the |
205 | 205 | element 'T' to be added and a time value, of type 'bsls::TimeInterval'.
|
206 | 206 | Elements can be extracted individually in time order using the overloaded
|
207 | 207 | 'popFront()' member functions; a block of elements can also be popped in a
|
208 | 208 | single operation, 'popLE()', which pops all elements before a given time
|
209 | 209 | value.
|
210 | 210 |
|
211 |
| - The 'bdlcc_TimeQueue' class template supports direct access to individual |
212 |
| - queued elements based upon their 'Handle'. This means that 'bdlcc_TimeQueue' |
| 211 | + The 'bdlcc::TimeQueue' class template supports direct access to individual |
| 212 | + queued elements based upon their 'Handle'. This means that 'bdlcc::TimeQueue' |
213 | 213 | can support frequent additions and removals more efficiently than traditional
|
214 | 214 | queue structures designed for sequential access.
|
0 commit comments