Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 01b71fa

Browse files
doc: fix broken link, wording and style issues in groups defs
1 parent f462f6c commit 01b71fa

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

doc/groups_definitions.dox

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: BSD-3-Clause
2-
# Copyright 2021, Intel Corporation
2+
# Copyright 2021-2022, Intel Corporation
33

44
/** @defgroup containers Containers
55
* Custom (but STL-like) containers for persistent memory.
@@ -135,7 +135,7 @@
135135
* in libpmemobj-cpp it's transparent for user, so please focus on relationships between stages.
136136
* Look at the diagram below:
137137
*
138-
* ![lifecycle](https://pmem.io/assets/lifecycle.png "Transaction lifecycle")
138+
* ![lifecycle](https://pmem.io/images/posts/lifecycle.png "Transaction lifecycle")
139139
*
140140
* To be more familiar with functions used in diagram read e.g. **pmemobj_tx_begin**(3) manpage
141141
* (C API for [libpmemobj](https://pmem.io/pmdk/libpmemobj/), link below in *Additional resources*).
@@ -208,20 +208,21 @@
208208
*/
209209

210210
/** @defgroup primitives Primitives
211-
* Basic classes that provides PMEM-aware pointers and pool handlers.
211+
* Basic classes that provide PMEM-aware pointers and pool handlers.
212212
*
213213
* ## Pointers
214214
* There are few types to handle data on PMEM.
215215
* - @ref pmem::obj::persistent_ptr<T> - implements a smart pointer.
216216
* It encapsulates the [PMEMoid](https://pmem.io/2015/06/11/type-safety-macros.html) fat
217217
* pointer and provides member access, dereference and array access operators.
218218
* - @ref pmem::obj::experimental::self_relative_ptr<T> - implements a smart ptr.
219-
* It encapsulates the self offsetted pointer and provides member access, dereference and array access operators.
219+
* It encapsulates the self-offsetted pointer and provides member access, dereference and array access operators.
220220
* self_relative_ptr in comparison to persistent_ptr is:
221-
* - smaller size (8B vs 16B)
222-
* - can be used with atomic operations
223-
* - faster dereference (important in loop), also allows vectorization
224-
* - if stored in a persistent memory pool, it can only points to elements within the same pool
221+
* - smaller in size (8B vs 16B),
222+
* - can be used with atomic operations,
223+
* - dereferenced faster (it's important, e.g., in loops),
224+
* - allows vectorization,
225+
* - if stored in a persistent memory pool, it can only points to elements within the same pool.
225226
* - @ref pmem::obj::p<T> - template class that can be used for all variables (except persistent pointers),
226227
* which are used in @ref transactions.
227228
* This class is not designed to be used with compound types. For that see the @ref pmem::obj::persistent_ptr.
@@ -231,8 +232,8 @@
231232
* exactly once per instance of the application. This class has 8 bytes of storage overhead.
232233
*
233234
* ## Pool handles
234-
* Pool class provides basic operations on pmemobj [pools](https://pmem.io/2016/05/10/cpp-05.html). C++ API for pools should
235-
* not be mixed with C API. For example explicitly calling pmemobj_set_user_data(pop)
235+
* Pool class provides basic operations on pmemobj [pools](https://pmem.io/2016/05/10/cpp-05.html).
236+
* C++ API for pools should not be mixed with C API. For example explicitly calling `pmemobj_set_user_data(pop)`
236237
* on pool which is handled by C++ pool object is undefined behaviour.
237238
*
238239
* There are few pool handlers:
@@ -249,9 +250,10 @@
249250
* Possible exceptions that could be thrown by the libpmemobj++.
250251
*
251252
* In runtime, some operations may fail, then all you need is to catch the exception.
252-
* Every pmem exception has **std::runtime_error** in its inheritance tree
253-
* and contains proper message with an error description.
254-
* All exceptions can be caught using just **std::runtime_error**.
253+
* Every pmem exception has `std::runtime_error` in its inheritance tree, which means
254+
* that all exceptions can be caught using just this type. Each exception contains
255+
* proper message with an error description.
256+
*
255257
* Look at the list on this page to explore all exceptions with their descriptions.
256258
*
257259
* Transaction handles uncaught exceptions thrown inside its scope, then aborts
@@ -262,13 +264,13 @@
262264
* Let's consider following example:
263265
* @snippet examples/mpsc_queue/mpsc_queue.cpp mpsc_main
264266
*
265-
* There are plenty of try-catch blocks placed to handle possible errors that can happen in some conditions.
266-
* E.g. @ref pmem::obj::pool<T>::open can lead to @ref pmem::pool_error.
267-
* Next exception, **std::exception**, is placed to handle possible errors during allocation,
268-
* coming from @ref pmem::obj::make_persistent. Worth being careful using every new function
269-
* because some of exceptions are not obvious, e.g., pmem::obj::pool<T>::close
270-
* at the end of the code which may throw **std::logic_error**.
267+
* There are plenty of try-catch blocks placed to handle possible errors that can occur in some
268+
* conditions. E.g. @ref pmem::obj::pool<T>::open can lead to @ref pmem::pool_error.
269+
* The next exception, **std::exception**, is placed to handle possible errors during allocation,
270+
* coming from @ref pmem::obj::make_persistent. Worth being careful using any new function
271+
* because some exceptions are not obvious, e.g., pmem::obj::pool<T>::close
272+
* at the end of the code, which may throw **std::logic_error**.
271273
*
272-
* You should check every function you will use in context of possible
273-
* exceptions and then handle them to avoid crash.
274+
* You should check every function you will use in the context of possible
275+
* exceptions and then handle them to avoid a crash.
274276
*/

0 commit comments

Comments
 (0)