Add documentation

This commit is contained in:
Pcornat 2026-02-27 20:35:51 +01:00
commit ea1206e58c
Signed by: Pcornat
GPG key ID: E0326CC678A00BDD

View file

@ -12,6 +12,10 @@ namespace character {
}
namespace character::characteristic {
/*!
* \brief Different characteristic type
*/
enum class characType : std::uint8_t {
Adresse = 0,
Endurance = 1,
@ -19,16 +23,34 @@ namespace character::characteristic {
Habilete = 3
};
/*!
* \brief This class represents a characteristic for Billy (one of characType)
*/
class Characteristic {
protected:
friend BillyObjects;
using defaultValue = std::numeric_limits<std::int32_t>;
//! Total point for this charac
mutable std::int32_t total{ defaultValue::max() };
//! Base value
const std::uint32_t base{ 0 };
//! Value depending of the characType for this characteristic.
std::uint32_t carac{ 0 };
//! Value changed from a billyObjects (billyEnums) possessed
std::uint32_t materiel{ 0 };
//! Additional value when creating the character
std::uint32_t additional{ 0 };
/*!
* \brief Get base value depending of the characType
* \param inType Characteristic type used to get base number
* \return Base value depending of the characType
*/
static constexpr std::uint32_t get_base(const characType inType) noexcept {
switch (inType) {
case characType::Adresse: