Atlas Game Manager
A game manager for f95 and dlsite written in c++
Loading...
Searching...
No Matches
atlas::records::Version Class Reference

Representation of a game version. More...

#include <Version.hpp>

Public Member Functions

const VersionDataoperator-> () const
 
void addPlaytime (const std::uint32_t playtime)
 Adds playtime to this and it's parent record.
 
template<class Rep, class Period>
void addPlaytime (const std::chrono::duration< Rep, Period > time_diff)
 
void setLastPlayed (const std::uint64_t last_played)
 Sets the last played timestamp for this and it's parent record.
 
void playGame ()
 Executes the game for this record.
 
void setVersionName (const QString str)
 
void setRelativeExecPath (const std::filesystem::path &path)
 
QString getVersionName () const
 
bool isInPlace () const
 If true then the game is not located in config::paths::games::get()
 
std::uint32_t getPlaytime () const
 
std::uint64_t getLastPlayed () const
 
std::filesystem::path getPath () const
 
std::filesystem::path getRelativeExecPath () const
 
std::filesystem::path getExecPath () const
 
std::uint64_t getFolderSize () const
 
RecordID getParentID () const
 
std::uint64_t getImportTime () const
 
 Version ()=delete
 
bool operator== (const Version &other) const
 
 Version (const RecordID, const QString &name)
 
 ~Version ()
 
 Version (const Version &other) noexcept
 
 Version (Version &&other) noexcept
 
Game parent () const
 
Versionoperator= (const Version &other) noexcept
 Required to make std::vector happy.
 

Private Attributes

RecordID m_parent_id
 
QString m_version
 
std::shared_ptr< VersionDatadata_ptr
 

Detailed Description

Representation of a game version.

Constructor & Destructor Documentation

◆ Version() [1/4]

atlas::records::Version::Version ( )
delete

◆ Version() [2/4]

atlas::records::Version::Version ( const RecordID id,
const QString & name )

◆ ~Version()

atlas::records::Version::~Version ( )

◆ Version() [3/4]

atlas::records::Version::Version ( const Version & other)
inlinenoexcept

◆ Version() [4/4]

atlas::records::Version::Version ( Version && other)
inlinenoexcept

Member Function Documentation

◆ addPlaytime() [1/2]

template<class Rep, class Period>
void atlas::records::Version::addPlaytime ( const std::chrono::duration< Rep, Period > time_diff)
inline

◆ addPlaytime() [2/2]

void atlas::records::Version::addPlaytime ( const std::uint32_t playtime)

Adds playtime to this and it's parent record.

◆ getExecPath()

std::filesystem::path atlas::records::Version::getExecPath ( ) const

◆ getFolderSize()

std::uint64_t atlas::records::Version::getFolderSize ( ) const

◆ getImportTime()

std::uint64_t atlas::records::Version::getImportTime ( ) const

◆ getLastPlayed()

std::uint64_t atlas::records::Version::getLastPlayed ( ) const

◆ getParentID()

RecordID atlas::records::Version::getParentID ( ) const

◆ getPath()

std::filesystem::path atlas::records::Version::getPath ( ) const

◆ getPlaytime()

std::uint32_t atlas::records::Version::getPlaytime ( ) const

◆ getRelativeExecPath()

std::filesystem::path atlas::records::Version::getRelativeExecPath ( ) const

◆ getVersionName()

QString atlas::records::Version::getVersionName ( ) const

◆ isInPlace()

bool atlas::records::Version::isInPlace ( ) const

If true then the game is not located in config::paths::games::get()

◆ operator->()

const VersionData * atlas::records::Version::operator-> ( ) const
inline

◆ operator=()

Version & atlas::records::Version::operator= ( const Version & other)
inlinenoexcept

Required to make std::vector happy.

◆ operator==()

bool atlas::records::Version::operator== ( const Version & other) const
inline

◆ parent()

Game atlas::records::Version::parent ( ) const

◆ playGame()

void atlas::records::Version::playGame ( )

Executes the game for this record.

◆ setLastPlayed()

void atlas::records::Version::setLastPlayed ( const std::uint64_t last_played)

Sets the last played timestamp for this and it's parent record.

◆ setRelativeExecPath()

void atlas::records::Version::setRelativeExecPath ( const std::filesystem::path & path)

◆ setVersionName()

void atlas::records::Version::setVersionName ( const QString str)

Member Data Documentation

◆ data_ptr

std::shared_ptr< VersionData > atlas::records::Version::data_ptr
private

◆ m_parent_id

RecordID atlas::records::Version::m_parent_id
private

◆ m_version

QString atlas::records::Version::m_version
private

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