Move some code to header
This commit is contained in:
parent
c5788a2c90
commit
cfeadf335c
@ -60,18 +60,6 @@ std::shared_ptr<ProtocolManager> ProtocolManager::createInstance()
|
||||
return pm;
|
||||
} // createInstance
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
std::shared_ptr<ProtocolManager> ProtocolManager::lock()
|
||||
{
|
||||
return m_protocol_manager.lock();
|
||||
} // lock
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
bool ProtocolManager::emptyInstance()
|
||||
{
|
||||
return m_protocol_manager.expired();
|
||||
} // emptyInstance
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
ProtocolManager::ProtocolManager()
|
||||
{
|
||||
|
@ -229,6 +229,8 @@ private:
|
||||
virtual void unpauseProtocol(Protocol *protocol);
|
||||
|
||||
public:
|
||||
// ===========================================
|
||||
// Public constructor is required for shared_ptr
|
||||
ProtocolManager();
|
||||
virtual ~ProtocolManager();
|
||||
void abort();
|
||||
@ -250,9 +252,15 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
static std::shared_ptr<ProtocolManager> createInstance();
|
||||
// ------------------------------------------------------------------------
|
||||
static bool emptyInstance();
|
||||
static bool emptyInstance()
|
||||
{
|
||||
return m_protocol_manager.expired();
|
||||
} // emptyInstance
|
||||
// ------------------------------------------------------------------------
|
||||
static std::shared_ptr<ProtocolManager> lock();
|
||||
static std::shared_ptr<ProtocolManager> lock()
|
||||
{
|
||||
return m_protocol_manager.lock();
|
||||
} // lock
|
||||
|
||||
}; // class ProtocolManager
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user