//===========================================================================// // File: link.hh // // Project: MUNGA Brick: Connection Library // // Contents: Interface specification of base Link // //---------------------------------------------------------------------------// // Date Who Modification // // -------- --- ---------------------------------------------------------- // // 10/19/94 ECH Initial coding. // // 10/20/94 JMA Fixed style stuff. // // 10/23/94 ECH Added greater deletion safety // // 10/28/94 JMA Made compatible with SGI CC // // 11/03/94 ECH Made compatible with BC4.0 // // 12/12/94 ECH Changed release handling // //---------------------------------------------------------------------------// // Copyright (C) 1994-1995, Virtual World Entertainment, Inc. // // All Rights reserved worldwide // // This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL // //===========================================================================// #pragma once #include "Stuff.hpp" namespace Stuff { class Socket; class Plug; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class _declspec(novtable) Link #if defined(_ARMOR) : public Stuff::Signature #endif { friend class Plug; public: // //-------------------------------------------------------------------- //-------------------------------------------------------------------- // void TestInstance(); virtual void Remove(Plug *plug); // //-------------------------------------------------------------------- //-------------------------------------------------------------------- // Socket* GetSocket() const {return m_socket;} Plug* GetPlug() const {return m_plug;} protected: // //-------------------------------------------------------------------- //-------------------------------------------------------------------- // explicit Link( Socket *socket, Plug *plug ): m_socket(socket), m_plug(plug) {AddToPlug(plug);} virtual ~Link(); // //-------------------------------------------------------------------- //-------------------------------------------------------------------- // void ReleaseFromPlug(); void AddToPlug(Plug *plug); // //-------------------------------------------------------------------- //-------------------------------------------------------------------- // Socket *m_socket; Link *m_nextPlugLink; Plug *m_plug; }; }