BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
a8b0163
Branches
Tags
master
Blinker
src
noarch
OpConn.cpp
implemented operator connections and manager
Stefan Schuermans
commited
a8b0163
at 2011-12-22 12:48:03
OpConn.cpp
Blame
History
Raw
/* Blinker Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #include <string> #include "OpConn.h" #include "OpConnIf.h" namespace Blinker { /** * @brief constructor * @param[in] pConnIf connection interface of this side */ OpConn::OpConn(OpConnIf *pConnIf): m_pConnIf(pConnIf), m_pRemote(NULL) { } /// destructor OpConn::~OpConn() { // think twice before putting something here // might be explicitly deconstructed by remote side } /// close connection void OpConn::close() { // inform remote side if (m_pRemote) m_pRemote->m_pConnIf->opConnClose(m_pRemote); // destroy local and remote connection objects if (m_pRemote) delete m_pRemote; delete this; } /** * @brief set remote side of connection * @param[in] pRemote remote side connection object */ void OpConn::setRemote(OpConn *pRemote) { m_pRemote = pRemote; } } // namespace Blinker