diff --git a/Database/RDBAccessSvc/RDBAccessSvc/IRDBAccessSvc.h b/Database/RDBAccessSvc/RDBAccessSvc/IRDBAccessSvc.h index 095cf570f86b2337bd12d2f06e8329170e08446b..096bd1826bb35207300b4fbe84cf387ec63144d8 100755 --- a/Database/RDBAccessSvc/RDBAccessSvc/IRDBAccessSvc.h +++ b/Database/RDBAccessSvc/RDBAccessSvc/IRDBAccessSvc.h @@ -28,9 +28,6 @@ typedef std::shared_ptr<IRDBRecordset> IRDBRecordset_ptr; typedef coral::AttributeList RDBTagDetails; -// Declaration of the interface ID ( interface id, major version, minor version) -static const InterfaceID IID_IRDBAccessSvc(1012, 1 , 0); - /** * @class IRDBAccessSvc * @@ -50,8 +47,8 @@ class IRDBAccessSvc : virtual public IInterface public: - /// Retrieve interface ID - static const InterfaceID& interfaceID() { return IID_IRDBAccessSvc; } + /// Declare interface ID + DeclareInterfaceID(IRDBAccessSvc, 1 , 0); /// Provides access to the Recordset object containing HVS-tagged data. /// @param node [IN] name of the leaf HVS node diff --git a/Database/RDBAccessSvc/src/RDBAccessSvc.cxx b/Database/RDBAccessSvc/src/RDBAccessSvc.cxx index 67125ddea7a24363376c7ab0fc8361e7de508673..c95b6fd55508e6aac5aa9aa26e90a99002ca3c0c 100755 --- a/Database/RDBAccessSvc/src/RDBAccessSvc.cxx +++ b/Database/RDBAccessSvc/src/RDBAccessSvc.cxx @@ -9,7 +9,6 @@ * * @author Vakho Tsulaia <Vakhtang.Tsulaia@cern.ch> * - * $Id: RDBAccessSvc.cxx,v 1.41 2008-10-13 12:24:09 tsulaia Exp $ */ #include "RDBAccessSvc.h" @@ -35,7 +34,7 @@ #include <thread> RDBAccessSvc::RDBAccessSvc(const std::string& name, ISvcLocator* svc) - : AthService(name,svc) + : base_class(name,svc) { } @@ -521,16 +520,3 @@ StatusCode RDBAccessSvc::finalize() return StatusCode::SUCCESS; } - -StatusCode RDBAccessSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if (IID_IRDBAccessSvc == riid) { - *ppvInterface = (IRDBAccessSvc*)this; - } - else { - return AthService::queryInterface(riid, ppvInterface); - } - - addRef(); - return StatusCode::SUCCESS; -} diff --git a/Database/RDBAccessSvc/src/RDBAccessSvc.h b/Database/RDBAccessSvc/src/RDBAccessSvc.h index 4f2c89b691fef6b1d5633daf9bae3f056d03e23a..ee0ba417ab94eb20967fdc22e66e98387aa2a0b6 100755 --- a/Database/RDBAccessSvc/src/RDBAccessSvc.h +++ b/Database/RDBAccessSvc/src/RDBAccessSvc.h @@ -9,7 +9,6 @@ * * @author Vakho Tsulaia <Vakhtang.Tsulaia@cern.ch> * - * $Id: RDBAccessSvc.h,v 1.17 2008-10-13 12:24:09 tsulaia Exp $ */ #ifndef RDBACCESSSVC_RDBACCESSSVC_H @@ -55,7 +54,7 @@ typedef std::map<std::string, TagNameIdByNode*> GlobalTagLookupMap; // Key - <Gl * */ -class RDBAccessSvc final : public AthService, virtual public IRDBAccessSvc +class RDBAccessSvc final : public extends<AthService, IRDBAccessSvc> { public: /// Standard Service Constructor @@ -63,12 +62,6 @@ class RDBAccessSvc final : public AthService, virtual public IRDBAccessSvc StatusCode initialize() override; StatusCode finalize() override; - StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ) override; - - friend class SvcFactory<RDBAccessSvc>; - - /// Retrieve interface ID - static const InterfaceID& interfaceID() { return IID_IRDBAccessSvc; } /// Connect to the relational DB. /// If this method is called for already open connection the connection diff --git a/Database/RDBAccessSvc/src/SqliteReadSvc.cxx b/Database/RDBAccessSvc/src/SqliteReadSvc.cxx index 600b96e0bfdecf35221713b457ff3ef298617c72..fe36313b136fc1e07f407c151fe553154b19e430 100755 --- a/Database/RDBAccessSvc/src/SqliteReadSvc.cxx +++ b/Database/RDBAccessSvc/src/SqliteReadSvc.cxx @@ -17,7 +17,7 @@ #include "RDBQuery.h" SqliteReadSvc::SqliteReadSvc(const std::string& name, ISvcLocator* svc) - : AthService(name,svc) + : base_class(name,svc) { } @@ -29,19 +29,6 @@ StatusCode SqliteReadSvc::finalize() return StatusCode::SUCCESS; } -StatusCode SqliteReadSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if (IID_IRDBAccessSvc == riid) { - *ppvInterface = (IRDBAccessSvc*)this; - } - else { - return AthService::queryInterface(riid, ppvInterface); - } - - addRef(); - return StatusCode::SUCCESS; -} - bool SqliteReadSvc::connect(const std::string& connName) { std::lock_guard<std::mutex> guard(m_sessionMutex); diff --git a/Database/RDBAccessSvc/src/SqliteReadSvc.h b/Database/RDBAccessSvc/src/SqliteReadSvc.h index bb574ea7d6e38f01bf1a39d62383b68a44a2dbd7..1fae776589f8de1c21925183fe295467422ff32d 100755 --- a/Database/RDBAccessSvc/src/SqliteReadSvc.h +++ b/Database/RDBAccessSvc/src/SqliteReadSvc.h @@ -37,19 +37,13 @@ typedef std::map<std::string, IRDBRecordset_ptr> RecordsetPtrMap; * */ -class SqliteReadSvc final : public AthService, virtual public IRDBAccessSvc +class SqliteReadSvc final : public extends<AthService, IRDBAccessSvc> { public: /// Standard Service Constructor SqliteReadSvc(const std::string& name, ISvcLocator* svc); StatusCode finalize() override; - StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ) override; - - friend class SvcFactory<SqliteReadSvc>; - - /// Retrieve interface ID - static const InterfaceID& interfaceID() { return IID_IRDBAccessSvc; } /// Open the SQLite database /// This method has no effect if the connection has already been opened