Allow setting position/total of PositionInSet

This commit is contained in:
Martchus 2023-08-01 00:24:28 +02:00
parent f7941d442f
commit f5497fb300
1 changed files with 18 additions and 0 deletions

View File

@ -26,7 +26,9 @@ public:
PositionInSet(const StringType &numericString);
constexpr std::int32_t position() const;
void setPosition(std::int32_t position);
constexpr std::int32_t total() const;
void setTotal(std::int32_t total);
constexpr bool isNull() const;
constexpr bool operator==(const PositionInSet &other) const;
@ -80,6 +82,14 @@ constexpr inline std::int32_t PositionInSet::position() const
return m_position;
}
/*!
* \brief Sets the element position of the current instance.
*/
inline void PositionInSet::setPosition(int32_t position)
{
m_position = position;
}
/*!
* \brief Returns the total element count of the current instance.
*/
@ -88,6 +98,14 @@ constexpr inline std::int32_t PositionInSet::total() const
return m_total;
}
/*!
* \brief Sets the total element count of the current instance.
*/
inline void PositionInSet::setTotal(int32_t total)
{
m_total = total;
}
/*!
* \brief Returns an indication whether both the element position and total element count is 0.
*/