Add const GetType and GetDatabase methods to GameInterface

This commit is contained in:
Oliver Hamlet
2023-08-18 17:28:39 +01:00
parent 26519efa44
commit 0eee8066b7
9 changed files with 101 additions and 80 deletions
+14
View File
@@ -33,6 +33,12 @@ class GameInterface {
public:
virtual ~GameInterface() = default;
/**
* @brief Get the game's type.
* @returns The game's type.
*/
virtual GameType GetType() const = 0;
/**
* @name Metadata Access
* @{
@@ -46,6 +52,14 @@ public:
*/
virtual DatabaseInterface& GetDatabase() = 0;
/**
* @brief Get the database interface used for accessing metadata-related
* functionality.
* @returns A reference to the game's DatabaseInterface. The reference remains
* valid for the lifetime of the GameInterface instance.
*/
virtual const DatabaseInterface& GetDatabase() const = 0;
/**
* @}
* @name Plugin Data Access