diff options
Diffstat (limited to 'src/Common/SystemBackend.h')
-rw-r--r-- | src/Common/SystemBackend.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Common/SystemBackend.h b/src/Common/SystemBackend.h index 960082e..c531224 100644 --- a/src/Common/SystemBackend.h +++ b/src/Common/SystemBackend.h @@ -48,7 +48,16 @@ class SystemBackend { }; private: - static std::set<SystemBackend*> backends; + struct Compare { + bool operator() (const SystemBackend *b1, const SystemBackend *b2) { + if(b1->getPriority() == b2->getPriority()) + return (b1 > b2); + else + return (b1->getPriority() > b2->getPriority()); + } + }; + + static std::set<SystemBackend*, Compare> backends; protected: SystemBackend() {} @@ -76,6 +85,10 @@ class SystemBackend { return ret; } + virtual int getPriority() const { + return 0; + } + public: virtual ~SystemBackend() {} |