Skip to content

Commit

Permalink
Requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Bingham committed May 11, 2024
1 parent e705df9 commit 8d01165
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
13 changes: 4 additions & 9 deletions src/osp/tasks/top_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@
* and declares an ID variable for each element that is given.
* The same ID's are also stored inside of the sessions m_data member
*
* @param arglist A variadic argument broken into two sections:
* Firstly: 'count' The count is an integer equal to the number of id's
* Secondly: id's Every id is a unique index into 'topData'
* @param count The number of id variables passed to the macro.
* @param ids A set of variables that will each be assigned to a unique index of topData.
*/
#define OSP_DECLARE_CREATE_DATA_IDS(session, topData, arglist) OSP_AUX_DCDI_A(session, topData, arglist);

Expand All @@ -65,12 +64,8 @@
* @brief Retrieves a section of data within topData that was already given to a session
* and maps an ID variable to each element that is retrieved.
*
* Because the data was already given, the indices are stored within the session and topData does
* not need to be accessed.
*
* @param arglist A variadic argument broken into two sections:
* Firstly: 'count' The count is an integer equal to the number of id's
* Secondly: id's Every id is a unique index into 'topData'
* @param count The number of id variables passed to the macro.
* @param ids A set of variables that will each be assigned to a unique index of topData.
*/
#define OSP_DECLARE_GET_DATA_IDS(session, arglist) OSP_AUX_DGDI_A(session, arglist);

Expand Down
15 changes: 8 additions & 7 deletions src/osp/tasks/top_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@

namespace osp
{

/**
* @brief Reserves the first empty value found in topData after the index current
*
* @return The index of the reserved value, or if topData is full, the largest index in topData
* @brief Reserves the first available space in topData after the indicated index.
*
* @return The index of the reserved value, or the index after the end of topData if no slots are
* available after the indicated index.
*/
[[nodiscard]] inline TopDataId top_reserve(
ArrayView<entt::any> const topData, TopDataId current = 0)
Expand All @@ -63,8 +64,8 @@ namespace osp
}

/**
* @brief Reserves n values in topData, where n = destLast - destFirst
* and stores the reserved indices inside of the iterable object that destFirst belongs to
* @brief Reserves a slot in topData for each item in the output range [destFirst, destLast),
* writing the associated indices into the range.
*
* @return The largest index that was reserved in topData, or if topData is full,
* the largest index in topData
Expand Down Expand Up @@ -94,7 +95,7 @@ TopDataId top_reserve(
}

/**
* @brief Using args, constructs an object of type T at the index ID inside topData
* @brief Constructs an object of type T at the indicated index.
*
* @return A reference to the newly constructed value
*/
Expand Down

0 comments on commit 8d01165

Please sign in to comment.