db/Interface: add attribute "plugin"
The new method IsPlugin() replaces the "is_simple" flag.
This commit is contained in:
@@ -26,18 +26,32 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
struct DatabasePlugin;
|
||||
struct DatabaseStats;
|
||||
struct DatabaseSelection;
|
||||
struct LightSong;
|
||||
class Error;
|
||||
|
||||
class Database {
|
||||
const DatabasePlugin &plugin;
|
||||
|
||||
public:
|
||||
Database(const DatabasePlugin &_plugin)
|
||||
:plugin(_plugin) {}
|
||||
|
||||
/**
|
||||
* Free instance data.
|
||||
*/
|
||||
virtual ~Database() {}
|
||||
|
||||
const DatabasePlugin &GetPlugin() const {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
bool IsPlugin(const DatabasePlugin &other) const {
|
||||
return &plugin == &other;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open the database. Read it into memory if applicable.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user