//  Beta release only.
//
//  Copyright(c) Ivyware Pty Ltd  2006-9
//               MELBOURNE, VICTORIA, AUSTRALIA, 3130
//
//  P2Peer templates and container implementations
//
#include "StdAfx.h"

#include "P2PTL.h"

///////////////////////////////////////////////////////////////////////
//  P2Peer safe critical section container
//  NOTES: Allocated critical section is managed within the life cycle
//         of this object.

/*P2PsafeCS::P2PsafeCS ( )
{   RenderThisSafe(); }
P2PsafeCS::P2PsafeCS ( CRITICAL_SECTION& oCSection )
{   RenderThisSafe();
    *this = oCSection; }
P2PsafeCS::~P2PsafeCS ( )
{   if ( m_pCSection )
      LeaveCriticalSection ( m_pCSection ); }
void
P2PsafeCS::RenderThisSafe ( )
{   m_pCSection = 0; }
P2PsafeCS&
P2PsafeCS::operator = ( CRITICAL_SECTION& rhs )
{   EnterCriticalSection ( &rhs );
    if ( m_pCSection )
      LeaveCriticalSection ( m_pCSection );
    m_pCSection = &rhs;
    return *this; }*/
