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;
|
return pm;
|
||||||
} // createInstance
|
} // createInstance
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
std::shared_ptr<ProtocolManager> ProtocolManager::lock()
|
|
||||||
{
|
|
||||||
return m_protocol_manager.lock();
|
|
||||||
} // lock
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
bool ProtocolManager::emptyInstance()
|
|
||||||
{
|
|
||||||
return m_protocol_manager.expired();
|
|
||||||
} // emptyInstance
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
ProtocolManager::ProtocolManager()
|
ProtocolManager::ProtocolManager()
|
||||||
{
|
{
|
||||||
|
@ -229,8 +229,10 @@ private:
|
|||||||
virtual void unpauseProtocol(Protocol *protocol);
|
virtual void unpauseProtocol(Protocol *protocol);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ProtocolManager();
|
// ===========================================
|
||||||
virtual ~ProtocolManager();
|
// Public constructor is required for shared_ptr
|
||||||
|
ProtocolManager();
|
||||||
|
virtual ~ProtocolManager();
|
||||||
void abort();
|
void abort();
|
||||||
void propagateEvent(Event* event);
|
void propagateEvent(Event* event);
|
||||||
Protocol* getProtocol(ProtocolType type);
|
Protocol* getProtocol(ProtocolType type);
|
||||||
@ -250,9 +252,15 @@ public:
|
|||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
static std::shared_ptr<ProtocolManager> createInstance();
|
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
|
}; // class ProtocolManager
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user