RhythmGame 1.4.3
Loading...
Searching...
No Matches
Classes | Public Types | Signals | Public Member Functions | Static Public Member Functions | Properties | List of all members
gameplay_logic::BmsScore Class Referencefinal

The result of playing a chart. More...

#include <BmsScore.h>

Inheritance diagram for gameplay_logic::BmsScore:
Inheritance graph
[legend]
Collaboration diagram for gameplay_logic::BmsScore:
Collaboration graph
[legend]

Classes

struct  PreparedData
 

Public Types

enum class  Source { RhythmGame = 0 , Lr2 = 1 , Beatoraja = 2 , Bokutachi = 3 }
 
enum class  LongNoteMode { Ln = 0 , Cn = 1 , Hcn = 2 }
 
enum class  SubmissionState {
  NotSubmitted , NotSubmitting , Submitting , Submitted ,
  Failed , Duplicate
}
 

Signals

void submissionStateChanged ()
 

Public Member Functions

 BmsScore (std::unique_ptr< BmsResult > result, std::unique_ptr< BmsReplayData > replayData, std::unique_ptr< BmsGaugeHistory > gaugeHistory, QObject *parent=nullptr)
 
 BmsScore (std::unique_ptr< BmsResult > result, std::unique_ptr< BmsReplayData > replayData, std::unique_ptr< BmsGaugeHistory > gaugeHistory, QObject *parent, Source source, LongNoteMode longNoteMode)
 
auto getResult () const -> BmsResult *
 
auto getReplayData () const -> BmsReplayData *
 
auto getGaugeHistory () const -> BmsGaugeHistory *
 
auto getSource () const -> Source
 
auto getLongNoteMode () const -> LongNoteMode
 
auto getSourceName () const -> QString
 
auto isImported () const -> bool
 
void setSubmissionState (SubmissionState newState)
 
auto getSubmissionState () const -> SubmissionState
 
auto clone (QObject *parent=nullptr) const -> std::unique_ptr< BmsScore >
 
auto prepareSave () const -> PreparedData
 
void save (db::SqliteCppDb &db) const
 
void save (db::SqliteCppDb &db, const PreparedData &prepared) const
 

Static Public Member Functions

static auto fromImportedResult (std::unique_ptr< BmsResult > result, Source source, LongNoteMode longNoteMode=LongNoteMode::Ln, QObject *parent=nullptr) -> std::unique_ptr< BmsScore >
 Construct an incomplete score from imported aggregate result data.
 
static auto sourceName (Source source) -> QString
 
static auto fromRemoteJson (const QByteArray &data, const QString &expectedGuid) -> std::unique_ptr< BmsScore >
 

Properties

BmsResult * result
 The aggregated info about the score.
 
BmsReplayData * replayData
 The replay data of the score.
 
BmsGaugeHistory * gaugeHistory
 The gauge history of the score.
 
Source source { Source::RhythmGame }
 Whether this is an incomplete score imported without the data produced by a local play.
 
QString sourceName
 
bool imported
 
SubmissionState submissionState { SubmissionState::NotSubmitted }
 The state of score submission to the online server.
 

Detailed Description

The result of playing a chart.

Member Enumeration Documentation

◆ LongNoteMode

Enumerator
Ln 
Cn 
Hcn 

◆ Source

Enumerator
RhythmGame 
Lr2 
Beatoraja 
Bokutachi 

◆ SubmissionState

Enumerator
NotSubmitted 
NotSubmitting 
Submitting 
Submitted 
Failed 
Duplicate 

Constructor & Destructor Documentation

◆ BmsScore() [1/2]

gameplay_logic::BmsScore::BmsScore ( std::unique_ptr< BmsResult >  result,
std::unique_ptr< BmsReplayData >  replayData,
std::unique_ptr< BmsGaugeHistory >  gaugeHistory,
QObject *  parent = nullptr 
)
explicit

◆ BmsScore() [2/2]

gameplay_logic::BmsScore::BmsScore ( std::unique_ptr< BmsResult >  result,
std::unique_ptr< BmsReplayData >  replayData,
std::unique_ptr< BmsGaugeHistory >  gaugeHistory,
QObject *  parent,
Source  source,
LongNoteMode  longNoteMode 
)

Member Function Documentation

◆ clone()

auto gameplay_logic::BmsScore::clone ( QObject *  parent = nullptr) const -> std::unique_ptr<BmsScore>

Owns a copy of the score and its attachments, independent of QML lists.

◆ fromImportedResult()

auto gameplay_logic::BmsScore::fromImportedResult ( std::unique_ptr< BmsResult >  result,
Source  source,
LongNoteMode  longNoteMode = LongNoteMode::Ln,
QObject *  parent = nullptr 
) -> std::unique_ptr<BmsScore>
static

Construct an incomplete score from imported aggregate result data.

Imported scores intentionally have no replay or gauge history.

◆ fromRemoteJson()

auto gameplay_logic::BmsScore::fromRemoteJson ( const QByteArray &  data,
const QString &  expectedGuid 
) -> std::unique_ptr<BmsScore>
static

◆ getGaugeHistory()

auto gameplay_logic::BmsScore::getGaugeHistory ( ) const -> BmsGaugeHistory*

◆ getLongNoteMode()

auto gameplay_logic::BmsScore::getLongNoteMode ( ) const -> LongNoteMode

◆ getReplayData()

auto gameplay_logic::BmsScore::getReplayData ( ) const -> BmsReplayData*

◆ getResult()

auto gameplay_logic::BmsScore::getResult ( ) const -> BmsResult*

◆ getSource()

auto gameplay_logic::BmsScore::getSource ( ) const -> Source

◆ getSourceName()

auto gameplay_logic::BmsScore::getSourceName ( ) const -> QString

◆ getSubmissionState()

auto gameplay_logic::BmsScore::getSubmissionState ( ) const -> SubmissionState

◆ isImported()

auto gameplay_logic::BmsScore::isImported ( ) const -> bool

◆ prepareSave()

auto gameplay_logic::BmsScore::prepareSave ( ) const -> PreparedData

◆ save() [1/2]

void gameplay_logic::BmsScore::save ( db::SqliteCppDb &  db) const

◆ save() [2/2]

void gameplay_logic::BmsScore::save ( db::SqliteCppDb &  db,
const PreparedData &  prepared 
) const

◆ setSubmissionState()

void gameplay_logic::BmsScore::setSubmissionState ( SubmissionState  newState)

◆ sourceName()

auto gameplay_logic::BmsScore::sourceName ( Source  source) -> QString
static

◆ submissionStateChanged

void gameplay_logic::BmsScore::submissionStateChanged ( )
signal

Property Documentation

◆ gaugeHistory

BmsGaugeHistory * gameplay_logic::BmsScore::gaugeHistory
read

The gauge history of the score.

◆ imported

bool gameplay_logic::BmsScore::imported
read

◆ replayData

BmsReplayData * gameplay_logic::BmsScore::replayData
read

The replay data of the score.

◆ result

BmsResult * gameplay_logic::BmsScore::result
read

The aggregated info about the score.

◆ source

Source gameplay_logic::BmsScore::source { Source::RhythmGame }
read

Whether this is an incomplete score imported without the data produced by a local play.

◆ sourceName

QString gameplay_logic::BmsScore::sourceName
read

◆ submissionState

SubmissionState gameplay_logic::BmsScore::submissionState { SubmissionState::NotSubmitted }

The state of score submission to the online server.


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