Skip to main content

Score Class

Abstract base class for score value types. More...

Declaration

class helios::engine::mechanics::scoring::types::Score { ... }

Derived Classes

classKillReward

Score type awarded when an entity is killed. More...

Public Constructors Index

Score (const double value)

Constructs a Score with the given value. More...

Public Destructor Index

~Score ()=default

Public Member Functions Index

doublevalue () const noexcept

Returns the score value. More...

helios::engine::mechanics::scoring::types::ScoreTypeIdtypeId () const noexcept=0

Returns the unique type identifier for this score type. More...

Protected Member Attributes Index

doublevalue_

The numeric score value. More...

Description

Abstract base class for score value types.

Provides a common interface for different score types (e.g., KillReward). Each concrete type must provide a unique ScoreTypeId.

Definition at line 21 of file Score.ixx.

Public Constructors

Score()

helios::engine::mechanics::scoring::types::Score::Score (const double value)
inline explicit

Constructs a Score with the given value.

Parameters
value

The numeric score value.

Definition at line 39 of file Score.ixx.

39 explicit Score(const double value) : value_(value){}

References value and value_.

Referenced by helios::engine::mechanics::scoring::types::KillReward::KillReward.

Public Destructor

~Score()

virtual helios::engine::mechanics::scoring::types::Score::~Score ()
virtual default

Definition at line 32 of file Score.ixx.

Public Member Functions

typeId()

virtual helios::engine::mechanics::scoring::types::ScoreTypeId helios::engine::mechanics::scoring::types::Score::typeId ()
nodiscard noexcept

Returns the unique type identifier for this score type.

Returns

The ScoreTypeId for this concrete score type.

Definition at line 55 of file Score.ixx.

value()

double helios::engine::mechanics::scoring::types::Score::value ()
inline nodiscard noexcept

Returns the score value.

Returns

The numeric score value.

Definition at line 46 of file Score.ixx.

46 [[nodiscard]] double value() const noexcept {
47 return value_;
48 }

Reference value_.

Referenced by Score.

Protected Member Attributes

value_

double helios::engine::mechanics::scoring::types::Score::value_
protected

The numeric score value.

Definition at line 28 of file Score.ixx.

28 double value_;

Referenced by Score and value.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.